From 8864ef428d92e58b48ec11136d3b91622345c838 Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Wed, 22 Dec 2021 15:33:38 +0000 Subject: [PATCH] gdb: rename lin-lwp to linux-nat in set/show debug Rename 'set debug lin-lwp' to 'set debug linux-nat' and 'show debug lin-lwp' to 'show debug linux-nat'. I've updated the documentation and help text to match, as well as making it clear that the debug that is coming out relates to all aspects of Linux native inferior support, not just the LWP aspect of it. The boundary between general "native" target debug, and the lwp specific part of that debug was always a little blurry, but the actual debug variable inside GDB is debug_linux_nat, and the print routine linux_nat_debug_printf, is used throughout the linux-nat.c file, not just for lwp related debug, so the new name seems to make more sense. --- gdb/NEWS | 12 ++++++++++++ gdb/doc/gdb.texinfo | 12 ++++++------ gdb/linux-nat.c | 6 +++--- gdb/testsuite/gdb.threads/ia64-sigill.exp | 2 +- 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/gdb/NEWS b/gdb/NEWS index c26e15b530a..ad80e92700e 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -64,6 +64,12 @@ set debug threads on|off show debug threads Print additional debug messages about thread creation and deletion. +set debug linux-nat on|off +show debug linux-nat + These new commands replaced the old 'set debug lin-lwp' and 'show + debug lin-lwp' respectively. Turning this setting on prints debug + messages relating to GDB's handling of native Linux inferiors. + * Changed commands maint packet @@ -79,6 +85,12 @@ clone-inferior environment' or 'unset environment' commands are also copied to the new inferior. +set debug lin-lwp on|off +show debug lin-lwp + These commands have been removed from GDB. The new command 'set + debug linux-nat' and 'show debug linux-nat' should be used + instead. + * Python API ** New function gdb.add_history(), which takes a gdb.Value object diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 48873aa34fe..e39815d5132 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -27028,12 +27028,12 @@ Turn on or off debugging messages from JIT debug support. @item show debug jit Displays the current state of @value{GDBN} JIT debugging. -@item set debug lin-lwp -@cindex @sc{gnu}/Linux LWP debug messages -@cindex Linux lightweight processes -Turn on or off debugging messages from the Linux LWP debug support. -@item show debug lin-lwp -Show the current state of Linux LWP debugging messages. +@item set debug linux-nat @r{[}on@r{|}off@r{]} +@cindex @sc{gnu}/Linux native target debug messages +@cindex Linux native targets +Turn on or off debugging messages from the Linux native target debug support. +@item show debug linux-nat +Show the current state of Linux native target debugging messages. @item set debug linux-namespaces @cindex @sc{gnu}/Linux namespaces debug messages diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index 2271cbf1532..b926fb5eba9 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -195,13 +195,13 @@ enum tribool have_ptrace_getregset = TRIBOOL_UNKNOWN; static bool debug_linux_nat; -/* Implement 'show debug lin-lwp'. */ +/* Implement 'show debug linux-nat'. */ static void show_debug_linux_nat (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Debugging of GNU/Linux lwp module is %s.\n"), + fprintf_filtered (file, _("Debugging of GNU/Linux native targets is %s.\n"), value); } @@ -4529,7 +4529,7 @@ void _initialize_linux_nat (); void _initialize_linux_nat () { - add_setshow_boolean_cmd ("lin-lwp", class_maintenance, + add_setshow_boolean_cmd ("linux-nat", class_maintenance, &debug_linux_nat, _("\ Set debugging of GNU/Linux native target."), _(" \ Show debugging of GNU/Linux native target."), _(" \ diff --git a/gdb/testsuite/gdb.threads/ia64-sigill.exp b/gdb/testsuite/gdb.threads/ia64-sigill.exp index 89b684064df..e92b4877b2c 100644 --- a/gdb/testsuite/gdb.threads/ia64-sigill.exp +++ b/gdb/testsuite/gdb.threads/ia64-sigill.exp @@ -55,7 +55,7 @@ gdb_breakpoint [gdb_get_line_number "break-at-exit"] gdb_test_no_output "set debug infrun 1" -# The ia64 SIGILL signal is visible only in the lin-lwp debug. +# The ia64 SIGILL signal is visible only in the linux-nat debug output. set prompt "$gdb_prompt \\\[infrun\\\] fetch_inferior_event: exit\r\n$" gdb_test_multiple "continue" "continue" -prompt $prompt { -- 2.30.2