diff options
author | Zoltan Varga <vargaz@gmail.com> | 2010-04-10 02:58:28 +0400 |
---|---|---|
committer | Zoltan Varga <vargaz@gmail.com> | 2010-04-10 02:58:28 +0400 |
commit | 4664e5a6d171c644eefdcb0d2e9c45783b5c2920 (patch) | |
tree | acf0468aea2cd00a0ad03460a981769cda401615 /mcs | |
parent | c206639c22d77802921b06bb9b47aa17ba767996 (diff) |
2010-04-10 Zoltan Varga <vargaz@gmail.com>
* ThreadMirror.cs: Add a ThreadId property.
svn path=/branches/mono-2-6/mcs/; revision=155177
Diffstat (limited to 'mcs')
3 files changed, 21 insertions, 1 deletions
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ChangeLog b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ChangeLog index eeddaa0fc14..b1b6086cb88 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ChangeLog +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ChangeLog @@ -1,3 +1,7 @@ +2010-04-10 Zoltan Varga <vargaz@gmail.com> + + * ThreadMirror.cs: Add a ThreadId property. + 2010-03-05 Martin Baulig <martin@ximian.com> **** Backport of r153125 and r153336 **** diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs index 4088fb66715..eace25b3cca 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs @@ -303,7 +303,9 @@ namespace Mono.Debugger.Soft GET_FRAME_INFO = 1, GET_NAME = 2, GET_STATE = 3, - GET_INFO = 4 + GET_INFO = 4, + /* FIXME: Merge into GET_INFO when the major protocol version is increased */ + GET_ID = 5 } enum CmdEventRequest { @@ -1430,6 +1432,10 @@ namespace Mono.Debugger.Soft return res; } + public long Thread_GetId (long id) { + return SendReceive (CommandSet.THREAD, (int)CmdThread.GET_ID, new PacketWriter ().WriteId (id)).ReadLong (); + } + /* * MODULE */ diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs index 65e0c0f62ac..d18804bd89a 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs @@ -51,5 +51,15 @@ namespace Mono.Debugger.Soft return info.is_thread_pool; } } + + /* + * Return a unique identifier for this thread, multiple ThreadMirror objects + * may have the same ThreadId because of appdomains. + */ + public long ThreadId { + get { + return vm.conn.Thread_GetId (id); + } + } } } |