[Lldb-commits] [lldb] 64bb9cf - [lldb] [Process/gdb-remote] Fix TID reading to use U64
Michał Górny via lldb-commits
lldb-commits at lists.llvm.org
Tue Mar 30 04:59:47 PDT 2021
Author: Michał Górny
Date: 2021-03-30T13:59:32+02:00
New Revision: 64bb9cf7bf8df85cbe75f0848840156d3c316207
URL: https://github.com/llvm/llvm-project/commit/64bb9cf7bf8df85cbe75f0848840156d3c316207
DIFF: https://github.com/llvm/llvm-project/commit/64bb9cf7bf8df85cbe75f0848840156d3c316207.diff
LOG: [lldb] [Process/gdb-remote] Fix TID reading to use U64
Fix multiple instances of reading thread-id to use U64 type instead
of U32. This is consistent with lldb::tid_t being a 64-bit type.
Added:
Modified:
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
Removed:
################################################################################
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index d375a312ae2c..9218f8a63c01 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -729,7 +729,7 @@ lldb::pid_t GDBRemoteCommunicationClient::GetCurrentProcessID(bool allow_lazy) {
PacketResult::Success) {
if (response.GetChar() == 'Q') {
if (response.GetChar() == 'C') {
- m_curr_pid = response.GetHexMaxU32(false, LLDB_INVALID_PROCESS_ID);
+ m_curr_pid = response.GetHexMaxU64(false, LLDB_INVALID_PROCESS_ID);
if (m_curr_pid != LLDB_INVALID_PROCESS_ID) {
m_curr_pid_is_valid = eLazyBoolYes;
return m_curr_pid;
@@ -1126,7 +1126,7 @@ bool GDBRemoteCommunicationClient::GetDefaultThreadId(lldb::tid_t &tid) {
return false;
if (response.GetChar() == 'Q' && response.GetChar() == 'C')
- tid = response.GetHexMaxU32(true, -1);
+ tid = response.GetHexMaxU64(true, -1);
return true;
}
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
index 62a09a2a432c..f0fb116690f6 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
@@ -1732,7 +1732,7 @@ GDBRemoteCommunicationServerLLGS::Handle_vCont(
// Consume the separator.
packet.GetChar();
- thread_action.tid = packet.GetHexMaxU32(false, LLDB_INVALID_THREAD_ID);
+ thread_action.tid = packet.GetHexMaxU64(false, LLDB_INVALID_THREAD_ID);
if (thread_action.tid == LLDB_INVALID_THREAD_ID)
return SendIllFormedResponse(
packet, "Could not parse thread number in vCont packet");
@@ -3384,7 +3384,7 @@ GDBRemoteCommunicationServerLLGS::Handle_qThreadStopInfo(
Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_THREAD));
packet.SetFilePos(strlen("qThreadStopInfo"));
- const lldb::tid_t tid = packet.GetHexMaxU32(false, LLDB_INVALID_THREAD_ID);
+ const lldb::tid_t tid = packet.GetHexMaxU64(false, LLDB_INVALID_THREAD_ID);
if (tid == LLDB_INVALID_THREAD_ID) {
LLDB_LOGF(log,
"GDBRemoteCommunicationServerLLGS::%s failed, could not "
More information about the lldb-commits
mailing list