gdb: add some additional debug output in remote.c
authorAndrew Burgess <andrew.burgess@embecosm.com>
Fri, 4 Jun 2021 13:31:33 +0000 (14:31 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Fri, 4 Jun 2021 16:19:28 +0000 (17:19 +0100)
I needed more debug output from:
  remote_target::select_thread_for_ambiguous_stop_reply
I thought this would be useful for others too.

gdb/ChangeLog:

* remote.c (remote_target)
<select_thread_for_ambiguous_stop_reply>: Add additional debug
output.

gdb/ChangeLog
gdb/remote.c

index 875d8b7db0e8f4459b27a91006730e19c4b2c4cf..99e935ab54f0b732378b7cc6a956c55f2de321b2 100644 (file)
@@ -1,3 +1,9 @@
+2021-06-04  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * remote.c (remote_target)
+       <select_thread_for_ambiguous_stop_reply>: Add additional debug
+       output.
+
 2021-06-04  Hannes Domani  <ssbssa@yahoo.de>
 
        * python/py-tui.c (class tui_py_window): Add click function.
index 9b465d77343feee261147b413062e8d67ac12e27..de04aab43dc9e5fac71bf53fe316f7ca6321d526 100644 (file)
@@ -7934,12 +7934,16 @@ ptid_t
 remote_target::select_thread_for_ambiguous_stop_reply
   (const struct target_waitstatus *status)
 {
+  REMOTE_SCOPED_DEBUG_ENTER_EXIT;
+
   /* Some stop events apply to all threads in an inferior, while others
      only apply to a single thread.  */
   bool process_wide_stop
     = (status->kind == TARGET_WAITKIND_EXITED
        || status->kind == TARGET_WAITKIND_SIGNALLED);
 
+  remote_debug_printf ("process_wide_stop = %d", process_wide_stop);
+
   thread_info *first_resumed_thread = nullptr;
   bool ambiguous = false;
 
@@ -7959,6 +7963,10 @@ remote_target::select_thread_for_ambiguous_stop_reply
        ambiguous = true;
     }
 
+  remote_debug_printf ("first resumed thread is %s",
+                      pid_to_str (first_resumed_thread->ptid).c_str ());
+  remote_debug_printf ("is this guess ambiguous? = %d", ambiguous);
+
   gdb_assert (first_resumed_thread != nullptr);
 
   /* Warn if the remote target is sending ambiguous stop replies.  */