Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs
diff options
context:
space:
mode:
authorZoltan Varga <vargaz@gmail.com>2010-04-10 02:58:28 +0400
committerZoltan Varga <vargaz@gmail.com>2010-04-10 02:58:28 +0400
commit4664e5a6d171c644eefdcb0d2e9c45783b5c2920 (patch)
treeacf0468aea2cd00a0ad03460a981769cda401615 /mcs
parentc206639c22d77802921b06bb9b47aa17ba767996 (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')
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ChangeLog4
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs8
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs10
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);
+ }
+ }
}
}