From: Andrew Burgess <andrew.burgess@embecosm.com>
To: gdb-patches@sourceware.org
Subject: [PUSHED] gdb: add some additional debug output in remote.c
Date: Fri, 4 Jun 2021 17:19:16 +0100 [thread overview]
Message-ID: <20210604161916.410444-1-andrew.burgess@embecosm.com> (raw)
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 | 6 ++++++
gdb/remote.c | 8 ++++++++
2 files changed, 14 insertions(+)
diff --git a/gdb/remote.c b/gdb/remote.c
index 9b465d77343..de04aab43dc 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -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. */
--
2.25.4
reply other threads:[~2021-06-04 16:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210604161916.410444-1-andrew.burgess@embecosm.com \
--to=andrew.burgess@embecosm.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).