diff --git a/gdb/NEWS b/gdb/NEWS index 38efc3b543a..20837bb7b17 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -140,6 +140,9 @@ maintenance print remote-registers which registers were included in the last stop reply packet received by GDB. +show configuration + Now includes the version of GNU Readline library that GDB is using. + * New remote packets vFile:stat diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 53f41e67444..99720f1206e 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -2491,6 +2491,7 @@ Display information about permission for copying @value{GDBN}. Display the @sc{gnu} ``NO WARRANTY'' statement, or a warranty, if your version of @value{GDBN} comes with one. +@anchor{show configuration} @kindex show configuration @item show configuration Display detailed information about the way @value{GDBN} was configured @@ -2500,6 +2501,11 @@ automatically by @command{configure}. When reporting a @value{GDBN} bug (@pxref{GDB Bugs}), it is important to include this information in your report. +This commands also displays the version number of the Readline library +that @value{GDBN} is using. After the version number will appear +either @samp{(system)} indicating @value{GDBN} is using the shared +system Readline library, or @samp{(internal)} indicating @value{GDBN} +is using a statically linked in version of the Readline library. @end table @node Running @@ -27534,6 +27540,10 @@ This command accepts the current line for execution and fetches the next line relative to the current line from the history for editing. Any argument is ignored. +It is possible to discover which version of Readline @value{GDBN} is +using with the @kbd{show configuration} command (@pxref{show +configuration}). + @node Command History @section Command History @cindex command history diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp index d6aa22321f1..f1e1b877480 100644 --- a/gdb/testsuite/gdb.base/maint.exp +++ b/gdb/testsuite/gdb.base/maint.exp @@ -381,6 +381,9 @@ gdb_test "maint" \ "List.*unambiguous\\..*" \ "maint w/o args" +gdb_test "show configuration" \ + "^This GDB was configured as follows:\r\n.*\r\nGNU Readline library version: \[^\r\n\]+" + # Test that "main info line-table" w/o a file name shows the symtab for # $srcfile. set saw_srcfile 0 diff --git a/gdb/top.c b/gdb/top.c index 45261c8f2a5..d750f3305f2 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -1601,6 +1601,16 @@ This GDB was configured as follows:\n\ (\"Relocatable\" means the directory can be moved with the GDB installation\n\ tree, and GDB will still find it.)\n\ ")); + + gdb_printf (stream, "\n"); + gdb_printf (stream, _("GNU Readline library version: %s\t%s\n"), + rl_library_version, +#ifdef HAVE_READLINE_READLINE_H + "(system)" +#else + "(internal)" +#endif + ); }