summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
diff options
context:
space:
mode:
authorOleksiy Vyalov <ovyalov@google.com>2015-05-22 23:14:39 +0000
committerOleksiy Vyalov <ovyalov@google.com>2015-05-22 23:14:39 +0000
commit755d58a463e0f11897470b21e9071661f590c867 (patch)
tree0cfa4177de3fef1e9a7b7bc8045af18b57cbcb5a /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
parent4c3753c4d483f8115df78507117a105438b42ec9 (diff)
downloadbcm5719-llvm-755d58a463e0f11897470b21e9071661f590c867.tar.gz
bcm5719-llvm-755d58a463e0f11897470b21e9071661f590c867.zip
Use target's SIGSTOP and SIGINT when making decision about continue after async packet.
http://reviews.llvm.org/D9857 llvm-svn: 238068
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index a05059f061a..7f194cdd55b 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -35,6 +35,7 @@
#include "lldb/Host/TimeValue.h"
#include "lldb/Target/Target.h"
#include "lldb/Target/MemoryRegionInfo.h"
+#include "lldb/Target/UnixSignals.h"
// Project includes
#include "Utility/StringExtractorGDBRemote.h"
@@ -46,10 +47,6 @@ using namespace lldb;
using namespace lldb_private;
using namespace lldb_private::process_gdb_remote;
-#if defined(LLDB_DISABLE_POSIX) && !defined(SIGSTOP)
-#define SIGSTOP 17
-#endif
-
//----------------------------------------------------------------------
// GDBRemoteCommunicationClient constructor
//----------------------------------------------------------------------
@@ -866,7 +863,10 @@ GDBRemoteCommunicationClient::SendContinuePacketAndWaitForResponse
// Set the starting continue packet into "continue_packet". This packet
// may change if we are interrupted and we continue after an async packet...
std::string continue_packet(payload, packet_length);
-
+
+ const auto sigstop_signo = process->GetUnixSignals().GetSignalNumberFromName("SIGSTOP");
+ const auto sigint_signo = process->GetUnixSignals().GetSignalNumberFromName("SIGINT");
+
bool got_async_packet = false;
while (state == eStateRunning)
@@ -936,7 +936,7 @@ GDBRemoteCommunicationClient::SendContinuePacketAndWaitForResponse
// packet. If we don't do this, then the reply for our
// async packet will be the repeat stop reply packet and cause
// a lot of trouble for us!
- if (signo != SIGINT && signo != SIGSTOP)
+ if (signo != sigint_signo && signo != sigstop_signo)
{
continue_after_async = false;
OpenPOWER on IntegriCloud