This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 2/6] gdbserver: remove function abbrevs from debugging text
- From: Doug Evans <dje at google dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 17 Dec 2013 13:43:29 -0800
- Subject: [PATCH 2/6] gdbserver: remove function abbrevs from debugging text
- Authentication-results: sourceware.org; auth=none
Hi.
This patch removes the function abbreviations from the debugging output.
In one example it's wrong (GPS vs get_detach_signal), and I rarely
keep in cache the translation to function name.
2013-12-17 Doug Evans <dje@google.com>
* linux-low.c (linux_kill_one_lwp): Replace LKL with linux_kill_one_lwp
in debugging printf.
(get_detach_signal): Replace GPS with get_detach_signal in debugging
printf. Remove extraneous "lwp" in output.
(cancel_breakpoint): Replace CB with get_detach_signal in debugging
printf.
(select_event_lwp): Replace SEL with select_event_lwp in debugging
printf.
---
gdb/gdbserver/linux-low.c | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 770ee16..464aaf0 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -899,7 +899,7 @@ linux_kill_one_lwp (struct lwp_info *lwp)
kill (pid, SIGKILL);
if (debug_threads)
fprintf (stderr,
- "LKL: kill (SIGKILL) %s, 0, 0 (%s)\n",
+ "linux_kill_one_lwp: kill (SIGKILL) %s, 0, 0 (%s)\n",
target_pid_to_str (ptid_of (lwp)),
errno ? strerror (errno) : "OK");
@@ -907,7 +907,7 @@ linux_kill_one_lwp (struct lwp_info *lwp)
ptrace (PTRACE_KILL, pid, (PTRACE_TYPE_ARG3) 0, (PTRACE_TYPE_ARG4) 0);
if (debug_threads)
fprintf (stderr,
- "LKL: PTRACE_KILL %s, 0, 0 (%s)\n",
+ "linux_kill_one_lwp: PTRACE_KILL %s, 0, 0 (%s)\n",
target_pid_to_str (ptid_of (lwp)),
errno ? strerror (errno) : "OK");
}
@@ -1032,7 +1032,8 @@ get_detach_signal (struct thread_info *thread)
{
if (debug_threads)
fprintf (stderr,
- "GPS: lwp %s hasn't stopped: no pending signal\n",
+ "get_detach_signal: %s hasn't stopped: "
+ "no pending signal\n",
target_pid_to_str (ptid_of (lp)));
return 0;
}
@@ -1042,7 +1043,7 @@ get_detach_signal (struct thread_info *thread)
{
if (debug_threads)
fprintf (stderr,
- "GPS: lwp %s had stopped with extended "
+ "get_detach_signal: %s had stopped with extended "
"status: no pending signal\n",
target_pid_to_str (ptid_of (lp)));
return 0;
@@ -1054,7 +1055,8 @@ get_detach_signal (struct thread_info *thread)
{
if (debug_threads)
fprintf (stderr,
- "GPS: lwp %s had signal %s, but it is in nopass state\n",
+ "get_detach_signal: %s had signal %s, but it is "
+ "in nopass state\n",
target_pid_to_str (ptid_of (lp)),
gdb_signal_to_string (signo));
return 0;
@@ -1067,7 +1069,7 @@ get_detach_signal (struct thread_info *thread)
{
if (debug_threads)
fprintf (stderr,
- "GPS: lwp %s had signal %s, "
+ "get_detach_signal: %s had signal %s, "
"but we don't know if we should pass it. Default to not.\n",
target_pid_to_str (ptid_of (lp)),
gdb_signal_to_string (signo));
@@ -1077,7 +1079,8 @@ get_detach_signal (struct thread_info *thread)
{
if (debug_threads)
fprintf (stderr,
- "GPS: lwp %s has pending signal %s: delivering it.\n",
+ "get_detach_signal: %s has pending signal %s: "
+ "delivering it.\n",
target_pid_to_str (ptid_of (lp)),
gdb_signal_to_string (signo));
@@ -1735,7 +1738,7 @@ cancel_breakpoint (struct lwp_info *lwp)
{
if (debug_threads)
fprintf (stderr,
- "CB: Push back breakpoint for %s\n",
+ "cancel_breakpoint: Push back breakpoint for %s\n",
target_pid_to_str (ptid_of (lwp)));
/* Back up the PC if necessary. */
@@ -1753,7 +1756,7 @@ cancel_breakpoint (struct lwp_info *lwp)
{
if (debug_threads)
fprintf (stderr,
- "CB: No breakpoint found at %s for [%s]\n",
+ "cancel_breakpoint: No breakpoint found at %s for [%s]\n",
paddress (lwp->stop_pc),
target_pid_to_str (ptid_of (lwp)));
}
@@ -2083,7 +2086,7 @@ select_event_lwp (struct lwp_info **orig_lp)
{
if (debug_threads)
fprintf (stderr,
- "SEL: Select single-step %s\n",
+ "select_event_lwp: Select single-step %s\n",
target_pid_to_str (ptid_of (event_lp)));
}
else
@@ -2100,7 +2103,7 @@ select_event_lwp (struct lwp_info **orig_lp)
if (debug_threads && num_events > 1)
fprintf (stderr,
- "SEL: Found %d SIGTRAP events, selecting #%d\n",
+ "select_event_lwp: Found %d SIGTRAP events, selecting #%d\n",
num_events, random_selector);
event_lp = (struct lwp_info *) find_inferior (&all_lwps,
--
1.8.5.1