Fix 32-bit builds
r303972 used GetValueForKeyAsInteger with mismatched types (e.g.
instantiating with uint64_t, but passing a size_t argument), which
manifested itself on 32-bit architectures.
The intended usage of these functions was to not specify the type
explicitly, and let the compiler figure that out, so switch to that kind
of usage instead.
llvm-svn: 303988
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
index 0b3bbfe..5aa2f49 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
@@ -1125,17 +1125,16 @@
auto json_dict = json_object->GetAsDictionary();
- json_dict->GetValueForKeyAsInteger<uint64_t>("metabuffersize",
- metabuffersize);
+ json_dict->GetValueForKeyAsInteger("metabuffersize", metabuffersize);
options.setMetaDataBufferSize(metabuffersize);
- json_dict->GetValueForKeyAsInteger<uint64_t>("buffersize", buffersize);
+ json_dict->GetValueForKeyAsInteger("buffersize", buffersize);
options.setTraceBufferSize(buffersize);
- json_dict->GetValueForKeyAsInteger<uint64_t>("type", type);
+ json_dict->GetValueForKeyAsInteger("type", type);
options.setType(static_cast<lldb::TraceType>(type));
- json_dict->GetValueForKeyAsInteger<uint64_t>("threadid", tid);
+ json_dict->GetValueForKeyAsInteger("threadid", tid);
options.setThreadID(tid);
StructuredData::ObjectSP custom_params_sp =
@@ -1188,10 +1187,10 @@
auto json_dict = json_object->GetAsDictionary();
- if (!json_dict->GetValueForKeyAsInteger<lldb::user_id_t>("traceid", uid))
+ if (!json_dict->GetValueForKeyAsInteger("traceid", uid))
return SendIllFormedResponse(packet, "jTraceStop: Ill formed packet ");
- json_dict->GetValueForKeyAsInteger<lldb::tid_t>("threadid", tid);
+ json_dict->GetValueForKeyAsInteger("threadid", tid);
Status error = m_debugged_process_sp->StopTrace(uid, tid);
@@ -1226,11 +1225,11 @@
auto json_dict = json_object->GetAsDictionary();
- if (!json_dict->GetValueForKeyAsInteger<lldb::user_id_t>("traceid", uid))
+ if (!json_dict->GetValueForKeyAsInteger("traceid", uid))
return SendIllFormedResponse(packet,
"jTraceConfigRead: Ill formed packet ");
- json_dict->GetValueForKeyAsInteger<lldb::tid_t>("threadid", threadid);
+ json_dict->GetValueForKeyAsInteger("threadid", threadid);
TraceOptions options;
StreamGDBRemote response;
@@ -1293,12 +1292,12 @@
auto json_dict = json_object->GetAsDictionary();
- if (!json_dict->GetValueForKeyAsInteger<lldb::user_id_t>("traceid", uid) ||
- !json_dict->GetValueForKeyAsInteger<uint64_t>("offset", offset) ||
- !json_dict->GetValueForKeyAsInteger<uint64_t>("buffersize", byte_count))
+ if (!json_dict->GetValueForKeyAsInteger("traceid", uid) ||
+ !json_dict->GetValueForKeyAsInteger("offset", offset) ||
+ !json_dict->GetValueForKeyAsInteger("buffersize", byte_count))
return SendIllFormedResponse(packet, "jTrace: Ill formed packet ");
- json_dict->GetValueForKeyAsInteger<lldb::tid_t>("threadid", tid);
+ json_dict->GetValueForKeyAsInteger("threadid", tid);
// Allocate the response buffer.
uint8_t *buffer = new (std::nothrow) uint8_t[byte_count];