OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 The Native Client Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 using System; | |
5 using System.Collections.Generic; | |
6 | |
7 namespace Google.MsAd7.BaseImpl.Interfaces { | |
8 public struct SimpleDebuggerTypes { | |
9 #region Delegates | |
10 | |
11 public delegate void EventHandler( | |
12 ISimpleDebugger sender, EventType t, ResultCode status); | |
13 | |
14 public delegate void MessageHandler( | |
15 ISimpleDebugger sender, ResultCode status, string msg); | |
16 | |
17 public delegate void ModuleLoadHandler( | |
18 ISimpleDebugger sender, string modulePath, string status); | |
19 | |
20 #endregion | |
21 | |
22 #region EventType enum | |
23 | |
24 public enum EventType { | |
25 Break, | |
26 Continue, | |
27 Step, | |
28 } | |
29 | |
30 #endregion | |
31 | |
32 #region ResultCode enum | |
33 | |
34 public enum ResultCode { | |
35 Busy = -4, // Target is busy (running) | |
36 Failed = -3, // Transaction completed with failure | |
37 Lost = -2, // Lost connection during transaction | |
38 Timeout = -1, // Transaction Timed out | |
39 Pending = 0, // Transaction is pending as expected | |
40 Ok = 1 // Transaction Succeeded | |
41 } ; | |
42 | |
43 #endregion | |
44 } | |
45 | |
46 public interface ISimpleDebugger { | |
47 // | |
48 // Properties | |
49 // | |
50 ISimpleSymbolProvider Symbols { get; } | |
51 string Architecture { get; } | |
52 ulong BaseAddress { get; } | |
53 | |
54 // | |
55 // Events | |
56 // | |
57 | |
58 // | |
59 // Process Control | |
60 // | |
61 void Break(); | |
62 void Step(uint id); | |
63 void Continue(); | |
64 | |
65 void AddBreakpoint(UInt64 addr); | |
66 void RemoveBreakpoint(UInt64 addr); | |
67 | |
68 // | |
69 // Queries | |
70 // | |
71 IEnumerable<UInt32> GetThreads(); | |
72 object GetRegisters(uint id); | |
73 void GetMemory(UInt64 sourceAddress, Array destination, UInt32 countInBytes)
; | |
74 void SetMemory(UInt64 destAddress, Array src, UInt32 countInBytes); | |
75 ulong GetU64(ulong address); | |
76 uint GetU32(ulong address); | |
77 event SimpleDebuggerTypes.EventHandler Stopped; | |
78 event SimpleDebuggerTypes.EventHandler StepFinished; | |
79 event SimpleDebuggerTypes.EventHandler Continuing; | |
80 event SimpleDebuggerTypes.MessageHandler Output; | |
81 | |
82 event SimpleDebuggerTypes.ModuleLoadHandler ModuleLoaded; | |
83 } | |
84 } | |
OLD | NEW |