diff options
author | Pavel Labath <labath@google.com> | 2017-05-26 13:53:39 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2017-05-26 13:53:39 +0000 |
commit | 4c950235b2ad8e55f3ef83f15e875da0234cbea2 (patch) | |
tree | 6c04118bd0ad636e97047c14def5321e5f9de555 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp | |
parent | 57b2492b38c40dd541aac7329f4ab60390020f08 (diff) | |
download | bcm5719-llvm-4c950235b2ad8e55f3ef83f15e875da0234cbea2.tar.gz bcm5719-llvm-4c950235b2ad8e55f3ef83f15e875da0234cbea2.zip |
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
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp index 0b3bbfec202..5aa2f498579 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp @@ -1125,17 +1125,16 @@ GDBRemoteCommunicationServerLLGS::Handle_jTraceStart( 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 @@ GDBRemoteCommunicationServerLLGS::Handle_jTraceStop( 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 @@ GDBRemoteCommunicationServerLLGS::Handle_jTraceConfigRead( 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 @@ GDBRemoteCommunicationServerLLGS::Handle_jTraceRead( 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]; |