This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 5/6] gdbserver: Minor debugging output cleanups/improvements
- From: Doug Evans <dje at google dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 17 Dec 2013 13:49:04 -0800
- Subject: [PATCH 5/6] gdbserver: Minor debugging output cleanups/improvements
- Authentication-results: sourceware.org; auth=none
Hi.
This patch just has some minor cleanups/improvements.
2013-12-17 Doug Evans <dje@google.com>
* linux-low.c (linux_wait_1): Remove unnecessary test for
debug_threads.
(wait_for_sigstop): Simplify debugging text.
(need_step_over_p): Including status_pending value in debugging text.
(proceed_one_lwp): Ditto.
---
gdb/gdbserver/linux-low.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 61744a3..7b0514d 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -2682,8 +2684,7 @@ Check if we're already there.\n",
fprintf (stderr, "Stopped by watchpoint.\n");
if (gdb_breakpoint_here (event_child->stop_pc))
fprintf (stderr, "Stopped by GDB breakpoint.\n");
- if (debug_threads)
- fprintf (stderr, "Hit a non-gdbserver trap event.\n");
+ fprintf (stderr, "Hit a non-gdbserver trap event.\n");
}
/* Alright, we're going to report a stop. */
@@ -2970,7 +2971,7 @@ wait_for_sigstop (struct inferior_list_entry *entry)
if (WSTOPSIG (wstat) != SIGSTOP)
{
if (debug_threads)
- fprintf (stderr, "LWP %ld stopped with non-sigstop status %06x\n",
+ fprintf (stderr, "LWP %ld stopped with non-sigstop status 0x%x\n",
lwpid_of (lwp), wstat);
lwp->status_pending_p = 1;
@@ -3519,8 +3520,9 @@ need_step_over_p (struct inferior_list_entry *entry, void *dummy)
{
if (debug_threads)
fprintf (stderr,
- "Need step over [LWP %ld]? Ignoring, has pending status.\n",
- lwpid_of (lwp));
+ "Need step over [LWP %ld]? Ignoring, has pending status "
+ "0x%x.\n",
+ lwpid_of (lwp), lwp->status_pending);
return 0;
}
@@ -3927,8 +3929,9 @@ proceed_one_lwp (struct inferior_list_entry *entry, void *except)
if (lwp->status_pending_p)
{
if (debug_threads)
- fprintf (stderr, " LWP %ld has pending status, leaving stopped\n",
- lwpid_of (lwp));
+ fprintf (stderr, " LWP %ld has pending status 0x%x, "
+ "leaving stopped\n",
+ lwpid_of (lwp), lwp->status_pending);
return 0;
}
--
1.8.5.1