ovyalov created this revision.
ovyalov added a reviewer: clayborg.
ovyalov added a subscriber: lldb-commits.
Reset continue_after_async only if neither SIGINIT nor SIGSTOP received -
otherwise it leads to stopped inferior when setting breakpoint (when
m_interrupt_sent == true and signal is SIGSTOP).
http://reviews.llvm.org/D18886
Files:
source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
===================================================================
--- source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -1165,12 +1165,13 @@
// binaries that would send two stop replies
anytime the process
// was interrupted, so we need to also check for
an extra
// stop reply packet if we interrupted the process
- if (m_interrupt_sent || (signo != sigint_signo &&
signo != sigstop_signo))
+ const bool received_nonstop_signal = signo !=
sigint_signo && signo != sigstop_signo;
+ if (m_interrupt_sent || received_nonstop_signal)
{
- continue_after_async = false;
+ if (received_nonstop_signal)
+ continue_after_async = false;
- // We didn't get a SIGINT or SIGSTOP, so try
for a
- // very brief time (0.1s) to get another stop
reply
+ // Try for a very brief time (0.1s) to get
another stop reply
// packet to make sure it doesn't get in the
way
StringExtractorGDBRemote
extra_stop_reply_packet;
uint32_t timeout_usec = 100000;
Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
===================================================================
--- source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -1165,12 +1165,13 @@
// binaries that would send two stop replies anytime the process
// was interrupted, so we need to also check for an extra
// stop reply packet if we interrupted the process
- if (m_interrupt_sent || (signo != sigint_signo && signo != sigstop_signo))
+ const bool received_nonstop_signal = signo != sigint_signo && signo != sigstop_signo;
+ if (m_interrupt_sent || received_nonstop_signal)
{
- continue_after_async = false;
+ if (received_nonstop_signal)
+ continue_after_async = false;
- // We didn't get a SIGINT or SIGSTOP, so try for a
- // very brief time (0.1s) to get another stop reply
+ // Try for a very brief time (0.1s) to get another stop reply
// packet to make sure it doesn't get in the way
StringExtractorGDBRemote extra_stop_reply_packet;
uint32_t timeout_usec = 100000;
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits