* [PATCH] Display configuration details in --help
@ 2013-03-20 17:46 Eli Zaretskii
2013-03-21 18:00 ` Doug Evans
0 siblings, 1 reply; 39+ messages in thread
From: Eli Zaretskii @ 2013-03-20 17:46 UTC (permalink / raw)
To: gdb-patches
GDB has a lot of configuration options, but once you've built and
installed it, it is hard to know which ones where specified and/or
auto-detected, and which weren't. And if you, like me, keep several
prior versions of GDB around, but not necessarily keep their build
trees, about the only way to find out these configuration details is
by using 'strings' or by running GDB under a debugger, which is really
gross and also inefficient.
So I made a patch to display the important configuration parameters as
part of --help. The patched GDB produces information like this on my
system:
This GDB is configured as follows:
configure --host=i686-pc-mingw32 --target=i686-pc-mingw32
--with-auto-load-dir=$debugdir:$datadir/auto-load
--with-auto-load-safe-path=$debugdir:$datadir/auto-load
--with-expat
--with-gdb-datadir=d:/usr/share/gdb (relocatable)
--with-jit-reader-dir=d:/usr/lib/gdb (relocatable)
--without-libunwind-ia64
--with-lzma
--with-python=d:/usr/Python26 (relocatable)
--with-separate-debug-dir=d:/usr/lib/debug (relocatable)
--with-system-gdbinit=d:/usr/etc/gdbinit (relocatable)
--with-zlib
I think this will also be useful for when users report problems,
because some solutions depend on how GDB was configured.
Do people think this will be useful? The patch is below.
2013-03-20 Eli Zaretskii <eliz@gnu.org>
* main.c (print_gdb_help): Display configuration details.
--- gdb/main.c~1 2013-03-20 13:15:01.737639100 +0200
+++ gdb/main.c 2013-03-20 19:27:51.103852400 +0200
@@ -48,6 +48,8 @@
#include "windows-nat.h"
#endif
+#include "version.h"
+
/* The selected interpreter. This will be used as a set command
variable, so it should always be malloc'ed - since
do_setshow_command will free it. */
@@ -1142,6 +1144,85 @@
--write Set writing into executable and core files.\n\
--xdb XDB compatibility mode.\n\
"), stream);
+ fprintf_unfiltered (stream, _("\n\
+This GDB is configured as follows:\n\
+ configure --host=%s --target=%s\n\
+"), host_name, target_name);
+ fprintf_unfiltered (stream, _("\
+ --with-auto-load-dir=%s\n\
+ --with-auto-load-safe-path=%s\n\
+"), AUTO_LOAD_DIR, AUTO_LOAD_SAFE_PATH);
+#if HAVE_LIBEXPAT
+ fprintf_unfiltered (stream, _("\
+ --with-expat\n\
+"));
+#else
+ fprintf_unfiltered (stream, _("\
+ --without-expat\n\
+"));
+#endif
+ if (GDB_DATADIR[0])
+ fprintf_unfiltered (stream, _("\
+ --with-gdb-datadir=%s%s\n\
+"), GDB_DATADIR, GDB_DATADIR_RELOCATABLE ? " (relocatable)" : "");
+#ifdef ICONV_BIN
+ fprintf_unfiltered (stream, _("\
+ --with-iconv-bin=%s%s\n\
+"), ICONV_BIN, ICONV_BIN_RELOCATABLE ? " (relocatable)" : "");
+#endif
+ if (JIT_READER_DIR[0])
+ fprintf_unfiltered (stream, _("\
+ --with-jit-reader-dir=%s%s\n\
+"), JIT_READER_DIR, JIT_READER_DIR_RELOCATABLE ? " (relocatable)" : "");
+#if HAVE_LIBUNWIND_IA64_H
+ fprintf_unfiltered (stream, _("\
+ --with-libunwind-ia64\n\
+"));
+#else
+ fprintf_unfiltered (stream, _("\
+ --without-libunwind-ia64\n\
+"));
+#endif
+#if HAVE_LIBLZMA
+ fprintf_unfiltered (stream, _("\
+ --with-lzma\n\
+"));
+#else
+ fprintf_unfiltered (stream, _("\
+ --without-lzma\n\
+"));
+#endif
+#ifdef WITH_PYTHON_PATH
+ fprintf_unfiltered (stream, _("\
+ --with-python=%s%s\n\
+"), WITH_PYTHON_PATH, PYTHON_PATH_RELOCATABLE ? " (relocatable)" : "");
+#endif
+#ifdef RELOC_SRCDIR
+ fprintf_unfiltered (stream, _("\
+ --with-relocated-sources=%s\n\
+"), RELOC_SRCDIR);
+#endif
+ if (DEBUGDIR[0])
+ fprintf_unfiltered (stream, _("\
+ --with-separate-debug-dir=%s%s\n\
+"), DEBUGDIR, DEBUGDIR_RELOCATABLE ? " (relocatable)" : "");
+ if (TARGET_SYSTEM_ROOT[0])
+ fprintf_unfiltered (stream, _("\
+ --with-sysroot=%s%s\n\
+"), TARGET_SYSTEM_ROOT, TARGET_SYSTEM_ROOT_RELOCATABLE ? " (relocatable)" : "");
+ if (SYSTEM_GDBINIT[0])
+ fprintf_unfiltered (stream, _("\
+ --with-system-gdbinit=%s%s\n\
+"), SYSTEM_GDBINIT, SYSTEM_GDBINIT_RELOCATABLE ? " (relocatable)" : "");
+#if HAVE_ZLIB_H
+ fprintf_unfiltered (stream, _("\
+ --with-zlib\n\
+"));
+#else
+ fprintf_unfiltered (stream, _("\
+ --without-zlib\n\
+"));
+#endif
fputs_unfiltered (_("\n\
At startup, GDB reads the following init files and executes their commands:\n\
"), stream);
^ permalink raw reply [flat|nested] 39+ messages in thread* Re: [PATCH] Display configuration details in --help 2013-03-20 17:46 [PATCH] Display configuration details in --help Eli Zaretskii @ 2013-03-21 18:00 ` Doug Evans 2013-03-21 18:25 ` Pedro Alves 2013-03-21 18:53 ` Eli Zaretskii 0 siblings, 2 replies; 39+ messages in thread From: Doug Evans @ 2013-03-21 18:00 UTC (permalink / raw) To: Eli Zaretskii; +Cc: gdb-patches On Wed, Mar 20, 2013 at 10:39 AM, Eli Zaretskii <eliz@gnu.org> wrote: > GDB has a lot of configuration options, but once you've built and > installed it, it is hard to know which ones where specified and/or > auto-detected, and which weren't. And if you, like me, keep several > prior versions of GDB around, but not necessarily keep their build > trees, about the only way to find out these configuration details is > by using 'strings' or by running GDB under a debugger, which is really > gross and also inefficient. > > So I made a patch to display the important configuration parameters as > part of --help. The patched GDB produces information like this on my > system: > > This GDB is configured as follows: > configure --host=i686-pc-mingw32 --target=i686-pc-mingw32 > --with-auto-load-dir=$debugdir:$datadir/auto-load > --with-auto-load-safe-path=$debugdir:$datadir/auto-load > --with-expat > --with-gdb-datadir=d:/usr/share/gdb (relocatable) > --with-jit-reader-dir=d:/usr/lib/gdb (relocatable) > --without-libunwind-ia64 > --with-lzma > --with-python=d:/usr/Python26 (relocatable) > --with-separate-debug-dir=d:/usr/lib/debug (relocatable) > --with-system-gdbinit=d:/usr/etc/gdbinit (relocatable) > --with-zlib > > I think this will also be useful for when users report problems, > because some solutions depend on how GDB was configured. > > Do people think this will be useful? The patch is below. > > 2013-03-20 Eli Zaretskii <eliz@gnu.org> > > * main.c (print_gdb_help): Display configuration details. > > > --- gdb/main.c~1 2013-03-20 13:15:01.737639100 +0200 > +++ gdb/main.c 2013-03-20 19:27:51.103852400 +0200 > @@ -48,6 +48,8 @@ > #include "windows-nat.h" > #endif > > +#include "version.h" > + > /* The selected interpreter. This will be used as a set command > variable, so it should always be malloc'ed - since > do_setshow_command will free it. */ > @@ -1142,6 +1144,85 @@ > --write Set writing into executable and core files.\n\ > --xdb XDB compatibility mode.\n\ > "), stream); > + fprintf_unfiltered (stream, _("\n\ > +This GDB is configured as follows:\n\ > + configure --host=%s --target=%s\n\ > +"), host_name, target_name); > + fprintf_unfiltered (stream, _("\ > + --with-auto-load-dir=%s\n\ > + --with-auto-load-safe-path=%s\n\ > +"), AUTO_LOAD_DIR, AUTO_LOAD_SAFE_PATH); > +#if HAVE_LIBEXPAT > + fprintf_unfiltered (stream, _("\ > + --with-expat\n\ > +")); > +#else > + fprintf_unfiltered (stream, _("\ > + --without-expat\n\ > +")); > +#endif > + if (GDB_DATADIR[0]) > + fprintf_unfiltered (stream, _("\ > + --with-gdb-datadir=%s%s\n\ > +"), GDB_DATADIR, GDB_DATADIR_RELOCATABLE ? " (relocatable)" : ""); > +#ifdef ICONV_BIN > + fprintf_unfiltered (stream, _("\ > + --with-iconv-bin=%s%s\n\ > +"), ICONV_BIN, ICONV_BIN_RELOCATABLE ? " (relocatable)" : ""); > +#endif > + if (JIT_READER_DIR[0]) > + fprintf_unfiltered (stream, _("\ > + --with-jit-reader-dir=%s%s\n\ > +"), JIT_READER_DIR, JIT_READER_DIR_RELOCATABLE ? " (relocatable)" : ""); > +#if HAVE_LIBUNWIND_IA64_H > + fprintf_unfiltered (stream, _("\ > + --with-libunwind-ia64\n\ > +")); > +#else > + fprintf_unfiltered (stream, _("\ > + --without-libunwind-ia64\n\ > +")); > +#endif > +#if HAVE_LIBLZMA > + fprintf_unfiltered (stream, _("\ > + --with-lzma\n\ > +")); > +#else > + fprintf_unfiltered (stream, _("\ > + --without-lzma\n\ > +")); > +#endif > +#ifdef WITH_PYTHON_PATH > + fprintf_unfiltered (stream, _("\ > + --with-python=%s%s\n\ > +"), WITH_PYTHON_PATH, PYTHON_PATH_RELOCATABLE ? " (relocatable)" : ""); > +#endif > +#ifdef RELOC_SRCDIR > + fprintf_unfiltered (stream, _("\ > + --with-relocated-sources=%s\n\ > +"), RELOC_SRCDIR); > +#endif > + if (DEBUGDIR[0]) > + fprintf_unfiltered (stream, _("\ > + --with-separate-debug-dir=%s%s\n\ > +"), DEBUGDIR, DEBUGDIR_RELOCATABLE ? " (relocatable)" : ""); > + if (TARGET_SYSTEM_ROOT[0]) > + fprintf_unfiltered (stream, _("\ > + --with-sysroot=%s%s\n\ > +"), TARGET_SYSTEM_ROOT, TARGET_SYSTEM_ROOT_RELOCATABLE ? " (relocatable)" : ""); > + if (SYSTEM_GDBINIT[0]) > + fprintf_unfiltered (stream, _("\ > + --with-system-gdbinit=%s%s\n\ > +"), SYSTEM_GDBINIT, SYSTEM_GDBINIT_RELOCATABLE ? " (relocatable)" : ""); > +#if HAVE_ZLIB_H > + fprintf_unfiltered (stream, _("\ > + --with-zlib\n\ > +")); > +#else > + fprintf_unfiltered (stream, _("\ > + --without-zlib\n\ > +")); > +#endif > fputs_unfiltered (_("\n\ > At startup, GDB reads the following init files and executes their commands:\n\ > "), stream); Hi. I like the idea, but the implementation imposes a future maintenance burden. Would it be sufficient to just store the original string somewhere and print that? I believe that's what gcc does (at least it's configure.ac that computes a string and saves that in a global, and gcc just prints that global, instead of a series of #if/#ifdefs). ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Display configuration details in --help 2013-03-21 18:00 ` Doug Evans @ 2013-03-21 18:25 ` Pedro Alves 2013-03-21 18:29 ` Joel Brobecker 2013-03-21 18:44 ` Eli Zaretskii 2013-03-21 18:53 ` Eli Zaretskii 1 sibling, 2 replies; 39+ messages in thread From: Pedro Alves @ 2013-03-21 18:25 UTC (permalink / raw) To: Doug Evans; +Cc: Eli Zaretskii, gdb-patches On 03/21/2013 05:54 PM, Doug Evans wrote: > Hi. I like the idea, but the implementation imposes a future > maintenance burden. > Would it be sufficient to just store the original string somewhere and > print that? > I believe that's what gcc does (at least it's configure.ac that > computes a string and saves that in a global, and gcc just prints that > global, instead of a series of #if/#ifdefs). Speaking of gcc, gcc also doesn't put it in --help, but rather in -v. While I like the idea too, it looks to me that this >> This GDB is configured as follows: >> configure --host=i686-pc-mingw32 --target=i686-pc-mingw32 >> --with-auto-load-dir=$debugdir:$datadir/auto-load >> --with-auto-load-safe-path=$debugdir:$datadir/auto-load >> --with-expat >> --with-gdb-datadir=d:/usr/share/gdb (relocatable) >> --with-jit-reader-dir=d:/usr/lib/gdb (relocatable) >> --without-libunwind-ia64 >> --with-lzma >> --with-python=d:/usr/Python26 (relocatable) >> --with-separate-debug-dir=d:/usr/lib/debug (relocatable) >> --with-system-gdbinit=d:/usr/etc/gdbinit (relocatable) >> --with-zlib >> >> is a significant amount of clutter for gdb's --help. What do you think about putting this elsewhere? "gdb --configuration" or some such, perhaps? -- Pedro Alves ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Display configuration details in --help 2013-03-21 18:25 ` Pedro Alves @ 2013-03-21 18:29 ` Joel Brobecker 2013-03-21 18:44 ` Eli Zaretskii 1 sibling, 0 replies; 39+ messages in thread From: Joel Brobecker @ 2013-03-21 18:29 UTC (permalink / raw) To: Pedro Alves; +Cc: Doug Evans, Eli Zaretskii, gdb-patches > What do you think about putting this elsewhere? "gdb --configuration" > or some such, perhaps? Yes, please. I'd rather we have a separate option for displaying this piece of information. -- Joel ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Display configuration details in --help 2013-03-21 18:25 ` Pedro Alves 2013-03-21 18:29 ` Joel Brobecker @ 2013-03-21 18:44 ` Eli Zaretskii 2013-03-21 19:11 ` Joel Brobecker 1 sibling, 1 reply; 39+ messages in thread From: Eli Zaretskii @ 2013-03-21 18:44 UTC (permalink / raw) To: Pedro Alves; +Cc: dje, gdb-patches > Date: Thu, 21 Mar 2013 18:00:35 +0000 > From: Pedro Alves <palves@redhat.com> > CC: Eli Zaretskii <eliz@gnu.org>, gdb-patches <gdb-patches@sourceware.org> > > While I like the idea too, it looks to me that this > > >> This GDB is configured as follows: > >> configure --host=i686-pc-mingw32 --target=i686-pc-mingw32 > >> --with-auto-load-dir=$debugdir:$datadir/auto-load > >> --with-auto-load-safe-path=$debugdir:$datadir/auto-load > >> --with-expat > >> --with-gdb-datadir=d:/usr/share/gdb (relocatable) > >> --with-jit-reader-dir=d:/usr/lib/gdb (relocatable) > >> --without-libunwind-ia64 > >> --with-lzma > >> --with-python=d:/usr/Python26 (relocatable) > >> --with-separate-debug-dir=d:/usr/lib/debug (relocatable) > >> --with-system-gdbinit=d:/usr/etc/gdbinit (relocatable) > >> --with-zlib > >> > >> > > is a significant amount of clutter for gdb's --help. > > What do you think about putting this elsewhere? "gdb --configuration" > or some such, perhaps? Fine with me, I can prepare a patch for that, if no one objects. Should we also move this part to the new switch? At startup, GDB reads the following init files and executes their commands: * user-specific init file: D:\usr\eli/.gdbinit * local init file (see also 'set auto-load local-gdbinit'): ./.gdbinit ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Display configuration details in --help 2013-03-21 18:44 ` Eli Zaretskii @ 2013-03-21 19:11 ` Joel Brobecker 2013-03-21 20:39 ` Eli Zaretskii 0 siblings, 1 reply; 39+ messages in thread From: Joel Brobecker @ 2013-03-21 19:11 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Pedro Alves, dje, gdb-patches > Should we also move this part to the new switch? > > At startup, GDB reads the following init files and executes their commands: > * user-specific init file: D:\usr\eli/.gdbinit > * local init file (see also 'set auto-load local-gdbinit'): ./.gdbinit Ha! That looks nice too! Thanks Eli, -- Joel ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Display configuration details in --help 2013-03-21 19:11 ` Joel Brobecker @ 2013-03-21 20:39 ` Eli Zaretskii 2013-03-21 20:55 ` Joel Brobecker 0 siblings, 1 reply; 39+ messages in thread From: Eli Zaretskii @ 2013-03-21 20:39 UTC (permalink / raw) To: Joel Brobecker; +Cc: palves, dje, gdb-patches > Date: Thu, 21 Mar 2013 12:10:51 -0700 > From: Joel Brobecker <brobecker@adacore.com> > Cc: Pedro Alves <palves@redhat.com>, dje@google.com, > gdb-patches@sourceware.org > > > Should we also move this part to the new switch? > > > > At startup, GDB reads the following init files and executes their commands: > > * user-specific init file: D:\usr\eli/.gdbinit > > * local init file (see also 'set auto-load local-gdbinit'): ./.gdbinit > > Ha! That looks nice too! > > Thanks Eli, That's Jan's code, and it is already in the sources. I just asked whether it should be moved from --help to the new option. ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Display configuration details in --help 2013-03-21 20:39 ` Eli Zaretskii @ 2013-03-21 20:55 ` Joel Brobecker 2013-03-21 21:17 ` Tom Tromey 0 siblings, 1 reply; 39+ messages in thread From: Joel Brobecker @ 2013-03-21 20:55 UTC (permalink / raw) To: Eli Zaretskii; +Cc: palves, dje, gdb-patches > That's Jan's code, and it is already in the sources. I just asked > whether it should be moved from --help to the new option. Oops! :-/. FWIW, I think having it in --help seems to be the most logical location for that piece of information, but I don't have a strong opinion on this. -- Joel ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Display configuration details in --help 2013-03-21 20:55 ` Joel Brobecker @ 2013-03-21 21:17 ` Tom Tromey 2013-03-21 22:23 ` Eli Zaretskii 0 siblings, 1 reply; 39+ messages in thread From: Tom Tromey @ 2013-03-21 21:17 UTC (permalink / raw) To: Joel Brobecker; +Cc: Eli Zaretskii, palves, dje, gdb-patches >>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes: >> That's Jan's code, and it is already in the sources. I just asked >> whether it should be moved from --help to the new option. Joel> Oops! :-/. FWIW, I think having it in --help seems to be the most Joel> logical location for that piece of information, but I don't have Joel> a strong opinion on this. I agree. For the new information, "show configuration" might also be nice to have. It would not be much more code and would let people see the info for the gdb they are currently using. Tom ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Display configuration details in --help 2013-03-21 21:17 ` Tom Tromey @ 2013-03-21 22:23 ` Eli Zaretskii 2013-04-09 19:31 ` Eli Zaretskii 0 siblings, 1 reply; 39+ messages in thread From: Eli Zaretskii @ 2013-03-21 22:23 UTC (permalink / raw) To: Tom Tromey; +Cc: brobecker, palves, dje, gdb-patches > From: Tom Tromey <tromey@redhat.com> > Cc: Eli Zaretskii <eliz@gnu.org>, palves@redhat.com, dje@google.com, > gdb-patches@sourceware.org > Date: Thu, 21 Mar 2013 14:58:03 -0600 > > For the new information, "show configuration" might also be nice to have. > It would not be much more code and would let people see the info for the > gdb they are currently using. OK, will do. ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Display configuration details in --help 2013-03-21 22:23 ` Eli Zaretskii @ 2013-04-09 19:31 ` Eli Zaretskii 2013-04-09 19:46 ` Doug Evans 0 siblings, 1 reply; 39+ messages in thread From: Eli Zaretskii @ 2013-04-09 19:31 UTC (permalink / raw) To: tromey, brobecker, palves, dje; +Cc: gdb-patches > Date: Thu, 21 Mar 2013 23:16:50 +0200 > From: Eli Zaretskii <eliz@gnu.org> > Cc: brobecker@adacore.com, palves@redhat.com, dje@google.com, gdb-patches@sourceware.org > > > From: Tom Tromey <tromey@redhat.com> > > Cc: Eli Zaretskii <eliz@gnu.org>, palves@redhat.com, dje@google.com, > > gdb-patches@sourceware.org > > Date: Thu, 21 Mar 2013 14:58:03 -0600 > > > > For the new information, "show configuration" might also be nice to have. > > It would not be much more code and would let people see the info for the > > gdb they are currently using. > > OK, will do. Respinning, here's v2 of that patch, which accommodates all the comments till now. It also includes documentation; please someone review that, as I'm not objective in this case ;-). OK to commit? 2013-04-09 Eli Zaretskii <eliz@gnu.org> * top.c (print_gdb_configuration): New function, displays the details about GDB configure-time parameters. (print_gdb_version): Mention "show configuration". * cli/cli-cmds.c (show_configuration): New function. (_initialize_cli_cmds): Add the "show configuration" command. * main.c (captured_main) <print_configuration>: New static var. <long_options>: Use it. If --configuration was given, call print_gdb_configuration. --- gdb/cli/cli-cmds.c~0 2013-03-12 19:39:44.000000000 +0200 +++ gdb/cli/cli-cmds.c 2013-04-09 08:02:46.088591300 +0300 @@ -314,6 +314,12 @@ show_version (char *args, int from_tty) printf_filtered ("\n"); } +static void +show_configuration (char *args, int from_tty) +{ + print_gdb_configuration (gdb_stdout); +} + /* Handle the quit command. */ void @@ -1756,6 +1762,9 @@ the previous command number shown."), add_cmd ("version", no_set_class, show_version, _("Show what version of GDB this is."), &showlist); + add_cmd ("configuration", no_set_class, show_configuration, + _("Show how GDB was configured at build time."), &showlist); + /* If target is open when baud changes, it doesn't take effect until the next open (I think, not sure). */ add_setshow_zinteger_cmd ("remotebaud", no_class, &baud_rate, _("\ --- gdb/top.c~0 2013-01-25 16:17:10.000000000 +0200 +++ gdb/top.c 2013-04-09 08:02:27.508872200 +0300 @@ -1146,15 +1146,101 @@ and \"show warranty\" for details.\n"); { fprintf_filtered (stream, "%s", host_name); } - fprintf_filtered (stream, "\"."); + fprintf_filtered (stream, "\".\n\ +Type \"show configuration\" for configuration details."); if (REPORT_BUGS_TO[0]) { - fprintf_filtered (stream, + fprintf_filtered (stream, _("\nFor bug reporting instructions, please see:\n")); fprintf_filtered (stream, "%s.", REPORT_BUGS_TO); } } + +/* Print the details of GDB build-time configuration. */ +void +print_gdb_configuration (struct ui_file *stream) +{ + fprintf_filtered (stream, _("\ +This GDB was configured as follows:\n\ + configure --host=%s --target=%s\n\ +"), host_name, target_name); + fprintf_filtered (stream, _("\ + --with-auto-load-dir=%s\n\ + --with-auto-load-safe-path=%s\n\ +"), AUTO_LOAD_DIR, AUTO_LOAD_SAFE_PATH); +#if HAVE_LIBEXPAT + fprintf_filtered (stream, _("\ + --with-expat\n\ +")); +#else + fprintf_filtered (stream, _("\ + --without-expat\n\ +")); +#endif + if (GDB_DATADIR[0]) + fprintf_filtered (stream, _("\ + --with-gdb-datadir=%s%s\n\ +"), GDB_DATADIR, GDB_DATADIR_RELOCATABLE ? " (relocatable)" : ""); +#ifdef ICONV_BIN + fprintf_filtered (stream, _("\ + --with-iconv-bin=%s%s\n\ +"), ICONV_BIN, ICONV_BIN_RELOCATABLE ? " (relocatable)" : ""); +#endif + if (JIT_READER_DIR[0]) + fprintf_filtered (stream, _("\ + --with-jit-reader-dir=%s%s\n\ +"), JIT_READER_DIR, JIT_READER_DIR_RELOCATABLE ? " (relocatable)" : ""); +#if HAVE_LIBUNWIND_IA64_H + fprintf_filtered (stream, _("\ + --with-libunwind-ia64\n\ +")); +#else + fprintf_filtered (stream, _("\ + --without-libunwind-ia64\n\ +")); +#endif +#if HAVE_LIBLZMA + fprintf_filtered (stream, _("\ + --with-lzma\n\ +")); +#else + fprintf_filtered (stream, _("\ + --without-lzma\n\ +")); +#endif +#ifdef WITH_PYTHON_PATH + fprintf_filtered (stream, _("\ + --with-python=%s%s\n\ +"), WITH_PYTHON_PATH, PYTHON_PATH_RELOCATABLE ? " (relocatable)" : ""); +#endif +#ifdef RELOC_SRCDIR + fprintf_filtered (stream, _("\ + --with-relocated-sources=%s\n\ +"), RELOC_SRCDIR); +#endif + if (DEBUGDIR[0]) + fprintf_filtered (stream, _("\ + --with-separate-debug-dir=%s%s\n\ +"), DEBUGDIR, DEBUGDIR_RELOCATABLE ? " (relocatable)" : ""); + if (TARGET_SYSTEM_ROOT[0]) + fprintf_filtered (stream, _("\ + --with-sysroot=%s%s\n\ +"), TARGET_SYSTEM_ROOT, TARGET_SYSTEM_ROOT_RELOCATABLE ? " (relocatable)" : ""); + if (SYSTEM_GDBINIT[0]) + fprintf_filtered (stream, _("\ + --with-system-gdbinit=%s%s\n\ +"), SYSTEM_GDBINIT, SYSTEM_GDBINIT_RELOCATABLE ? " (relocatable)" : ""); +#if HAVE_ZLIB_H + fprintf_filtered (stream, _("\ + --with-zlib\n\ +")); +#else + fprintf_filtered (stream, _("\ + --without-zlib\n\ +")); +#endif +} \f /* The current top level prompt, settable with "set prompt", and/or --- gdb/main.c~4 2013-04-09 08:40:03.404632700 +0300 +++ gdb/main.c 2013-04-09 08:08:00.461806500 +0300 @@ -322,6 +322,7 @@ captured_main (void *data) initializer. */ static int print_help; static int print_version; + static int print_configuration; /* Pointers to all arguments of --command option. */ VEC (cmdarg_s) *cmdarg_vec = NULL; @@ -484,6 +485,7 @@ captured_main (void *data) {"command", required_argument, 0, 'x'}, {"eval-command", required_argument, 0, 'X'}, {"version", no_argument, &print_version, 1}, + {"configuration", no_argument, &print_configuration, 1}, {"x", required_argument, 0, 'x'}, {"ex", required_argument, 0, 'X'}, {"init-command", required_argument, 0, OPT_IX}, @@ -727,8 +729,9 @@ captured_main (void *data) } } - /* If --help or --version, disable window interface. */ - if (print_help || print_version) + /* If --help or --version or --configuration, disable window + interface. */ + if (print_help || print_version || print_configuration) { use_windows = 0; } @@ -819,6 +822,14 @@ captured_main (void *data) exit (0); } + if (print_configuration) + { + print_gdb_configuration (gdb_stdout); + wrap_here (""); + printf_filtered ("\n"); + exit (0); + } + /* FIXME: cagney/2003-02-03: The big hack (part 1 of 2) that lets GDB retain the old MI1 interpreter startup behavior. Output the copyright message before the interpreter is installed. That way @@ -1130,6 +1141,7 @@ Options:\n\n\ #endif fputs_unfiltered (_("\ --version Print version information and then exit.\n\ + --configuration Print details about GDB configuration and then exit.\n\ -w Use a window interface.\n\ --write Set writing into executable and core files.\n\ --xdb XDB compatibility mode.\n\ --- gdb/top.h~0 2013-01-07 18:40:36.000000000 +0200 +++ gdb/top.h 2013-04-09 08:03:47.833787100 +0300 @@ -31,6 +31,7 @@ extern char gdbinit[]; extern void print_gdb_version (struct ui_file *); +extern void print_gdb_configuration (struct ui_file *); extern void read_command_file (FILE *); extern void init_history (void); 2013-04-09 Eli Zaretskii <eliz@gnu.org> * gdb.texinfo (Mode Options): Document '-configuration'. (Help): Document "show configuration". (Bug Reporting): Add requirements to include the configuration details in bug reports. --- gdb/doc/gdb.texinfo~0 2013-03-11 21:43:52.000000000 +0200 +++ gdb/doc/gdb.texinfo 2013-04-09 08:27:33.409998600 +0300 @@ -1263,6 +1263,12 @@ This option causes @value{GDBN} to print its version number and no-warranty blurb, and exit. +@item -configuration +@cindex @code{--configuration} +This option causes @value{GDBN} to print details about its build-time +configuration parameters, and then exit. These details can be +important when reporting @value{GDBN} bugs (@pxref{GDB Bugs}). + @end table @node Startup @@ -1836,7 +1842,7 @@ @end table @c @end group -Here are three miscellaneous @code{show} subcommands, all of which are +Here are several miscellaneous @code{show} subcommands, all of which are exceptional in lacking corresponding @code{set} commands: @table @code @@ -1867,6 +1873,15 @@ Display the @sc{gnu} ``NO WARRANTY'' statement, or a warranty, if your version of @value{GDBN} comes with one. +@kindex show configuration +@item show configuration +Display detailed information about the way @value{GDBN} was configured +when it was built. This displays the optional arguments passed to the +@file{configure} script and also configuration parameters detected +automatically by @command{configure}. When reporting a @value{GDBN} +bug (@pxref{GDB Bugs}), it is important to include this information in +your report. + @end table @node Running @@ -34650,6 +34665,12 @@ version number. @item +The details of the @value{GDBN} build-time configuration. +@value{GDBN} shows these details if you invoke it with the +@option{--configuration} command-line option, or if you type +@code{show configuration} at @value{GDBN}'s prompt. + +@item What compiler (and its version) was used to compile @value{GDBN}---e.g.@: ``@value{GCC}--2.8.1''. --- gdb/NEWS 9 Apr 2013 08:04:32 -0000 +++ gdb/NEWS 9 Apr 2013 16:13:15 -0000 @@ -4,12 +4,19 @@ *** Changes since GDB 7.6 * New commands: +show configuration + Display the details of GDB configure-time options. + maint set|show per-command maint set|show per-command space maint set|show per-command time maint set|show per-command symtab Enable display of per-command gdb resource usage. +* New command-line options +--configuration + Display the details of GDB configure-time options. + * New options set remote trace-status-packet ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Display configuration details in --help 2013-04-09 19:31 ` Eli Zaretskii @ 2013-04-09 19:46 ` Doug Evans 2013-04-09 20:04 ` Eli Zaretskii 0 siblings, 1 reply; 39+ messages in thread From: Doug Evans @ 2013-04-09 19:46 UTC (permalink / raw) To: Eli Zaretskii; +Cc: tromey, brobecker, palves, gdb-patches Eli Zaretskii writes: > > Date: Thu, 21 Mar 2013 23:16:50 +0200 > > From: Eli Zaretskii <eliz@gnu.org> > > Cc: brobecker@adacore.com, palves@redhat.com, dje@google.com, gdb-patches@sourceware.org > > > > > From: Tom Tromey <tromey@redhat.com> > > > Cc: Eli Zaretskii <eliz@gnu.org>, palves@redhat.com, dje@google.com, > > > gdb-patches@sourceware.org > > > Date: Thu, 21 Mar 2013 14:58:03 -0600 > > > > > > For the new information, "show configuration" might also be nice to have. > > > It would not be much more code and would let people see the info for the > > > gdb they are currently using. > > > > OK, will do. > > Respinning, here's v2 of that patch, which accommodates all the > comments till now. It also includes documentation; please someone > review that, as I'm not objective in this case ;-). > > OK to commit? Hi. A few comments inline. > 2013-04-09 Eli Zaretskii <eliz@gnu.org> > > * top.c (print_gdb_configuration): New function, displays the > details about GDB configure-time parameters. > (print_gdb_version): Mention "show configuration". > > * cli/cli-cmds.c (show_configuration): New function. > (_initialize_cli_cmds): Add the "show configuration" command. > > * main.c (captured_main) <print_configuration>: New static var. > <long_options>: Use it. > If --configuration was given, call print_gdb_configuration. > > > --- gdb/cli/cli-cmds.c~0 2013-03-12 19:39:44.000000000 +0200 > +++ gdb/cli/cli-cmds.c 2013-04-09 08:02:46.088591300 +0300 > @@ -314,6 +314,12 @@ show_version (char *args, int from_tty) > printf_filtered ("\n"); > } > > +static void > +show_configuration (char *args, int from_tty) > +{ > + print_gdb_configuration (gdb_stdout); > +} > + > /* Handle the quit command. */ > > void > @@ -1756,6 +1762,9 @@ the previous command number shown."), > add_cmd ("version", no_set_class, show_version, > _("Show what version of GDB this is."), &showlist); > > + add_cmd ("configuration", no_set_class, show_configuration, > + _("Show how GDB was configured at build time."), &showlist); > + > /* If target is open when baud changes, it doesn't take effect until > the next open (I think, not sure). */ > add_setshow_zinteger_cmd ("remotebaud", no_class, &baud_rate, _("\ > > > > --- gdb/top.c~0 2013-01-25 16:17:10.000000000 +0200 > +++ gdb/top.c 2013-04-09 08:02:27.508872200 +0300 > @@ -1146,15 +1146,101 @@ and \"show warranty\" for details.\n"); > { > fprintf_filtered (stream, "%s", host_name); > } > - fprintf_filtered (stream, "\"."); > + fprintf_filtered (stream, "\".\n\ > +Type \"show configuration\" for configuration details."); > > if (REPORT_BUGS_TO[0]) > { > - fprintf_filtered (stream, > + fprintf_filtered (stream, > _("\nFor bug reporting instructions, please see:\n")); > fprintf_filtered (stream, "%s.", REPORT_BUGS_TO); > } > } I have a bit of a phobia of adding more lines to gdb's initial output. It's too long already IMO. [I realize there's -q.] I'm not objecting per se. Just wondering how critical this is. > +/* Print the details of GDB build-time configuration. */ > +void > +print_gdb_configuration (struct ui_file *stream) > +{ > + fprintf_filtered (stream, _("\ > +This GDB was configured as follows:\n\ > + configure --host=%s --target=%s\n\ > +"), host_name, target_name); > + fprintf_filtered (stream, _("\ > + --with-auto-load-dir=%s\n\ > + --with-auto-load-safe-path=%s\n\ > +"), AUTO_LOAD_DIR, AUTO_LOAD_SAFE_PATH); > +#if HAVE_LIBEXPAT > + fprintf_filtered (stream, _("\ > + --with-expat\n\ > +")); > +#else > + fprintf_filtered (stream, _("\ > + --without-expat\n\ > +")); > +#endif If we've already discussed this, please ignore, but ... :-) I'd prefer one line per fprintf instead of three. [I realize there are some cases where one line won't do, and this style makes them all consistent. I still prefer one line for the common case.] If others don't object to it, then it's not that important. Also, is there something driving the choice of indenting 13 spaces in? How about 2 or 4? For consistency with print_gdb_help I'd go with 2. > + if (GDB_DATADIR[0]) > + fprintf_filtered (stream, _("\ > + --with-gdb-datadir=%s%s\n\ > +"), GDB_DATADIR, GDB_DATADIR_RELOCATABLE ? " (relocatable)" : ""); > +#ifdef ICONV_BIN > + fprintf_filtered (stream, _("\ > + --with-iconv-bin=%s%s\n\ > +"), ICONV_BIN, ICONV_BIN_RELOCATABLE ? " (relocatable)" : ""); > +#endif > + if (JIT_READER_DIR[0]) > + fprintf_filtered (stream, _("\ > + --with-jit-reader-dir=%s%s\n\ > +"), JIT_READER_DIR, JIT_READER_DIR_RELOCATABLE ? " (relocatable)" : ""); > +#if HAVE_LIBUNWIND_IA64_H > + fprintf_filtered (stream, _("\ > + --with-libunwind-ia64\n\ > +")); > +#else > + fprintf_filtered (stream, _("\ > + --without-libunwind-ia64\n\ > +")); > +#endif > +#if HAVE_LIBLZMA > + fprintf_filtered (stream, _("\ > + --with-lzma\n\ > +")); > +#else > + fprintf_filtered (stream, _("\ > + --without-lzma\n\ > +")); > +#endif > +#ifdef WITH_PYTHON_PATH > + fprintf_filtered (stream, _("\ > + --with-python=%s%s\n\ > +"), WITH_PYTHON_PATH, PYTHON_PATH_RELOCATABLE ? " (relocatable)" : ""); > +#endif > +#ifdef RELOC_SRCDIR > + fprintf_filtered (stream, _("\ > + --with-relocated-sources=%s\n\ > +"), RELOC_SRCDIR); > +#endif > + if (DEBUGDIR[0]) > + fprintf_filtered (stream, _("\ > + --with-separate-debug-dir=%s%s\n\ > +"), DEBUGDIR, DEBUGDIR_RELOCATABLE ? " (relocatable)" : ""); > + if (TARGET_SYSTEM_ROOT[0]) > + fprintf_filtered (stream, _("\ > + --with-sysroot=%s%s\n\ > +"), TARGET_SYSTEM_ROOT, TARGET_SYSTEM_ROOT_RELOCATABLE ? " (relocatable)" : ""); > + if (SYSTEM_GDBINIT[0]) > + fprintf_filtered (stream, _("\ > + --with-system-gdbinit=%s%s\n\ > +"), SYSTEM_GDBINIT, SYSTEM_GDBINIT_RELOCATABLE ? " (relocatable)" : ""); > +#if HAVE_ZLIB_H > + fprintf_filtered (stream, _("\ > + --with-zlib\n\ > +")); > +#else > + fprintf_filtered (stream, _("\ > + --without-zlib\n\ > +")); > +#endif > +} > \f > > /* The current top level prompt, settable with "set prompt", and/or > > > --- gdb/main.c~4 2013-04-09 08:40:03.404632700 +0300 > +++ gdb/main.c 2013-04-09 08:08:00.461806500 +0300 > @@ -322,6 +322,7 @@ captured_main (void *data) > initializer. */ > static int print_help; > static int print_version; > + static int print_configuration; > > /* Pointers to all arguments of --command option. */ > VEC (cmdarg_s) *cmdarg_vec = NULL; > @@ -484,6 +485,7 @@ captured_main (void *data) > {"command", required_argument, 0, 'x'}, > {"eval-command", required_argument, 0, 'X'}, > {"version", no_argument, &print_version, 1}, > + {"configuration", no_argument, &print_configuration, 1}, > {"x", required_argument, 0, 'x'}, > {"ex", required_argument, 0, 'X'}, > {"init-command", required_argument, 0, OPT_IX}, > @@ -727,8 +729,9 @@ captured_main (void *data) > } > } > > - /* If --help or --version, disable window interface. */ > - if (print_help || print_version) > + /* If --help or --version or --configuration, disable window > + interface. */ > + if (print_help || print_version || print_configuration) > { > use_windows = 0; > } > @@ -819,6 +822,14 @@ captured_main (void *data) > exit (0); > } > > + if (print_configuration) > + { > + print_gdb_configuration (gdb_stdout); > + wrap_here (""); > + printf_filtered ("\n"); > + exit (0); > + } > + > /* FIXME: cagney/2003-02-03: The big hack (part 1 of 2) that lets > GDB retain the old MI1 interpreter startup behavior. Output the > copyright message before the interpreter is installed. That way > @@ -1130,6 +1141,7 @@ Options:\n\n\ > #endif > fputs_unfiltered (_("\ > --version Print version information and then exit.\n\ > + --configuration Print details about GDB configuration and then exit.\n\ > -w Use a window interface.\n\ > --write Set writing into executable and core files.\n\ > --xdb XDB compatibility mode.\n\ The options here are (mostly) sorted alphabetically. ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Display configuration details in --help 2013-04-09 19:46 ` Doug Evans @ 2013-04-09 20:04 ` Eli Zaretskii 2013-04-09 23:33 ` Doug Evans 0 siblings, 1 reply; 39+ messages in thread From: Eli Zaretskii @ 2013-04-09 20:04 UTC (permalink / raw) To: Doug Evans; +Cc: tromey, brobecker, palves, gdb-patches > From: Doug Evans <dje@google.com> > Date: Tue, 9 Apr 2013 09:39:41 -0700 > Cc: tromey@redhat.com, brobecker@adacore.com, palves@redhat.com, gdb-patches@sourceware.org > > Hi. A few comments inline. Thanks for the review. > > - fprintf_filtered (stream, "\"."); > > + fprintf_filtered (stream, "\".\n\ > > +Type \"show configuration\" for configuration details."); > > > > if (REPORT_BUGS_TO[0]) > > { > > - fprintf_filtered (stream, > > + fprintf_filtered (stream, > > _("\nFor bug reporting instructions, please see:\n")); > > fprintf_filtered (stream, "%s.", REPORT_BUGS_TO); > > } > > } > > I have a bit of a phobia of adding more lines to gdb's initial output. > It's too long already IMO. [I realize there's -q.] > I'm not objecting per se. Just wondering how critical this is. It's not critical. But then neither is this: GNU gdb (GDB) 7.5.1 Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ So I thought we should be consistent here, and offer the same for this line: This GDB was configured as "i686-pc-mingw32". I'm okay with not adding that, but can someone explain why it is different from advertising "show copying" and "show warranty"? Should we remove those two as well? > > +/* Print the details of GDB build-time configuration. */ > > +void > > +print_gdb_configuration (struct ui_file *stream) > > +{ > > + fprintf_filtered (stream, _("\ > > +This GDB was configured as follows:\n\ > > + configure --host=%s --target=%s\n\ > > +"), host_name, target_name); > > + fprintf_filtered (stream, _("\ > > + --with-auto-load-dir=%s\n\ > > + --with-auto-load-safe-path=%s\n\ > > +"), AUTO_LOAD_DIR, AUTO_LOAD_SAFE_PATH); > > +#if HAVE_LIBEXPAT > > + fprintf_filtered (stream, _("\ > > + --with-expat\n\ > > +")); > > +#else > > + fprintf_filtered (stream, _("\ > > + --without-expat\n\ > > +")); > > +#endif > > If we've already discussed this, please ignore, but ... :-) > I'd prefer one line per fprintf instead of three. Sorry, I'm not following: what 3 lines? Can you show how would you like the code be reformatted? > Also, is there something driving the choice of indenting 13 spaces in? It lines up to the right of "configure", below the first option: This GDB is configured as follows: configure --host=i686-pc-mingw32 --target=i686-pc-mingw32 --with-auto-load-dir=$debugdir:$datadir/auto-load --with-auto-load-safe-path=$debugdir:$datadir/auto-load --with-expat --with-gdb-datadir=d:/usr/share/gdb (relocatable) --with-jit-reader-dir=d:/usr/lib/gdb (relocatable) --without-libunwind-ia64 --with-lzma --with-python=d:/usr/Python26 (relocatable) --with-separate-debug-dir=d:/usr/lib/debug (relocatable) --with-system-gdbinit=d:/usr/etc/gdbinit (relocatable) --with-zlib > How about 2 or 4? > For consistency with print_gdb_help I'd go with 2. print_gdb_help displays a different information, so I see no need for consistency here. But I won't argue if others think like you do. > > fputs_unfiltered (_("\ > > --version Print version information and then exit.\n\ > > + --configuration Print details about GDB configuration and then exit.\n\ > > -w Use a window interface.\n\ > > --write Set writing into executable and core files.\n\ > > --xdb XDB compatibility mode.\n\ > > The options here are (mostly) sorted alphabetically. Except where they aren't: --args Arguments after executable-file are passed to inferior -b BAUDRATE Set serial port baud rate used for remote debugging. --batch Exit after processing options. --batch-silent As for --batch, but suppress all gdb stdout output. >>> --return-child-result GDB exit code will be the child's exit code. --cd=DIR Change current directory to DIR. --command=FILE, -x Execute GDB commands from FILE. >>> --eval-command=COMMAND, -ex Execute a single GDB command. May be used multiple times and in conjunction with --command. >>> --init-command=FILE, -ix Like -x but execute it before loading inferior. >>> --init-eval-command=COMMAND, -iex Like -ex but before loading inferior. >>> --core=COREFILE Analyze the core dump COREFILE. >>> --pid=PID Attach to running process PID. --dbx DBX compatibility mode. --directory=DIR Search for source files in DIR. --epoch Output information used by epoch emacs-GDB interface. --exec=EXECFILE Use EXECFILE as the executable. --fullname Output information used by emacs-GDB interface. --help Print this message. --interpreter=INTERP Select a specific interpreter / user interface -l TIMEOUT Set timeout in seconds for remote debugging. --nw Do not use a window interface. --nx Do not read .gdbinit file. --quiet Do not print version number on startup. --readnow Fully read symbol files on first access. --se=FILE Use FILE as symbol file and executable file. --symbols=SYMFILE Read symbols from SYMFILE. --tty=TTY Use TTY for input/output by the program being debugged. --version Print version information and then exit. -w Use a window interface. --write Set writing into executable and core files. --xdb XDB compatibility mode. Again, I'm not really wedded to the place where I inserted the new option, but please tell me near which 'c' option to put it instead ;-). ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Display configuration details in --help 2013-04-09 20:04 ` Eli Zaretskii @ 2013-04-09 23:33 ` Doug Evans 2013-04-10 0:12 ` Pedro Alves 2013-04-10 0:38 ` Eli Zaretskii 0 siblings, 2 replies; 39+ messages in thread From: Doug Evans @ 2013-04-09 23:33 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Tom Tromey, Joel Brobecker, Pedro Alves, gdb-patches On Tue, Apr 9, 2013 at 10:37 AM, Eli Zaretskii <eliz@gnu.org> wrote: >> I have a bit of a phobia of adding more lines to gdb's initial output. >> It's too long already IMO. [I realize there's -q.] >> I'm not objecting per se. Just wondering how critical this is. > > It's not critical. But then neither is this: > > GNU gdb (GDB) 7.5.1 > Copyright (C) 2012 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. Type "show copying" > and "show warranty" for details. ^^^^^^^^^^^^^^^^^^ > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > So I thought we should be consistent here, and offer the same for this > line: > > This GDB was configured as "i686-pc-mingw32". > > I'm okay with not adding that, but can someone explain why it is > different from advertising "show copying" and "show warranty"? Should > we remove those two as well? I need to check, but I think(!) the "show copying" and "show warranty" are required by GNU standards. >> > +/* Print the details of GDB build-time configuration. */ >> > +void >> > +print_gdb_configuration (struct ui_file *stream) >> > +{ >> > + fprintf_filtered (stream, _("\ >> > +This GDB was configured as follows:\n\ >> > + configure --host=%s --target=%s\n\ >> > +"), host_name, target_name); >> > + fprintf_filtered (stream, _("\ >> > + --with-auto-load-dir=%s\n\ >> > + --with-auto-load-safe-path=%s\n\ >> > +"), AUTO_LOAD_DIR, AUTO_LOAD_SAFE_PATH); >> > +#if HAVE_LIBEXPAT >> > + fprintf_filtered (stream, _("\ >> > + --with-expat\n\ >> > +")); >> > +#else >> > + fprintf_filtered (stream, _("\ >> > + --without-expat\n\ >> > +")); >> > +#endif >> >> If we've already discussed this, please ignore, but ... :-) >> I'd prefer one line per fprintf instead of three. > > Sorry, I'm not following: what 3 lines? Can you show how would you > like the code be reformatted? fprintf_filtered (stream, _(" -with-expat\n")); // assuming 2 space indentation >> Also, is there something driving the choice of indenting 13 spaces in? > > It lines up to the right of "configure", below the first option: > > This GDB is configured as follows: > configure --host=i686-pc-mingw32 --target=i686-pc-mingw32 > --with-auto-load-dir=$debugdir:$datadir/auto-load > --with-auto-load-safe-path=$debugdir:$datadir/auto-load > --with-expat > --with-gdb-datadir=d:/usr/share/gdb (relocatable) > --with-jit-reader-dir=d:/usr/lib/gdb (relocatable) > --without-libunwind-ia64 > --with-lzma > --with-python=d:/usr/Python26 (relocatable) > --with-separate-debug-dir=d:/usr/lib/debug (relocatable) > --with-system-gdbinit=d:/usr/etc/gdbinit (relocatable) > --with-zlib > >> How about 2 or 4? >> For consistency with print_gdb_help I'd go with 2. > > print_gdb_help displays a different information, so I see no need for > consistency here. But I won't argue if others think like you do. One could parameterize the indentation. Just a suggestion. e.g. fprintf_filtered ("%s--with-foo", indent); // or some such [yes, I left off _()] >> > fputs_unfiltered (_("\ >> > --version Print version information and then exit.\n\ >> > + --configuration Print details about GDB configuration and then exit.\n\ >> > -w Use a window interface.\n\ >> > --write Set writing into executable and core files.\n\ >> > --xdb XDB compatibility mode.\n\ >> >> The options here are (mostly) sorted alphabetically. > > Except where they aren't: > > --args Arguments after executable-file are passed to inferior > -b BAUDRATE Set serial port baud rate used for remote debugging. > --batch Exit after processing options. > --batch-silent As for --batch, but suppress all gdb stdout output. > >>> --return-child-result > GDB exit code will be the child's exit code. > --cd=DIR Change current directory to DIR. > --command=FILE, -x Execute GDB commands from FILE. > >>> --eval-command=COMMAND, -ex > Execute a single GDB command. > May be used multiple times and in conjunction > with --command. > >>> --init-command=FILE, -ix Like -x but execute it before loading inferior. > >>> --init-eval-command=COMMAND, -iex Like -ex but before loading inferior. > >>> --core=COREFILE Analyze the core dump COREFILE. > >>> --pid=PID Attach to running process PID. > --dbx DBX compatibility mode. > --directory=DIR Search for source files in DIR. > --epoch Output information used by epoch emacs-GDB interface. > --exec=EXECFILE Use EXECFILE as the executable. > --fullname Output information used by emacs-GDB interface. > --help Print this message. > --interpreter=INTERP > Select a specific interpreter / user interface > -l TIMEOUT Set timeout in seconds for remote debugging. > --nw Do not use a window interface. > --nx Do not read .gdbinit file. > --quiet Do not print version number on startup. > --readnow Fully read symbol files on first access. > --se=FILE Use FILE as symbol file and executable file. > --symbols=SYMFILE Read symbols from SYMFILE. > --tty=TTY Use TTY for input/output by the program being debugged. > --version Print version information and then exit. > -w Use a window interface. > --write Set writing into executable and core files. > --xdb XDB compatibility mode. > > Again, I'm not really wedded to the place where I inserted the new > option, but please tell me near which 'c' option to put it instead ;-). Right after --command works for me. ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Display configuration details in --help 2013-04-09 23:33 ` Doug Evans @ 2013-04-10 0:12 ` Pedro Alves 2013-04-10 0:48 ` Eli Zaretskii 2013-04-10 2:51 ` Doug Evans 2013-04-10 0:38 ` Eli Zaretskii 1 sibling, 2 replies; 39+ messages in thread From: Pedro Alves @ 2013-04-10 0:12 UTC (permalink / raw) To: Doug Evans; +Cc: Eli Zaretskii, Tom Tromey, Joel Brobecker, gdb-patches On 04/09/2013 06:53 PM, Doug Evans wrote: > On Tue, Apr 9, 2013 at 10:37 AM, Eli Zaretskii <eliz@gnu.org> wrote: >>> > fputs_unfiltered (_("\ >>> > --version Print version information and then exit.\n\ >>> > + --configuration Print details about GDB configuration and then exit.\n\ >>> > -w Use a window interface.\n\ >>> > --write Set writing into executable and core files.\n\ >>> > --xdb XDB compatibility mode.\n\ >>> >>> The options here are (mostly) sorted alphabetically. >> >> Except where they aren't: There's a pattern. >> >> --args Arguments after executable-file are passed to inferior >> -b BAUDRATE Set serial port baud rate used for remote debugging. >> --batch Exit after processing options. >> --batch-silent As for --batch, but suppress all gdb stdout output. >> >>> --return-child-result Related to --batch. >> GDB exit code will be the child's exit code. >> --cd=DIR Change current directory to DIR. >> --command=FILE, -x Execute GDB commands from FILE. >> >>> --eval-command=COMMAND, -ex >> Execute a single GDB command. >> May be used multiple times and in conjunction >> with --command. >> >>> --init-command=FILE, -ix Like -x but execute it before loading inferior. >> >>> --init-eval-command=COMMAND, -iex Like -ex but before loading inferior. All these are related to --command. >> >>> --core=COREFILE Analyze the core dump COREFILE. Remove the ones above related to --command, and this one's actually in place. >> >>> --pid=PID Attach to running process PID. --pid is kind of a cousin of --core, due to how BAR is handled in "gdb FOO BAR". >> --dbx DBX compatibility mode. >> --directory=DIR Search for source files in DIR. >> --epoch Output information used by epoch emacs-GDB interface. >> --exec=EXECFILE Use EXECFILE as the executable. >> --fullname Output information used by emacs-GDB interface. >> --help Print this message. >> --interpreter=INTERP >> Select a specific interpreter / user interface >> -l TIMEOUT Set timeout in seconds for remote debugging. >> --nw Do not use a window interface. >> --nx Do not read .gdbinit file. >> --quiet Do not print version number on startup. >> --readnow Fully read symbol files on first access. >> --se=FILE Use FILE as symbol file and executable file. >> --symbols=SYMFILE Read symbols from SYMFILE. >> --tty=TTY Use TTY for input/output by the program being debugged. >> --version Print version information and then exit. >> -w Use a window interface. >> --write Set writing into executable and core files. >> --xdb XDB compatibility mode. >> >> Again, I'm not really wedded to the place where I inserted the new >> option, but please tell me near which 'c' option to put it instead ;-). > > Right after --command works for me. So if you imagine a right indent in the grouped options, the list is actually sorted, so that'd break the existing logic. I'd suggest either right after --version; right after --help; right before --core, or a wholesale reevaluation of the current grouping (either sort all alphabetically, or break "Options:" into groups). -- Pedro Alves ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Display configuration details in --help 2013-04-10 0:12 ` Pedro Alves @ 2013-04-10 0:48 ` Eli Zaretskii 2013-04-10 2:51 ` Doug Evans 1 sibling, 0 replies; 39+ messages in thread From: Eli Zaretskii @ 2013-04-10 0:48 UTC (permalink / raw) To: Pedro Alves; +Cc: dje, tromey, brobecker, gdb-patches > Date: Tue, 09 Apr 2013 19:10:10 +0100 > From: Pedro Alves <palves@redhat.com> > CC: Eli Zaretskii <eliz@gnu.org>, Tom Tromey <tromey@redhat.com>, > Joel Brobecker <brobecker@adacore.com>, > gdb-patches <gdb-patches@sourceware.org> > > >>> The options here are (mostly) sorted alphabetically. > >> > >> Except where they aren't: > > There's a pattern. Yes, and I tried to follow it. > I'd suggest either right after --version; right after --help; right > before --core, or a wholesale reevaluation of the current grouping > (either sort all alphabetically, or break "Options:" into groups). Right after --version is what I did in my patch. ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Display configuration details in --help 2013-04-10 0:12 ` Pedro Alves 2013-04-10 0:48 ` Eli Zaretskii @ 2013-04-10 2:51 ` Doug Evans 2013-04-10 4:41 ` Eli Zaretskii 2013-04-11 1:20 ` Tom Tromey 1 sibling, 2 replies; 39+ messages in thread From: Doug Evans @ 2013-04-10 2:51 UTC (permalink / raw) To: Pedro Alves; +Cc: Eli Zaretskii, Tom Tromey, Joel Brobecker, gdb-patches On Tue, Apr 9, 2013 at 11:10 AM, Pedro Alves <palves@redhat.com> wrote: >>> >>> --core=COREFILE Analyze the core dump COREFILE. > > Remove the ones above related to --command, and this one's > actually in place. > >>> >>> --pid=PID Attach to running process PID. > > --pid is kind of a cousin of --core, due to how BAR is > handled in "gdb FOO BAR". And --exec is a cousin of --se/--symbols but they're apart and in general alphabetical order. Unless there is a physical form to the grouping (e.g., further indentation, blank lines, or whatever), I'd much prefer a full alphabetical sort. > >>> --dbx DBX compatibility mode. >>> --directory=DIR Search for source files in DIR. >>> --epoch Output information used by epoch emacs-GDB interface. >>> --exec=EXECFILE Use EXECFILE as the executable. >>> --fullname Output information used by emacs-GDB interface. >>> --help Print this message. >>> --interpreter=INTERP >>> Select a specific interpreter / user interface >>> -l TIMEOUT Set timeout in seconds for remote debugging. >>> --nw Do not use a window interface. >>> --nx Do not read .gdbinit file. >>> --quiet Do not print version number on startup. >>> --readnow Fully read symbol files on first access. >>> --se=FILE Use FILE as symbol file and executable file. >>> --symbols=SYMFILE Read symbols from SYMFILE. >>> --tty=TTY Use TTY for input/output by the program being debugged. >>> --version Print version information and then exit. >>> -w Use a window interface. >>> --write Set writing into executable and core files. >>> --xdb XDB compatibility mode. >>> >>> Again, I'm not really wedded to the place where I inserted the new >>> option, but please tell me near which 'c' option to put it instead ;-). >> >> Right after --command works for me. > > So if you imagine a right indent in the grouped options, the > list is actually sorted, so that'd break the existing logic. I'd suggest > either right after --version; right after --help; right before --core, or > a wholesale reevaluation of the current grouping (either sort all > alphabetically, or break "Options:" into groups). Wholesale reevaluation. ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Display configuration details in --help 2013-04-10 2:51 ` Doug Evans @ 2013-04-10 4:41 ` Eli Zaretskii 2013-04-11 2:41 ` Doug Evans 2013-04-11 1:20 ` Tom Tromey 1 sibling, 1 reply; 39+ messages in thread From: Eli Zaretskii @ 2013-04-10 4:41 UTC (permalink / raw) To: Doug Evans; +Cc: palves, tromey, brobecker, gdb-patches > Date: Tue, 9 Apr 2013 12:26:25 -0700 > From: Doug Evans <dje@google.com> > Cc: Eli Zaretskii <eliz@gnu.org>, Tom Tromey <tromey@redhat.com>, > Joel Brobecker <brobecker@adacore.com>, gdb-patches <gdb-patches@sourceware.org> > > > So if you imagine a right indent in the grouped options, the > > list is actually sorted, so that'd break the existing logic. I'd suggest > > either right after --version; right after --help; right before --core, or > > a wholesale reevaluation of the current grouping (either sort all > > alphabetically, or break "Options:" into groups). > > Wholesale reevaluation. But not as part of this patch, please. ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Display configuration details in --help 2013-04-10 4:41 ` Eli Zaretskii @ 2013-04-11 2:41 ` Doug Evans 0 siblings, 0 replies; 39+ messages in thread From: Doug Evans @ 2013-04-11 2:41 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Pedro Alves, Tom Tromey, Joel Brobecker, gdb-patches On Tue, Apr 9, 2013 at 12:46 PM, Eli Zaretskii <eliz@gnu.org> wrote: >> Date: Tue, 9 Apr 2013 12:26:25 -0700 >> From: Doug Evans <dje@google.com> >> Cc: Eli Zaretskii <eliz@gnu.org>, Tom Tromey <tromey@redhat.com>, >> Joel Brobecker <brobecker@adacore.com>, gdb-patches <gdb-patches@sourceware.org> >> >> > So if you imagine a right indent in the grouped options, the >> > list is actually sorted, so that'd break the existing logic. I'd suggest >> > either right after --version; right after --help; right before --core, or >> > a wholesale reevaluation of the current grouping (either sort all >> > alphabetically, or break "Options:" into groups). >> >> Wholesale reevaluation. > > But not as part of this patch, please. Your choice. ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Display configuration details in --help 2013-04-10 2:51 ` Doug Evans 2013-04-10 4:41 ` Eli Zaretskii @ 2013-04-11 1:20 ` Tom Tromey 2013-04-11 1:24 ` Pedro Alves 1 sibling, 1 reply; 39+ messages in thread From: Tom Tromey @ 2013-04-11 1:20 UTC (permalink / raw) To: Doug Evans; +Cc: Pedro Alves, Eli Zaretskii, Joel Brobecker, gdb-patches >>>>> "Doug" == Doug Evans <dje@google.com> writes: Doug> Unless there is a physical form to the grouping (e.g., further Doug> indentation, blank lines, or whatever), I'd much prefer a full Doug> alphabetical sort. Try "automake --help" to see what an alternate approach looks like. It groups options into sections with headers. I find it very readable; and it is a reasonably common style in the GNU world, e.g., "tar --help" or "cpio --help". Tom ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Display configuration details in --help 2013-04-11 1:20 ` Tom Tromey @ 2013-04-11 1:24 ` Pedro Alves 2013-04-11 2:43 ` Tom Tromey 0 siblings, 1 reply; 39+ messages in thread From: Pedro Alves @ 2013-04-11 1:24 UTC (permalink / raw) To: Tom Tromey; +Cc: Doug Evans, Eli Zaretskii, Joel Brobecker, gdb-patches On 04/10/2013 04:46 PM, Tom Tromey wrote: >>>>>> "Doug" == Doug Evans <dje@google.com> writes: > > Doug> Unless there is a physical form to the grouping (e.g., further > Doug> indentation, blank lines, or whatever), I'd much prefer a full > Doug> alphabetical sort. > > Try "automake --help" to see what an alternate approach looks like. > It groups options into sections with headers. > I find it very readable; and it is a reasonably common style in the > GNU world, e.g., "tar --help" or "cpio --help". That's my preference. But we shouldn't stale Eli's patch for this. His chosen positioning for --configuration follows precedent, and putting --configuration right after --command actually breaks one of the precedents. From here, my view is that we should let his patch in using his original preference for positioning, and then discuss wholesale --help reordering separately. -- Pedro Alves ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Display configuration details in --help 2013-04-11 1:24 ` Pedro Alves @ 2013-04-11 2:43 ` Tom Tromey 2013-04-12 12:50 ` Eli Zaretskii 0 siblings, 1 reply; 39+ messages in thread From: Tom Tromey @ 2013-04-11 2:43 UTC (permalink / raw) To: Pedro Alves; +Cc: Doug Evans, Eli Zaretskii, Joel Brobecker, gdb-patches Pedro> But we shouldn't stale Eli's patch for this. Yes, I agree. Tom ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Display configuration details in --help 2013-04-11 2:43 ` Tom Tromey @ 2013-04-12 12:50 ` Eli Zaretskii 2013-04-12 14:43 ` Eli Zaretskii 2013-04-14 14:16 ` [PATCH] Display configuration details in --help Doug Evans 0 siblings, 2 replies; 39+ messages in thread From: Eli Zaretskii @ 2013-04-12 12:50 UTC (permalink / raw) To: Tom Tromey; +Cc: palves, dje, brobecker, gdb-patches > From: Tom Tromey <tromey@redhat.com> > Cc: Doug Evans <dje@google.com>, Eli Zaretskii <eliz@gnu.org>, > Joel Brobecker <brobecker@adacore.com>, > gdb-patches <gdb-patches@sourceware.org> > Date: Wed, 10 Apr 2013 13:16:39 -0600 > > Pedro> But we shouldn't stale Eli's patch for this. > > Yes, I agree. Thanks, committed. I will take a shot on regrouping the --help text later. ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Display configuration details in --help 2013-04-12 12:50 ` Eli Zaretskii @ 2013-04-12 14:43 ` Eli Zaretskii 2013-04-12 16:39 ` regroup --help text (was: Re: [PATCH] Display configuration details in --help) Pedro Alves ` (3 more replies) 2013-04-14 14:16 ` [PATCH] Display configuration details in --help Doug Evans 1 sibling, 4 replies; 39+ messages in thread From: Eli Zaretskii @ 2013-04-12 14:43 UTC (permalink / raw) To: tromey, palves, dje, brobecker; +Cc: gdb-patches > Date: Fri, 12 Apr 2013 11:58:48 +0300 > From: Eli Zaretskii <eliz@gnu.org> > Cc: palves@redhat.com, dje@google.com, brobecker@adacore.com, gdb-patches@sourceware.org > > I will take a shot on regrouping the --help text later. Howe about the following (if accepted, I will write a patch to implement this): This is the GNU debugger. Usage: gdb [options] [executable-file [core-file or process-id]] gdb [options] --args executable-file [inferior-arguments ...] Selection of debuggee and its files: --args Arguments after executable-file are passed to inferior. --core=COREFILE Analyze the core dump COREFILE. --exec=EXECFILE Use EXECFILE as the executable. --pid=PID Attach to running process PID. --directory=DIR Search for source files in DIR. --se=FILE Use FILE as symbol file and executable file. --symbols=SYMFILE Read symbols from SYMFILE. --readnow Fully read symbol files on first access. --write Set writing into executable and core files. Initial commands and command files: --command=FILE, -x Execute GDB commands from FILE. --init-command=FILE, -ix Like -x but execute commands before loading inferior. --eval-command=COMMAND, -ex Execute a single GDB command. May be used multiple times and in conjunction with --command. --init-eval-command=COMMAND, -iex Like -ex but before loading inferior. --nh Do not read ~/.gdbinit. --nx Do not read any .gdbinit files in any directory. Output and user interface control: --epoch Output information used by epoch emacs-GDB interface. --fullname Output information used by emacs-GDB interface. --interpreter=INTERP Select a specific interpreter / user interface --tty=TTY Use TTY for input/output by the program being debugged. -w Use the GUI interface. --nw Do not use the GUI interface. --tui Use the text-mode user interface --dbx DBX compatibility mode. --xdb XDB compatibility mode. --quiet Do not print version number on startup. Miscellaneous options: -b BAUDRATE Set serial port baud rate used for remote debugging. --batch Exit after processing options. --batch-silent Like --batch, but suppress all gdb stdout output. --return-child-result GDB exit code will be the child's exit code. --cd=DIR Change current directory to DIR. -l TIMEOUT Set timeout in seconds for remote debugging. --configuration Print details about GDB configuration and then exit. --help Print this message and then exit. --version Print version information and then exit. ^ permalink raw reply [flat|nested] 39+ messages in thread
* regroup --help text (was: Re: [PATCH] Display configuration details in --help) 2013-04-12 14:43 ` Eli Zaretskii @ 2013-04-12 16:39 ` Pedro Alves 2013-06-22 11:31 ` regroup --help text " Eli Zaretskii 2013-04-12 20:50 ` [PATCH] Display configuration details in --help Tom Tromey ` (2 subsequent siblings) 3 siblings, 1 reply; 39+ messages in thread From: Pedro Alves @ 2013-04-12 16:39 UTC (permalink / raw) To: Eli Zaretskii; +Cc: tromey, dje, brobecker, gdb-patches On 04/12/2013 11:01 AM, Eli Zaretskii wrote: >> Date: Fri, 12 Apr 2013 11:58:48 +0300 >> From: Eli Zaretskii <eliz@gnu.org> >> Cc: palves@redhat.com, dje@google.com, brobecker@adacore.com, gdb-patches@sourceware.org >> >> I will take a shot on regrouping the --help text later. > > Howe about the following (if accepted, I will write a patch to > implement this): This is great. Many thanks. > > This is the GNU debugger. Usage: > > gdb [options] [executable-file [core-file or process-id]] > gdb [options] --args executable-file [inferior-arguments ...] > > Selection of debuggee and its files: > > --args Arguments after executable-file are passed to inferior. > --core=COREFILE Analyze the core dump COREFILE. > --exec=EXECFILE Use EXECFILE as the executable. > --pid=PID Attach to running process PID. > --directory=DIR Search for source files in DIR. > --se=FILE Use FILE as symbol file and executable file. > --symbols=SYMFILE Read symbols from SYMFILE. > --readnow Fully read symbol files on first access. > --write Set writing into executable and core files. > > Initial commands and command files: > > --command=FILE, -x Execute GDB commands from FILE. > --init-command=FILE, -ix > Like -x but execute commands before loading inferior. > --eval-command=COMMAND, -ex > Execute a single GDB command. > May be used multiple times and in conjunction > with --command. > --init-eval-command=COMMAND, -iex > Like -ex but before loading inferior. > --nh Do not read ~/.gdbinit. > --nx Do not read any .gdbinit files in any directory. > > Output and user interface control: > > --epoch Output information used by epoch emacs-GDB interface. > --fullname Output information used by emacs-GDB interface. > --interpreter=INTERP > Select a specific interpreter / user interface > --tty=TTY Use TTY for input/output by the program being debugged. > -w Use the GUI interface. > --nw Do not use the GUI interface. > --tui Use the text-mode user interface > --dbx DBX compatibility mode. > --xdb XDB compatibility mode. > --quiet Do not print version number on startup. > > Miscellaneous options: > > -b BAUDRATE Set serial port baud rate used for remote debugging. > --batch Exit after processing options. > --batch-silent Like --batch, but suppress all gdb stdout output. > --return-child-result > GDB exit code will be the child's exit code. > --cd=DIR Change current directory to DIR. > -l TIMEOUT Set timeout in seconds for remote debugging. > > --configuration Print details about GDB configuration and then exit. > --help Print this message and then exit. > --version Print version information and then exit. > I'd suggest splitting the miscellaneous section as: Operating modes: --batch Exit after processing options. --batch-silent Like --batch, but suppress all gdb stdout output. --return-child-result GDB exit code will be the child's exit code. --configuration Print details about GDB configuration and then exit. --help Print this message and then exit. --version Print version information and then exit. Remote debugging options: -b BAUDRATE Set serial port baud rate used for remote debugging. -l TIMEOUT Set timeout in seconds for remote debugging. Other options: --cd=DIR Change current directory to DIR. -- Pedro Alves ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: regroup --help text in --help) 2013-04-12 16:39 ` regroup --help text (was: Re: [PATCH] Display configuration details in --help) Pedro Alves @ 2013-06-22 11:31 ` Eli Zaretskii 2013-06-25 19:30 ` Pedro Alves 0 siblings, 1 reply; 39+ messages in thread From: Eli Zaretskii @ 2013-06-22 11:31 UTC (permalink / raw) To: Pedro Alves; +Cc: tromey, dje, brobecker, gdb-patches > Date: Fri, 12 Apr 2013 15:39:14 +0100 > From: Pedro Alves <palves@redhat.com> > CC: tromey@redhat.com, dje@google.com, brobecker@adacore.com, > gdb-patches@sourceware.org > > On 04/12/2013 11:01 AM, Eli Zaretskii wrote: > >> Date: Fri, 12 Apr 2013 11:58:48 +0300 > >> From: Eli Zaretskii <eliz@gnu.org> > >> Cc: palves@redhat.com, dje@google.com, brobecker@adacore.com, gdb-patches@sourceware.org > >> > >> I will take a shot on regrouping the --help text later. > > > > Howe about the following (if accepted, I will write a patch to > > implement this): > > This is great. Many thanks. > > > > > This is the GNU debugger. Usage: > > > > gdb [options] [executable-file [core-file or process-id]] > > gdb [options] --args executable-file [inferior-arguments ...] > > > > Selection of debuggee and its files: > > > > --args Arguments after executable-file are passed to inferior. > > --core=COREFILE Analyze the core dump COREFILE. > > --exec=EXECFILE Use EXECFILE as the executable. > > --pid=PID Attach to running process PID. > > --directory=DIR Search for source files in DIR. > > --se=FILE Use FILE as symbol file and executable file. > > --symbols=SYMFILE Read symbols from SYMFILE. > > --readnow Fully read symbol files on first access. > > --write Set writing into executable and core files. > > > > Initial commands and command files: > > > > --command=FILE, -x Execute GDB commands from FILE. > > --init-command=FILE, -ix > > Like -x but execute commands before loading inferior. > > --eval-command=COMMAND, -ex > > Execute a single GDB command. > > May be used multiple times and in conjunction > > with --command. > > --init-eval-command=COMMAND, -iex > > Like -ex but before loading inferior. > > --nh Do not read ~/.gdbinit. > > --nx Do not read any .gdbinit files in any directory. > > > > Output and user interface control: > > > > --epoch Output information used by epoch emacs-GDB interface. > > --fullname Output information used by emacs-GDB interface. > > --interpreter=INTERP > > Select a specific interpreter / user interface > > --tty=TTY Use TTY for input/output by the program being debugged. > > -w Use the GUI interface. > > --nw Do not use the GUI interface. > > --tui Use the text-mode user interface > > --dbx DBX compatibility mode. > > --xdb XDB compatibility mode. > > --quiet Do not print version number on startup. > > > > Miscellaneous options: > > > > -b BAUDRATE Set serial port baud rate used for remote debugging. > > --batch Exit after processing options. > > --batch-silent Like --batch, but suppress all gdb stdout output. > > --return-child-result > > GDB exit code will be the child's exit code. > > --cd=DIR Change current directory to DIR. > > -l TIMEOUT Set timeout in seconds for remote debugging. > > > > --configuration Print details about GDB configuration and then exit. > > --help Print this message and then exit. > > --version Print version information and then exit. > > > > I'd suggest splitting the miscellaneous section as: > > Operating modes: > > --batch Exit after processing options. > --batch-silent Like --batch, but suppress all gdb stdout output. > --return-child-result > GDB exit code will be the child's exit code. > > --configuration Print details about GDB configuration and then exit. > --help Print this message and then exit. > --version Print version information and then exit. > > Remote debugging options: > > -b BAUDRATE Set serial port baud rate used for remote debugging. > -l TIMEOUT Set timeout in seconds for remote debugging. > > Other options: > > --cd=DIR Change current directory to DIR. Long time ago, but not forgotten. The final patch appears below. I will commit it in a few days, if no one objects. 2013-06-22 Eli Zaretskii <eliz@gnu.org> * main.c (print_gdb_help): Regroup options in the --help text. See http://sourceware.org/ml/gdb-patches/2013-04/msg00362.html for the relevant discussions. Index: gdb/main.c =================================================================== RCS file: /cvs/src/src/gdb/main.c,v retrieving revision 1.125 diff -u -p -r1.125 main.c --- gdb/main.c 22 Apr 2013 16:46:15 -0000 1.125 +++ gdb/main.c 22 Jun 2013 11:22:40 -0000 @@ -1081,59 +1081,48 @@ print_gdb_help (struct ui_file *stream) get_init_files (&system_gdbinit, &home_gdbinit, &local_gdbinit); + /* Note: The options in the list below are only approximately sorted + in the alphabetical order, so as to group closely related options + together. */ fputs_unfiltered (_("\ This is the GNU debugger. Usage:\n\n\ gdb [options] [executable-file [core-file or process-id]]\n\ gdb [options] --args executable-file [inferior-arguments ...]\n\n\ -Options:\n\n\ "), stream); fputs_unfiltered (_("\ +Selection of debuggee and its files:\n\n\ --args Arguments after executable-file are passed to inferior\n\ + --core=COREFILE Analyze the core dump COREFILE.\n\ + --exec=EXECFILE Use EXECFILE as the executable.\n\ + --pid=PID Attach to running process PID.\n\ + --directory=DIR Search for source files in DIR.\n\ + --se=FILE Use FILE as symbol file and executable file.\n\ + --symbols=SYMFILE Read symbols from SYMFILE.\n\ + --readnow Fully read symbol files on first access.\n\ + --write Set writing into executable and core files.\n\n\ "), stream); fputs_unfiltered (_("\ - -b BAUDRATE Set serial port baud rate used for remote debugging.\n\ - --batch Exit after processing options.\n\ - --batch-silent As for --batch, but suppress all gdb stdout output.\n\ - --return-child-result\n\ - GDB exit code will be the child's exit code.\n\ - --cd=DIR Change current directory to DIR.\n\ +Initial commands and command files:\n\n\ --command=FILE, -x Execute GDB commands from FILE.\n\ + --init-command=FILE, -ix\n\ + Like -x but execute commands before loading inferior.\n\ --eval-command=COMMAND, -ex\n\ Execute a single GDB command.\n\ May be used multiple times and in conjunction\n\ with --command.\n\ - --init-command=FILE, -ix Like -x but execute it before loading inferior.\n\ - --init-eval-command=COMMAND, -iex Like -ex but before loading inferior.\n\ - --core=COREFILE Analyze the core dump COREFILE.\n\ - --pid=PID Attach to running process PID.\n\ + --init-eval-command=COMMAND, -iex\n\ + Like -ex but before loading inferior.\n\ + --nh Do not read ~/.gdbinit.\n\ + --nx Do not read any .gdbinit files in any directory.\n\n\ "), stream); fputs_unfiltered (_("\ - --dbx DBX compatibility mode.\n\ - --directory=DIR Search for source files in DIR.\n\ - --exec=EXECFILE Use EXECFILE as the executable.\n\ +Output and user interface control:\n\n\ --fullname Output information used by emacs-GDB interface.\n\ - --help Print this message.\n\ -"), stream); - fputs_unfiltered (_("\ --interpreter=INTERP\n\ Select a specific interpreter / user interface\n\ -"), stream); - fputs_unfiltered (_("\ - -l TIMEOUT Set timeout in seconds for remote debugging.\n\ - --nw Do not use a window interface.\n\ - --nx Do not read any "), stream); - fputs_unfiltered (gdbinit, stream); - fputs_unfiltered (_(" files.\n\ - --nh Do not read "), stream); - fputs_unfiltered (gdbinit, stream); - fputs_unfiltered (_(" file from home directory.\n\ - --quiet Do not print version number on startup.\n\ - --readnow Fully read symbol files on first access.\n\ -"), stream); - fputs_unfiltered (_("\ - --se=FILE Use FILE as symbol file and executable file.\n\ - --symbols=SYMFILE Read symbols from SYMFILE.\n\ --tty=TTY Use TTY for input/output by the program being debugged.\n\ + -w Use the GUI interface.\n\ + --nw Do not use the GUI interface.\n\ "), stream); #if defined(TUI) fputs_unfiltered (_("\ @@ -1141,11 +1130,24 @@ Options:\n\n\ "), stream); #endif fputs_unfiltered (_("\ - --version Print version information and then exit.\n\ - --configuration Print details about GDB configuration and then exit.\n\ - -w Use a window interface.\n\ - --write Set writing into executable and core files.\n\ + --dbx DBX compatibility mode.\n\ --xdb XDB compatibility mode.\n\ + --quiet Do not print version number on startup.\n\n\ +"), stream); + fputs_unfiltered (_("\ +Operating modes:\n\n\ + --batch Exit after processing options.\n\ + --batch-silent Like --batch, but suppress all gdb stdout output.\n\ + --return-child-result\n\ + GDB exit code will be the child's exit code.\n\ + --configuration Print details about GDB configuration and then exit.\n\ + --help Print this message and then exit.\n\ + --version Print version information and then exit.\n\n\ +Remote debugging options:\n\n\ + -b BAUDRATE Set serial port baud rate used for remote debugging.\n\ + -l TIMEOUT Set timeout in seconds for remote debugging.\n\n\ +Other options:\n\n\ + --cd=DIR Change current directory to DIR.\n\ "), stream); fputs_unfiltered (_("\n\ At startup, GDB reads the following init files and executes their commands:\n\ ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: regroup --help text in --help) 2013-06-22 11:31 ` regroup --help text " Eli Zaretskii @ 2013-06-25 19:30 ` Pedro Alves 2013-07-06 7:35 ` Eli Zaretskii 0 siblings, 1 reply; 39+ messages in thread From: Pedro Alves @ 2013-06-25 19:30 UTC (permalink / raw) To: Eli Zaretskii; +Cc: tromey, dje, brobecker, gdb-patches On 06/22/2013 12:23 PM, Eli Zaretskii wrote: > Long time ago, but not forgotten. The final patch appears below. I > will commit it in a few days, if no one objects. > > 2013-06-22 Eli Zaretskii <eliz@gnu.org> > > * main.c (print_gdb_help): Regroup options in the --help text. > See http://sourceware.org/ml/gdb-patches/2013-04/msg00362.html for > the relevant discussions. This looks great to me. Thanks a lot! -- Pedro Alves ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: regroup --help text in --help) 2013-06-25 19:30 ` Pedro Alves @ 2013-07-06 7:35 ` Eli Zaretskii 0 siblings, 0 replies; 39+ messages in thread From: Eli Zaretskii @ 2013-07-06 7:35 UTC (permalink / raw) To: Pedro Alves; +Cc: tromey, dje, brobecker, gdb-patches > Date: Tue, 25 Jun 2013 20:23:29 +0100 > From: Pedro Alves <palves@redhat.com> > CC: tromey@redhat.com, dje@google.com, brobecker@adacore.com, > gdb-patches@sourceware.org > > On 06/22/2013 12:23 PM, Eli Zaretskii wrote: > > Long time ago, but not forgotten. The final patch appears below. I > > will commit it in a few days, if no one objects. > > > > 2013-06-22 Eli Zaretskii <eliz@gnu.org> > > > > * main.c (print_gdb_help): Regroup options in the --help text. > > See http://sourceware.org/ml/gdb-patches/2013-04/msg00362.html for > > the relevant discussions. > > This looks great to me. > > Thanks a lot! Committed. ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Display configuration details in --help 2013-04-12 14:43 ` Eli Zaretskii 2013-04-12 16:39 ` regroup --help text (was: Re: [PATCH] Display configuration details in --help) Pedro Alves @ 2013-04-12 20:50 ` Tom Tromey 2013-04-14 14:17 ` Joel Brobecker 2013-04-16 1:34 ` Doug Evans 3 siblings, 0 replies; 39+ messages in thread From: Tom Tromey @ 2013-04-12 20:50 UTC (permalink / raw) To: Eli Zaretskii; +Cc: palves, dje, brobecker, gdb-patches >>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes: Eli> --epoch Output information used by epoch emacs-GDB interface. --epoch is gone now. Tom ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Display configuration details in --help 2013-04-12 14:43 ` Eli Zaretskii 2013-04-12 16:39 ` regroup --help text (was: Re: [PATCH] Display configuration details in --help) Pedro Alves 2013-04-12 20:50 ` [PATCH] Display configuration details in --help Tom Tromey @ 2013-04-14 14:17 ` Joel Brobecker 2013-04-16 1:34 ` Doug Evans 3 siblings, 0 replies; 39+ messages in thread From: Joel Brobecker @ 2013-04-14 14:17 UTC (permalink / raw) To: Eli Zaretskii; +Cc: tromey, palves, dje, gdb-patches > Howe about the following (if accepted, I will write a patch to > implement this): Looks like a nice improvement! -- Joel ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Display configuration details in --help 2013-04-12 14:43 ` Eli Zaretskii ` (2 preceding siblings ...) 2013-04-14 14:17 ` Joel Brobecker @ 2013-04-16 1:34 ` Doug Evans 2013-04-16 9:46 ` regroup --help text Eli Zaretskii 3 siblings, 1 reply; 39+ messages in thread From: Doug Evans @ 2013-04-16 1:34 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Tom Tromey, Pedro Alves, Joel Brobecker, gdb-patches On Fri, Apr 12, 2013 at 3:01 AM, Eli Zaretskii <eliz@gnu.org> wrote: >> Date: Fri, 12 Apr 2013 11:58:48 +0300 >> From: Eli Zaretskii <eliz@gnu.org> >> Cc: palves@redhat.com, dje@google.com, brobecker@adacore.com, gdb-patches@sourceware.org >> >> I will take a shot on regrouping the --help text later. > > Howe about the following (if accepted, I will write a patch to > implement this): > > This is the GNU debugger. Usage: > > gdb [options] [executable-file [core-file or process-id]] > gdb [options] --args executable-file [inferior-arguments ...] > > Selection of debuggee and its files: > > --args Arguments after executable-file are passed to inferior. > --core=COREFILE Analyze the core dump COREFILE. > --exec=EXECFILE Use EXECFILE as the executable. > --pid=PID Attach to running process PID. > --directory=DIR Search for source files in DIR. > --se=FILE Use FILE as symbol file and executable file. > --symbols=SYMFILE Read symbols from SYMFILE. > --readnow Fully read symbol files on first access. > --write Set writing into executable and core files. > > Initial commands and command files: > > --command=FILE, -x Execute GDB commands from FILE. > --init-command=FILE, -ix > Like -x but execute commands before loading inferior. > --eval-command=COMMAND, -ex > Execute a single GDB command. > May be used multiple times and in conjunction > with --command. > --init-eval-command=COMMAND, -iex > Like -ex but before loading inferior. > --nh Do not read ~/.gdbinit. > --nx Do not read any .gdbinit files in any directory. > > Output and user interface control: > > --epoch Output information used by epoch emacs-GDB interface. > --fullname Output information used by emacs-GDB interface. > --interpreter=INTERP > Select a specific interpreter / user interface > --tty=TTY Use TTY for input/output by the program being debugged. > -w Use the GUI interface. > --nw Do not use the GUI interface. > --tui Use the text-mode user interface > --dbx DBX compatibility mode. > --xdb XDB compatibility mode. > --quiet Do not print version number on startup. > > Miscellaneous options: > > -b BAUDRATE Set serial port baud rate used for remote debugging. > --batch Exit after processing options. > --batch-silent Like --batch, but suppress all gdb stdout output. > --return-child-result > GDB exit code will be the child's exit code. > --cd=DIR Change current directory to DIR. > -l TIMEOUT Set timeout in seconds for remote debugging. > > --configuration Print details about GDB configuration and then exit. > --help Print this message and then exit. > --version Print version information and then exit. Works for me, modulo do we care about alpha-sorting within each section? [If not, please add a comment saying that the lists are intentionally sorted (if at all) via means other than alphabetical.] Thanks! ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: regroup --help text 2013-04-16 1:34 ` Doug Evans @ 2013-04-16 9:46 ` Eli Zaretskii 2013-04-17 8:10 ` Doug Evans 0 siblings, 1 reply; 39+ messages in thread From: Eli Zaretskii @ 2013-04-16 9:46 UTC (permalink / raw) To: Doug Evans; +Cc: tromey, palves, brobecker, gdb-patches > Date: Mon, 15 Apr 2013 11:12:45 -0700 > From: Doug Evans <dje@google.com> > Cc: Tom Tromey <tromey@redhat.com>, Pedro Alves <palves@redhat.com>, > Joel Brobecker <brobecker@adacore.com>, gdb-patches <gdb-patches@sourceware.org> > > Works for me, modulo do we care about alpha-sorting within each section? I did try to do that, where there's no other order relation. > [If not, please add a comment saying that the lists are intentionally > sorted (if at all) via means other than alphabetical.] What you mean note that in the help text itself? Or in the code? ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: regroup --help text 2013-04-16 9:46 ` regroup --help text Eli Zaretskii @ 2013-04-17 8:10 ` Doug Evans 2013-04-17 12:28 ` Eli Zaretskii 0 siblings, 1 reply; 39+ messages in thread From: Doug Evans @ 2013-04-17 8:10 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Tom Tromey, Pedro Alves, Joel Brobecker, gdb-patches On Mon, Apr 15, 2013 at 10:48 PM, Eli Zaretskii <eliz@gnu.org> wrote: >> Date: Mon, 15 Apr 2013 11:12:45 -0700 >> From: Doug Evans <dje@google.com> >> Cc: Tom Tromey <tromey@redhat.com>, Pedro Alves <palves@redhat.com>, >> Joel Brobecker <brobecker@adacore.com>, gdb-patches <gdb-patches@sourceware.org> >> >> Works for me, modulo do we care about alpha-sorting within each section? > > I did try to do that, where there's no other order relation. > >> [If not, please add a comment saying that the lists are intentionally >> sorted (if at all) via means other than alphabetical.] > > What you mean note that in the help text itself? Or in the code? In the code. ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: regroup --help text 2013-04-17 8:10 ` Doug Evans @ 2013-04-17 12:28 ` Eli Zaretskii 0 siblings, 0 replies; 39+ messages in thread From: Eli Zaretskii @ 2013-04-17 12:28 UTC (permalink / raw) To: Doug Evans; +Cc: tromey, palves, brobecker, gdb-patches > Date: Tue, 16 Apr 2013 13:41:32 -0700 > From: Doug Evans <dje@google.com> > Cc: Tom Tromey <tromey@redhat.com>, Pedro Alves <palves@redhat.com>, > Joel Brobecker <brobecker@adacore.com>, gdb-patches <gdb-patches@sourceware.org> > > On Mon, Apr 15, 2013 at 10:48 PM, Eli Zaretskii <eliz@gnu.org> wrote: > >> Date: Mon, 15 Apr 2013 11:12:45 -0700 > >> From: Doug Evans <dje@google.com> > >> Cc: Tom Tromey <tromey@redhat.com>, Pedro Alves <palves@redhat.com>, > >> Joel Brobecker <brobecker@adacore.com>, gdb-patches <gdb-patches@sourceware.org> > >> > >> Works for me, modulo do we care about alpha-sorting within each section? > > > > I did try to do that, where there's no other order relation. > > > >> [If not, please add a comment saying that the lists are intentionally > >> sorted (if at all) via means other than alphabetical.] > > > > What you mean note that in the help text itself? Or in the code? > > In the code. Will do, thanks. ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Display configuration details in --help 2013-04-12 12:50 ` Eli Zaretskii 2013-04-12 14:43 ` Eli Zaretskii @ 2013-04-14 14:16 ` Doug Evans 1 sibling, 0 replies; 39+ messages in thread From: Doug Evans @ 2013-04-14 14:16 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Tom Tromey, palves, brobecker, gdb-patches Eli Zaretskii writes: > > From: Tom Tromey <tromey@redhat.com> > > Cc: Doug Evans <dje@google.com>, Eli Zaretskii <eliz@gnu.org>, > > Joel Brobecker <brobecker@adacore.com>, > > gdb-patches <gdb-patches@sourceware.org> > > Date: Wed, 10 Apr 2013 13:16:39 -0600 > > > > Pedro> But we shouldn't stale Eli's patch for this. > > > > Yes, I agree. > > Thanks, committed. > > I will take a shot on regrouping the --help text later. Hi. It helps my browsing of ChangeLog entries if they follow the convention that related patches are not separated by a blank line. Plus I added an entry for NEWS. Committed. Index: ChangeLog =================================================================== RCS file: /cvs/src/src/gdb/ChangeLog,v retrieving revision 1.15404 diff -u -p -r1.15404 ChangeLog --- ChangeLog 12 Apr 2013 16:04:07 -0000 1.15404 +++ ChangeLog 12 Apr 2013 17:11:23 -0000 @@ -91,13 +91,12 @@ 2013-04-12 Eli Zaretskii <eliz@gnu.org> + * NEWS: Mention "show configuration", --configuration. * top.c (print_gdb_configuration): New function, displays the details about GDB configure-time parameters. (print_gdb_version): Mention "show configuration". - * cli/cli-cmds.c (show_configuration): New function. (_initialize_cli_cmds): Add the "show configuration" command. - * main.c (captured_main) <print_configuration>: New static var. <long_options>: Use it. If --configuration was given, call print_gdb_configuration. ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Display configuration details in --help 2013-04-09 23:33 ` Doug Evans 2013-04-10 0:12 ` Pedro Alves @ 2013-04-10 0:38 ` Eli Zaretskii 2013-04-10 3:06 ` Doug Evans 1 sibling, 1 reply; 39+ messages in thread From: Eli Zaretskii @ 2013-04-10 0:38 UTC (permalink / raw) To: Doug Evans; +Cc: tromey, brobecker, palves, gdb-patches > Date: Tue, 9 Apr 2013 10:53:35 -0700 > From: Doug Evans <dje@google.com> > Cc: Tom Tromey <tromey@redhat.com>, Joel Brobecker <brobecker@adacore.com>, > Pedro Alves <palves@redhat.com>, gdb-patches <gdb-patches@sourceware.org> > > GNU gdb (GDB) 7.5.1 > > Copyright (C) 2012 Free Software Foundation, Inc. > > License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> > > This is free software: you are free to change and redistribute it. > > There is NO WARRANTY, to the extent permitted by law. Type "show copying" > > and "show warranty" for details. ^^^^^^^^^^^^^^^^^^ > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > > > So I thought we should be consistent here, and offer the same for this > > line: > > > > This GDB was configured as "i686-pc-mingw32". > > > > I'm okay with not adding that, but can someone explain why it is > > different from advertising "show copying" and "show warranty"? Should > > we remove those two as well? > > I need to check, but I think(!) the "show copying" and "show warranty" > are required by GNU standards. As I said, I don't mind removing the line I added. I'll do that if no one else has a different opinion. > >> > + fprintf_filtered (stream, _("\ > >> > + --without-expat\n\ > >> > +")); > >> > +#endif > >> > >> If we've already discussed this, please ignore, but ... :-) > >> I'd prefer one line per fprintf instead of three. > > > > Sorry, I'm not following: what 3 lines? Can you show how would you > > like the code be reformatted? > > fprintf_filtered (stream, _(" -with-expat\n")); // assuming 2 > space indentation OK, I used the style I did because it makes it much easier to keep the alignment visible, without the need to count characters and columns. ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Display configuration details in --help 2013-04-10 0:38 ` Eli Zaretskii @ 2013-04-10 3:06 ` Doug Evans 2013-04-10 4:44 ` Eli Zaretskii 0 siblings, 1 reply; 39+ messages in thread From: Doug Evans @ 2013-04-10 3:06 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Tom Tromey, Joel Brobecker, Pedro Alves, gdb-patches On Tue, Apr 9, 2013 at 11:51 AM, Eli Zaretskii <eliz@gnu.org> wrote: >> >> > + fprintf_filtered (stream, _("\ >> >> > + --without-expat\n\ >> >> > +")); >> >> > +#endif >> >> >> >> If we've already discussed this, please ignore, but ... :-) >> >> I'd prefer one line per fprintf instead of three. >> > >> > Sorry, I'm not following: what 3 lines? Can you show how would you >> > like the code be reformatted? >> >> fprintf_filtered (stream, _(" -with-expat\n")); // assuming 2 >> space indentation > > OK, I used the style I did because it makes it much easier to keep the > alignment visible, without the need to count characters and columns. I'm not sure. 13 is a lot to visualize and given the vertical span it's not straightforward, to me anyway. Using a more explicit form for the indentation (making it a parameter to the printf) works better for me if the amount of indentation is going to be that much. ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Display configuration details in --help 2013-04-10 3:06 ` Doug Evans @ 2013-04-10 4:44 ` Eli Zaretskii 0 siblings, 0 replies; 39+ messages in thread From: Eli Zaretskii @ 2013-04-10 4:44 UTC (permalink / raw) To: Doug Evans; +Cc: tromey, brobecker, palves, gdb-patches > Date: Tue, 9 Apr 2013 12:31:16 -0700 > From: Doug Evans <dje@google.com> > Cc: Tom Tromey <tromey@redhat.com>, Joel Brobecker <brobecker@adacore.com>, > Pedro Alves <palves@redhat.com>, gdb-patches <gdb-patches@sourceware.org> > > On Tue, Apr 9, 2013 at 11:51 AM, Eli Zaretskii <eliz@gnu.org> wrote: > >> >> > + fprintf_filtered (stream, _("\ > >> >> > + --without-expat\n\ > >> >> > +")); > >> >> > +#endif > >> >> > >> >> If we've already discussed this, please ignore, but ... :-) > >> >> I'd prefer one line per fprintf instead of three. > >> > > >> > Sorry, I'm not following: what 3 lines? Can you show how would you > >> > like the code be reformatted? > >> > >> fprintf_filtered (stream, _(" -with-expat\n")); // assuming 2 > >> space indentation > > > > OK, I used the style I did because it makes it much easier to keep the > > alignment visible, without the need to count characters and columns. > > I'm not sure. 13 is a lot to visualize and given the vertical span > it's not straightforward, to me anyway. > > Using a more explicit form for the indentation (making it a parameter > to the printf) works better for me if the amount of indentation is > going to be that much. These are minor stylistic issues, really just personal preferences. Are they important enough to block the commit? ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH] Display configuration details in --help 2013-03-21 18:00 ` Doug Evans 2013-03-21 18:25 ` Pedro Alves @ 2013-03-21 18:53 ` Eli Zaretskii 1 sibling, 0 replies; 39+ messages in thread From: Eli Zaretskii @ 2013-03-21 18:53 UTC (permalink / raw) To: Doug Evans; +Cc: gdb-patches > Date: Thu, 21 Mar 2013 10:54:44 -0700 > From: Doug Evans <dje@google.com> > Cc: gdb-patches <gdb-patches@sourceware.org> > > I like the idea, but the implementation imposes a future > maintenance burden. Yes, I considered that as well. But I succeeded in convincing myself that the problem is not that significant, because: . configuration options change relatively rarely . it is not a catastrophe if a new option is added that is not reflected in this output for a while (options that are removed will cause compilation failures, so that's not a problem) . a slightly outdated output is much better than nothing at all > Would it be sufficient to just store the original string somewhere and > print that? I thought about that, but the problem is that most options are not explicitly mentioned on the configure command line, they are auto-detected by the configury. So if we want to automate this, we will need some configure-time magic, like create a file with these options. ^ permalink raw reply [flat|nested] 39+ messages in thread
end of thread, other threads:[~2013-07-06 7:35 UTC | newest] Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-03-20 17:46 [PATCH] Display configuration details in --help Eli Zaretskii 2013-03-21 18:00 ` Doug Evans 2013-03-21 18:25 ` Pedro Alves 2013-03-21 18:29 ` Joel Brobecker 2013-03-21 18:44 ` Eli Zaretskii 2013-03-21 19:11 ` Joel Brobecker 2013-03-21 20:39 ` Eli Zaretskii 2013-03-21 20:55 ` Joel Brobecker 2013-03-21 21:17 ` Tom Tromey 2013-03-21 22:23 ` Eli Zaretskii 2013-04-09 19:31 ` Eli Zaretskii 2013-04-09 19:46 ` Doug Evans 2013-04-09 20:04 ` Eli Zaretskii 2013-04-09 23:33 ` Doug Evans 2013-04-10 0:12 ` Pedro Alves 2013-04-10 0:48 ` Eli Zaretskii 2013-04-10 2:51 ` Doug Evans 2013-04-10 4:41 ` Eli Zaretskii 2013-04-11 2:41 ` Doug Evans 2013-04-11 1:20 ` Tom Tromey 2013-04-11 1:24 ` Pedro Alves 2013-04-11 2:43 ` Tom Tromey 2013-04-12 12:50 ` Eli Zaretskii 2013-04-12 14:43 ` Eli Zaretskii 2013-04-12 16:39 ` regroup --help text (was: Re: [PATCH] Display configuration details in --help) Pedro Alves 2013-06-22 11:31 ` regroup --help text " Eli Zaretskii 2013-06-25 19:30 ` Pedro Alves 2013-07-06 7:35 ` Eli Zaretskii 2013-04-12 20:50 ` [PATCH] Display configuration details in --help Tom Tromey 2013-04-14 14:17 ` Joel Brobecker 2013-04-16 1:34 ` Doug Evans 2013-04-16 9:46 ` regroup --help text Eli Zaretskii 2013-04-17 8:10 ` Doug Evans 2013-04-17 12:28 ` Eli Zaretskii 2013-04-14 14:16 ` [PATCH] Display configuration details in --help Doug Evans 2013-04-10 0:38 ` Eli Zaretskii 2013-04-10 3:06 ` Doug Evans 2013-04-10 4:44 ` Eli Zaretskii 2013-03-21 18:53 ` Eli Zaretskii
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox