aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-01-03 03:06:28 -0500
committerMike Frysinger <vapier@gentoo.org>2021-01-04 18:10:40 -0500
commitbabd2ee15db7700945f6d10c5f1f7759a79ad2f6 (patch)
tree65e56fb102c091ea8582bcabc78bd8d40fce93a9 /sim
parent2b667e32973db97fb12b78f4f4d950c8c538d67c (diff)
downloadgdb-babd2ee15db7700945f6d10c5f1f7759a79ad2f6.zip
gdb-babd2ee15db7700945f6d10c5f1f7759a79ad2f6.tar.gz
gdb-babd2ee15db7700945f6d10c5f1f7759a79ad2f6.tar.bz2
sim: common: version: add build & homepage info when interactive
This mirrors gdb behavior of dumping extra info when being run in interactive mode. It also gives us an excuse to use the otherwise unused sim_print_config.
Diffstat (limited to 'sim')
-rw-r--r--sim/common/ChangeLog5
-rw-r--r--sim/common/sim-options.c15
2 files changed, 20 insertions, 0 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 1781544..1bd6741 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,5 +1,10 @@
2021-01-04 Mike Frysinger <vapier@gentoo.org>
+ * sim-options.c (sim_print_version): Print out more details when
+ is_command is non-zero.
+
+2021-01-04 Mike Frysinger <vapier@gentoo.org>
+
* sim-options.c (standard_option_handler): Call sim_print_version.
(sim_print_version): New function.
* sim-options.h (sim_print_version): New prototype.
diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c
index 1d8abda..e0de39a 100644
--- a/sim/common/sim-options.c
+++ b/sim/common/sim-options.c
@@ -835,6 +835,21 @@ sim_print_version (SIM_DESC sd, int is_command)
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>\
\nThis is free software: you are free to change and redistribute it.\n\
There is NO WARRANTY, to the extent permitted by law.\n");
+
+ if (!is_command)
+ return;
+
+ sim_io_printf (sd, "This SIM was configured as:\n");
+ sim_config_print (sd);
+
+ if (REPORT_BUGS_TO[0])
+ {
+ sim_io_printf (sd, "For bug reporting instructions, please see:\n\
+ %s.\n",
+ REPORT_BUGS_TO);
+ }
+ sim_io_printf (sd, "Find the SIM homepage & other documentation resources \
+online at:\n <https://sourceware.org/gdb/wiki/Sim/>.\n");
}
/* Utility of sim_args_command to find the closest match for a command.