Update "gdb --configuration"

Message ID 838tb1wmrh.fsf@gnu.org
State New
Headers show
Series
  • Update "gdb --configuration"
Related show

Commit Message

Eli Zaretskii March 9, 2018, 10:45 a.m.
The patch below adds more config information to the text we produce.
OK to commit?

2018-03-09  Eli Zaretskii  <eliz@gnu.org>

	* top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
	and LIBMPFR in the printed configuration.

Comments

Joel Brobecker March 9, 2018, 10:57 a.m. | #1
Hi Eli,

On Fri, Mar 09, 2018 at 12:45:22PM +0200, Eli Zaretskii wrote:
> The patch below adds more config information to the text we produce.

> OK to commit?

> 

> 2018-03-09  Eli Zaretskii  <eliz@gnu.org>

> 

> 	* top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,

> 	and LIBMPFR in the printed configuration.


Looks good to me, modulo one tiny think-o below:

> +#if HAVE_LIBMPFR

> +    fprintf_filtered (stream, _("\

> +             --with-libmpfr\n\


It's actually --with-mpfr.

> +"));

> +#else

> +    fprintf_filtered (stream, _("\

> +             --without-libmpfr\n\


Same here.

-- 
Joel
Eli Zaretskii March 9, 2018, 2:01 p.m. | #2
> Date: Fri, 9 Mar 2018 11:57:52 +0100

> From: Joel Brobecker <brobecker@adacore.com>

> Cc: gdb-patches@sourceware.org

> 

> Looks good to me, modulo one tiny think-o below:

> 

> > +#if HAVE_LIBMPFR

> > +    fprintf_filtered (stream, _("\

> > +             --with-libmpfr\n\

> 

> It's actually --with-mpfr.

> 

> > +"));

> > +#else

> > +    fprintf_filtered (stream, _("\

> > +             --without-libmpfr\n\

> 

> Same here.


Thanks, fixed and pushed to the master branch.

Patch

--- gdb/top.c~	2018-01-31 04:58:50.000000000 +0200
+++ gdb/top.c	2018-03-09 12:34:51.078125000 +0200
@@ -1386,6 +1386,42 @@  This GDB was configured as follows:\n\
              --without-lzma\n\
 "));
 #endif
+#if HAVE_LIBBABELTRACE
+    fprintf_filtered (stream, _("\
+             --with-babeltrace\n\
+"));
+#else
+    fprintf_filtered (stream, _("\
+             --without-babeltrace\n\
+"));
+#endif
+#if HAVE_LIBIPT
+    fprintf_filtered (stream, _("\
+             --with-intel-pt\n\
+"));
+#else
+    fprintf_filtered (stream, _("\
+             --without-intel-pt\n\
+"));
+#endif
+#if HAVE_LIBMCHECK
+    fprintf_filtered (stream, _("\
+             --enable-libmcheck\n\
+"));
+#else
+    fprintf_filtered (stream, _("\
+             --disable-libmcheck\n\
+"));
+#endif
+#if HAVE_LIBMPFR
+    fprintf_filtered (stream, _("\
+             --with-libmpfr\n\
+"));
+#else
+    fprintf_filtered (stream, _("\
+             --without-libmpfr\n\
+"));
+#endif
 #ifdef WITH_PYTHON_PATH
   fprintf_filtered (stream, _("\
              --with-python=%s%s\n\
@@ -1417,15 +1453,6 @@  This GDB was configured as follows:\n\
     fprintf_filtered (stream, _("\
              --with-system-gdbinit=%s%s\n\
 "), SYSTEM_GDBINIT, SYSTEM_GDBINIT_RELOCATABLE ? " (relocatable)" : "");
-#if HAVE_LIBBABELTRACE
-    fprintf_filtered (stream, _("\
-             --with-babeltrace\n\
-"));
-#else
-    fprintf_filtered (stream, _("\
-             --without-babeltrace\n\
-"));
-#endif
     /* We assume "relocatable" will be printed at least once, thus we always
        print this text.  It's a reasonably safe assumption for now.  */
     fprintf_filtered (stream, _("\n\