aboutsummaryrefslogtreecommitdiff
path: root/gdb/sol-thread.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2013-05-08 06:23:50 +0000
committerJoel Brobecker <brobecker@gnat.com>2013-05-08 06:23:50 +0000
commitc0f5f490449dcb8de9f22facc0c4dd8d6a442dca (patch)
tree809590e82e4ce1a48bfa5a2f62792608d7acf1b0 /gdb/sol-thread.c
parent5d74e06193a226af8e14b6bf3530237c6a731418 (diff)
downloadgdb-c0f5f490449dcb8de9f22facc0c4dd8d6a442dca.zip
gdb-c0f5f490449dcb8de9f22facc0c4dd8d6a442dca.tar.gz
gdb-c0f5f490449dcb8de9f22facc0c4dd8d6a442dca.tar.bz2
Improve output of "maintenance info sol-threads" command.
This patch does the following: - Puts the startfunc and "Sleep func" info on the same line; - Renames "Sleep func" into "sleepfunc" to be consistent with "startfunc" - Avoids the use of a '-' as a separate before the "sleepfunc" output, because the '-' looks odd and out of place when the "startfunc" field is not printed (ti.ti_startfunc is nul). - Use a '=' instead of ':' and avoids the space between the name of the value and its value, mostly to help group the value with its name. For the record, this is how the new outout now looks like: (gdb) maintenance info sol-threads user thread #1, lwp 1, (active) system thread #2, lwp 2, (active) system thread #3, lwp 0, (asleep) sleepfunc=0xff32d9e0 user thread #4, lwp 4, (asleep) startfunc=[...].task_wrapper sleepfunc=0xff3290f0 system thread #5, lwp 7, (active) startfunc=_co_timerset user thread #6, lwp 8, (active) startfunc=[...].task_wrapper gdb/ChangeLog: * sol-thread.c (info_cb): Rework the output of the "maintenance info sol-threads" command a bit.
Diffstat (limited to 'gdb/sol-thread.c')
-rw-r--r--gdb/sol-thread.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c
index 6faf91d..c16ad98 100644
--- a/gdb/sol-thread.c
+++ b/gdb/sol-thread.c
@@ -1119,10 +1119,10 @@ info_cb (const td_thrhandle_t *th, void *s)
= lookup_minimal_symbol_by_pc (ti.ti_startfunc);
if (msym.minsym)
- printf_filtered (" startfunc: %s\n",
+ printf_filtered (" startfunc=%s",
SYMBOL_PRINT_NAME (msym.minsym));
else
- printf_filtered (" startfunc: %s\n",
+ printf_filtered (" startfunc=%s",
paddress (target_gdbarch (), ti.ti_startfunc));
}
@@ -1133,16 +1133,14 @@ info_cb (const td_thrhandle_t *th, void *s)
= lookup_minimal_symbol_by_pc (ti.ti_pc);
if (msym.minsym)
- printf_filtered (" - Sleep func: %s\n",
+ printf_filtered (" sleepfunc=%s",
SYMBOL_PRINT_NAME (msym.minsym));
else
- printf_filtered (" - Sleep func: %s\n",
+ printf_filtered (" sleepfunc=%s",
paddress (target_gdbarch (), ti.ti_pc));
}
- /* Wrap up line, if necessary. */
- if (ti.ti_state != TD_THR_SLEEP && ti.ti_startfunc == 0)
- printf_filtered ("\n"); /* don't you hate counting newlines? */
+ printf_filtered ("\n");
}
else
warning (_("info sol-thread: failed to get info for thread."));