public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Rename Windows debug settings
@ 2022-04-27 18:32 Tom Tromey
  2022-04-27 18:45 ` Eli Zaretskii
  2022-04-27 18:50 ` Pedro Alves
  0 siblings, 2 replies; 4+ messages in thread
From: Tom Tromey @ 2022-04-27 18:32 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

The Windows-specific debug settings, like "debugevents", have long
bothered me because they don't follow current GDB conventions.  It
seems better to put these commands underneat the existing "set debug"
namespace.

Because these are for debug logging only, I don't think a
compatibility alias is necessary.
---
 gdb/NEWS            | 12 ++++++++++++
 gdb/doc/gdb.texinfo | 16 ++++++++--------
 gdb/windows-nat.c   | 16 ++++++++--------
 3 files changed, 28 insertions(+), 16 deletions(-)

diff --git a/gdb/NEWS b/gdb/NEWS
index 982f4a1a18c..b9e330bb260 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -30,6 +30,18 @@ maintenance info line-table
   entry corresponds to an address where a breakpoint should be placed
   to be at the first instruction past a function's prologue.
 
+set debug exec
+show debug exec
+set debug events
+show debug events
+set debug memory
+show debug memory
+set debug exceptions
+show debug exceptions
+  These Windows-specific commands have been renamed to be more
+  consistent with GDB conventions.  The old names did not have a
+  space, e.g., "debugeexec".
+
 * Python API
 
   ** New function gdb.format_address(ADDRESS, PROGSPACE, ARCHITECTURE),
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 38ad2ac32b0..c58e1e79a50 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -24605,26 +24605,26 @@ This affects the way the Windows OS handles
 @item show new-group
 Displays current value of new-group boolean.
 
-@kindex set debugevents
-@item set debugevents
+@kindex set debug events
+@item set debug events
 This boolean value adds debug output concerning kernel events related
 to the debuggee seen by the debugger.  This includes events that
 signal thread and process creation and exit, DLL loading and
 unloading, console interrupts, and debugging messages produced by the
 Windows @code{OutputDebugString} API call.
 
-@kindex set debugexec
-@item set debugexec
+@kindex set debug exec
+@item set debug exec
 This boolean value adds debug output concerning execute events
 (such as resume thread) seen by the debugger.
 
-@kindex set debugexceptions
-@item set debugexceptions
+@kindex set debug exceptions
+@item set debug exceptions
 This boolean value adds debug output concerning exceptions in the
 debuggee seen by the debugger.
 
-@kindex set debugmemory
-@item set debugmemory
+@kindex set debug memory
+@item set debug memory
 This boolean value adds debug output concerning debuggee memory reads
 and writes by the debugger.
 
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 1068558cd21..b4342b359ab 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -3062,34 +3062,34 @@ Show creation of new group when creating child process."), NULL,
 			   NULL, /* FIXME: i18n: */
 			   &setlist, &showlist);
 
-  add_setshow_boolean_cmd ("debugexec", class_support, &debug_exec, _("\
+  add_setshow_boolean_cmd ("exec", class_support, &debug_exec, _("\
 Set whether to display execution in child process."), _("\
 Show whether to display execution in child process."), NULL,
 			   NULL,
 			   NULL, /* FIXME: i18n: */
-			   &setlist, &showlist);
+			   &setdebuglist, &showdebuglist);
 
-  add_setshow_boolean_cmd ("debugevents", class_support, &debug_events, _("\
+  add_setshow_boolean_cmd ("events", class_support, &debug_events, _("\
 Set whether to display kernel events in child process."), _("\
 Show whether to display kernel events in child process."), NULL,
 			   NULL,
 			   NULL, /* FIXME: i18n: */
-			   &setlist, &showlist);
+			   &setdebuglist, &showdebuglist);
 
-  add_setshow_boolean_cmd ("debugmemory", class_support, &debug_memory, _("\
+  add_setshow_boolean_cmd ("memory", class_support, &debug_memory, _("\
 Set whether to display memory accesses in child process."), _("\
 Show whether to display memory accesses in child process."), NULL,
 			   NULL,
 			   NULL, /* FIXME: i18n: */
-			   &setlist, &showlist);
+			   &setdebuglist, &showdebuglist);
 
-  add_setshow_boolean_cmd ("debugexceptions", class_support,
+  add_setshow_boolean_cmd ("exceptions", class_support,
 			   &debug_exceptions, _("\
 Set whether to display kernel exceptions in child process."), _("\
 Show whether to display kernel exceptions in child process."), NULL,
 			   NULL,
 			   NULL, /* FIXME: i18n: */
-			   &setlist, &showlist);
+			   &setdebuglist, &showdebuglist);
 
   init_w32_command_list ();
 
-- 
2.34.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Rename Windows debug settings
  2022-04-27 18:32 [PATCH] Rename Windows debug settings Tom Tromey
@ 2022-04-27 18:45 ` Eli Zaretskii
  2022-04-27 18:50 ` Pedro Alves
  1 sibling, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2022-04-27 18:45 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches

> Date: Wed, 27 Apr 2022 12:32:40 -0600
> From: Tom Tromey via Gdb-patches <gdb-patches@sourceware.org>
> Cc: Tom Tromey <tromey@adacore.com>
> 
> The Windows-specific debug settings, like "debugevents", have long
> bothered me because they don't follow current GDB conventions.  It
> seems better to put these commands underneat the existing "set debug"
> namespace.
> 
> Because these are for debug logging only, I don't think a
> compatibility alias is necessary.

I'm not sure I agree, FWIW.  Why not introduce the new names without
removing the old, and schedule the removal for some future release?

>  gdb/NEWS            | 12 ++++++++++++
>  gdb/doc/gdb.texinfo | 16 ++++++++--------
>  gdb/windows-nat.c   | 16 ++++++++--------
>  3 files changed, 28 insertions(+), 16 deletions(-)

The documentation parts are OK, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Rename Windows debug settings
  2022-04-27 18:32 [PATCH] Rename Windows debug settings Tom Tromey
  2022-04-27 18:45 ` Eli Zaretskii
@ 2022-04-27 18:50 ` Pedro Alves
  2022-04-27 19:04   ` John Baldwin
  1 sibling, 1 reply; 4+ messages in thread
From: Pedro Alves @ 2022-04-27 18:50 UTC (permalink / raw)
  To: Tom Tromey, gdb-patches

On 2022-04-27 19:32, Tom Tromey via Gdb-patches wrote:
>  
> +set debug exec
> +show debug exec
> +set debug events
> +show debug events
> +set debug memory
> +show debug memory
> +set debug exceptions
> +show debug exceptions
> +  These Windows-specific commands have been renamed to be more
> +  consistent with GDB conventions.  The old names did not have a
> +  space, e.g., "debugeexec".
> +

If we're renaming then, I'd suggest making them subcommands of an umbrella
command, like "set debug windows exec", "set debug windows events" etc.
The names you propose are a bit too generic and could potentially conflict
with other debug settings in the future, IMHO.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Rename Windows debug settings
  2022-04-27 18:50 ` Pedro Alves
@ 2022-04-27 19:04   ` John Baldwin
  0 siblings, 0 replies; 4+ messages in thread
From: John Baldwin @ 2022-04-27 19:04 UTC (permalink / raw)
  To: Pedro Alves, Tom Tromey, gdb-patches

On 4/27/22 11:50 AM, Pedro Alves wrote:
> On 2022-04-27 19:32, Tom Tromey via Gdb-patches wrote:
>>   
>> +set debug exec
>> +show debug exec
>> +set debug events
>> +show debug events
>> +set debug memory
>> +show debug memory
>> +set debug exceptions
>> +show debug exceptions
>> +  These Windows-specific commands have been renamed to be more
>> +  consistent with GDB conventions.  The old names did not have a
>> +  space, e.g., "debugeexec".
>> +
> 
> If we're renaming then, I'd suggest making them subcommands of an umbrella
> command, like "set debug windows exec", "set debug windows events" etc.
> The names you propose are a bit too generic and could potentially conflict
> with other debug settings in the future, IMHO.

+1

Note that we currently have things like 'set/show debug linux-nat' and
'set/show debug fbsd-nat' (also linux-namespaces and fbsd-lwp), so
using 'set/show debug windows-<foo>' would seem to be more consistent
with some of our other native targets.

-- 
John Baldwin

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-04-27 19:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-27 18:32 [PATCH] Rename Windows debug settings Tom Tromey
2022-04-27 18:45 ` Eli Zaretskii
2022-04-27 18:50 ` Pedro Alves
2022-04-27 19:04   ` John Baldwin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).