summaryrefslogtreecommitdiffstats
path: root/lldb/tools/debugserver/source/DNB.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2013-02-22 07:27:08 +0000
committerJason Molenda <jmolenda@apple.com>2013-02-22 07:27:08 +0000
commit1c73911d420db52e6d52cd68bd1020bfddb6d608 (patch)
treee3b026d7558cda086f5d1243e6cf9f4cb9b17b0e /lldb/tools/debugserver/source/DNB.cpp
parent1fcd7fd633a44ab3ec944a5102afea74fcc8a23e (diff)
downloadbcm5719-llvm-1c73911d420db52e6d52cd68bd1020bfddb6d608.tar.gz
bcm5719-llvm-1c73911d420db52e6d52cd68bd1020bfddb6d608.zip
Change debugserver from using the mach port number (in debugserver's
own port namepsace) as the thread identifier to using the system-wide globally unique thread id as the thread identifier number. MachThread.cpp keeps both the unique id and the mach port number for each thread. All layers outside MachThread class use the unique id with three exceptions: (1) Mach exceptions come in with the port number (thread_port) which needs to be translated, (2) any calls to low-level thread_get_state/thread_set_state/thread_suspend etc need to use the mach port number, (3) MachThreadList::UpdateThreadList which creates the MachThread objects gets the unique id and passes it to the MachThread ctor as an argument. In general, any time nub_thread_t is used, it is now referring to a unique thread id. Any time a thread_t is used, it is now referring to a mach port number. There was some interchangability of these types previously. nub_thread_t has also been changed to a 64-bit type which necessitated some printf specification string changes. I haven't been able to test these changes extensively yet but want to checkpoint the work. The scenarios I've been testing are all working correctly so while there may be some corner cases I haven't hit yet, I think it is substantially correct. <rdar://problem/12931414> llvm-svn: 175870
Diffstat (limited to 'lldb/tools/debugserver/source/DNB.cpp')
-rw-r--r--lldb/tools/debugserver/source/DNB.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/tools/debugserver/source/DNB.cpp b/lldb/tools/debugserver/source/DNB.cpp
index 3f7232d1791..36508e986e7 100644
--- a/lldb/tools/debugserver/source/DNB.cpp
+++ b/lldb/tools/debugserver/source/DNB.cpp
@@ -12,6 +12,7 @@
//===----------------------------------------------------------------------===//
#include "DNB.h"
+#include <inttypes.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
@@ -1385,7 +1386,7 @@ DNBPrintf (nub_process_t pid, nub_thread_t tid, nub_addr_t base_addr, FILE *file
}
else
{
- fprintf(file, "error: unable to read register '%s' for process %#.4x and thread %#.4x\n", register_name.c_str(), pid, tid);
+ fprintf(file, "error: unable to read register '%s' for process %#.4x and thread %#.8" PRIx64 "\n", register_name.c_str(), pid, tid);
return total_bytes_read;
}
}
OpenPOWER on IntegriCloud