diff options
author | Jason Molenda <jmolenda@apple.com> | 2013-04-03 04:18:47 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2013-04-03 04:18:47 +0000 |
commit | d5318c0c35354b22b9b676b9e2bc7076306a3d08 (patch) | |
tree | dec05fa440fc8f03ca7c1781c9532c87ebefa2c5 /lldb/tools/debugserver/source/DNB.cpp | |
parent | b00fc87608d9494f72d7e59054444bd24ba68966 (diff) | |
download | bcm5719-llvm-d5318c0c35354b22b9b676b9e2bc7076306a3d08.tar.gz bcm5719-llvm-d5318c0c35354b22b9b676b9e2bc7076306a3d08.zip |
Fix another old usage of GetCurrentThread() to get a mach port
number in RNBRemote::HandlePacket_qProcessInfo -- add a new
GetCurrentThreadMachPort() so callers who need to make a mach
thred_get_state() call at the RNBRemote level will have a way to
get the port number.
llvm-svn: 178619
Diffstat (limited to 'lldb/tools/debugserver/source/DNB.cpp')
-rw-r--r-- | lldb/tools/debugserver/source/DNB.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lldb/tools/debugserver/source/DNB.cpp b/lldb/tools/debugserver/source/DNB.cpp index ed19b097327..fb780c8ca35 100644 --- a/lldb/tools/debugserver/source/DNB.cpp +++ b/lldb/tools/debugserver/source/DNB.cpp @@ -1773,6 +1773,18 @@ DNBProcessGetCurrentThread (nub_process_t pid) } //---------------------------------------------------------------------- +// Get the mach port number of the current thread. +//---------------------------------------------------------------------- +nub_thread_t +DNBProcessGetCurrentThreadMachPort (nub_process_t pid) +{ + MachProcessSP procSP; + if (GetProcessSP (pid, procSP)) + return procSP->GetCurrentThreadMachPort(); + return 0; +} + +//---------------------------------------------------------------------- // Change the current thread. //---------------------------------------------------------------------- nub_thread_t |