diff options
author | Chaoren Lin <chaorenl@google.com> | 2015-02-03 01:51:50 +0000 |
---|---|---|
committer | Chaoren Lin <chaorenl@google.com> | 2015-02-03 01:51:50 +0000 |
commit | 0be9ebbfbdc195c39631705fd26e0666fa30975d (patch) | |
tree | 4e40fd174a0118af37248b4515c08810621720d9 /lldb/source/Plugins/Process/gdb-remote | |
parent | 18fe6404f9bc379045f4bce801f1c7113cddc6a0 (diff) | |
download | bcm5719-llvm-0be9ebbfbdc195c39631705fd26e0666fa30975d.tar.gz bcm5719-llvm-0be9ebbfbdc195c39631705fd26e0666fa30975d.zip |
Add missing switch cases to silence warnings.
llvm-svn: 227931
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote')
3 files changed, 13 insertions, 9 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp index feac4cfd350..99f445cb183 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -3018,6 +3018,7 @@ GDBRemoteCommunicationClient::SendGDBStoppointTypePacket (GDBStoppointType type, case eWatchpointWrite: m_supports_z2 = false; break; case eWatchpointRead: m_supports_z3 = false; break; case eWatchpointReadWrite: m_supports_z4 = false; break; + case eStoppointInvalid: return UINT8_MAX; } } } diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h index d1b83894899..10af4cb5517 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h @@ -366,8 +366,8 @@ public: case eWatchpointWrite: return m_supports_z2; case eWatchpointRead: return m_supports_z3; case eWatchpointReadWrite: return m_supports_z4; + case eStoppointInvalid: return false; } - return false; } uint8_t SendGDBStoppointTypePacket (GDBStoppointType type, // Type of breakpoint or watchpoint diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp index 3f60671262b..a2c57db13f9 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp @@ -978,6 +978,12 @@ GDBRemoteCommunicationServer::SendStopReplyPacketForThread (lldb::tid_t tid) case eStopReasonExec: reason_str = "exec"; break; + case eStopReasonInstrumentation: + case eStopReasonInvalid: + case eStopReasonPlanComplete: + case eStopReasonThreadExiting: + case eStopReasonNone: + break; } if (reason_str != nullptr) { @@ -3765,7 +3771,7 @@ GDBRemoteCommunicationServer::Handle_Z (StringExtractorGDBRemote &packet) want_hardware = true; want_breakpoint = false; break; case eWatchpointReadWrite: want_hardware = true; want_breakpoint = false; break; - default: + case eStoppointInvalid: return SendIllFormedResponse(packet, "Z packet had invalid software/hardware specifier"); } @@ -3803,13 +3809,10 @@ GDBRemoteCommunicationServer::Handle_Z (StringExtractorGDBRemote &packet) } else { - uint32_t watch_flags = 0x0; - switch (stoppoint_type) - { - case eWatchpointWrite: watch_flags = 0x1; break; - case eWatchpointRead: watch_flags = 0x3; break; - case eWatchpointReadWrite: watch_flags = 0x3; break; - } + uint32_t watch_flags = + stoppoint_type == eWatchpointWrite + ? watch_flags = 0x1 // Write + : watch_flags = 0x3; // ReadWrite // Try to set the watchpoint. const Error error = m_debugged_process_sp->SetWatchpoint ( |