Author: ovyalov Date: Fri May 22 18:14:39 2015 New Revision: 238068 URL: http://llvm.org/viewvc/llvm-project?rev=238068&view=rev Log: Use target's SIGSTOP and SIGINT when making decision about continue after async packet.
http://reviews.llvm.org/D9857 Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp?rev=238068&r1=238067&r2=238068&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp (original) +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Fri May 22 18:14:39 2015 @@ -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::SendContin // 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::SendContin // 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; _______________________________________________ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits