diff options
Diffstat (limited to 'Mono.Debugger.Soft')
-rw-r--r-- | Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs | 7 | ||||
-rw-r--r-- | Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs | 9 |
2 files changed, 13 insertions, 3 deletions
diff --git a/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs b/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs index c9da1c7..57f10e4 100644 --- a/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs +++ b/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs @@ -507,7 +507,8 @@ namespace Mono.Debugger.Soft GET_ID = 5, /* Ditto */ GET_TID = 6, - SET_IP = 7 + SET_IP = 7, + GET_ELAPSED_TIME = 8 } enum CmdEventRequest { @@ -2041,7 +2042,9 @@ namespace Mono.Debugger.Soft internal string Thread_GetName (long id) { return SendReceive (CommandSet.THREAD, (int)CmdThread.GET_NAME, new PacketWriter ().WriteId (id)).ReadString (); } - + internal long Thread_GetElapsedTime (long id) { + return SendReceive (CommandSet.THREAD, (int)CmdThread.GET_ELAPSED_TIME, new PacketWriter ().WriteId (id)).ReadLong (); + } internal void Thread_GetFrameInfo (long id, int start_frame, int length, Action<FrameInfo[]> resultCallaback) { Send (CommandSet.THREAD, (int)CmdThread.GET_FRAME_INFO, new PacketWriter ().WriteId (id).WriteInt (start_frame).WriteInt (length), (res) => { int count = res.ReadInt (); diff --git a/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs b/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs index 938a4ca..9f20534 100644 --- a/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs +++ b/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs @@ -30,11 +30,18 @@ namespace Mono.Debugger.Soft return frames; } + public long ElapsedTime () { + long elapsedTime = GetElapsedTime (); + return elapsedTime; + } + internal void InvalidateFrames () { cacheInvalid = true; threadStateInvalid = true; } - + internal long GetElapsedTime () { + return vm.conn.Thread_GetElapsedTime (id); + } internal void FetchFrames (bool mustFetch = false) { lock (fetchingLocker) { if (fetching || !cacheInvalid) |