diff options
author | Andrew Burgess <aburgess@redhat.com> | 2024-10-30 11:44:23 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2024-11-12 13:58:19 +0000 |
commit | b0c6153ccfbbcf6c57f7eae2efbdea8019e0cba2 (patch) | |
tree | 7694128d95cfbb71a42747ba3a8be4c1418fa502 /gdb/top.c | |
parent | gdbserver: pass osabi to GDB in more target descriptions (diff) | |
download | binutils-gdb-b0c6153ccfbbcf6c57f7eae2efbdea8019e0cba2.tar.gz binutils-gdb-b0c6153ccfbbcf6c57f7eae2efbdea8019e0cba2.tar.bz2 binutils-gdb-b0c6153ccfbbcf6c57f7eae2efbdea8019e0cba2.zip |
gdb/readline: add readline library version to 'show configuration'
When debugging readline issues I'd like an easy way to know (for sure)
what version of readline GDB is using. This could also be useful when
writing readline tests, knowing the precise readline version will
allow us to know if we expect a test to pass or not.
Add the readline library version to the output of the 'show
configuration' command. Also include a suffix indicating if we are
using the system readline, or the statically linked in readline.
The information about static readline vs shared readline can be
figured out from the configure command output, but having it repeated
in the readline version line makes it super easy to grok within tests,
and it's super cheap, so I don't see this as a problem.
Diffstat (limited to 'gdb/top.c')
-rw-r--r-- | gdb/top.c | 10 |
1 files changed, 10 insertions, 0 deletions
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 + ); } |