From: Doug Evans <dje@google.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 2/6] gdbserver: remove function abbrevs from debugging text
Date: Tue, 17 Dec 2013 21:43:00 -0000 [thread overview]
Message-ID: <yjt261qnupa6.fsf@ruffy.mtv.corp.google.com> (raw)
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
next reply other threads:[~2013-12-17 21:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-17 21:43 Doug Evans [this message]
2013-12-18 0:42 ` Yao Qi
2013-12-18 1:20 ` Doug Evans
2013-12-18 1:57 ` Yao Qi
2013-12-18 11:16 ` Pedro Alves
2013-12-18 15:13 ` Tom Tromey
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=yjt261qnupa6.fsf@ruffy.mtv.corp.google.com \
--to=dje@google.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