aboutsummaryrefslogtreecommitdiff
path: root/gdb/main.c
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@broadcom.com>2013-09-18 11:41:38 +0000
committerAndrew Burgess <aburgess@broadcom.com>2013-09-18 11:41:38 +0000
commitc88a15316ec1c0aca20e741a92b2189cbb020ca0 (patch)
tree1b2cfc8fe7028580bec58a13dad7fa43fadf13cd /gdb/main.c
parentbc080e949dc7cbeafd60773d658f58afcf60e498 (diff)
downloadgdb-c88a15316ec1c0aca20e741a92b2189cbb020ca0.zip
gdb-c88a15316ec1c0aca20e741a92b2189cbb020ca0.tar.gz
gdb-c88a15316ec1c0aca20e741a92b2189cbb020ca0.tar.bz2
Add new function to access gdb_program_name.
https://sourceware.org/ml/gdb-patches/2013-09/msg00225.html gdb/ChangeLog * main.h (get_gdb_program_name): Add declaration. * main.c (get_gdb_program_name): Add definition.
Diffstat (limited to 'gdb/main.c')
-rw-r--r--gdb/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/main.c b/gdb/main.c
index 11f4b03..3e0e1fe 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -98,6 +98,13 @@ int return_child_result_value = -1;
/* GDB as it has been invoked from the command line (i.e. argv[0]). */
static char *gdb_program_name;
+/* Return read only pointer to GDB_PROGRAM_NAME. */
+const char *
+get_gdb_program_name (void)
+{
+ return gdb_program_name;
+}
+
static void print_gdb_help (struct ui_file *);
/* Relocate a file or directory. PROGNAME is the name by which gdb