summaryrefslogtreecommitdiff
path: root/gdb/top.h
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2013-07-01 11:24:16 +0000
committerPedro Alves <palves@redhat.com>2013-07-01 11:24:16 +0000
commit0516a30a6658ec161489d5ac2b704bc0604ceab9 (patch)
tree0d138a50f0879921754c7585e5dc1871a6583b28 /gdb/top.h
parentc80f3fec040bc0ba629c910da2b773d5215859aa (diff)
downloadgdb-0516a30a6658ec161489d5ac2b704bc0604ceab9.tar.gz
Reimplement DJGPP's .gdbinit -> gdb.ini renaming.
This simplifies the .gdbinit filename selection logic. We have a GDBINIT_FILENAME define that supposedly configurations would override, but none do so. Instead, the only configuration that wants a different file name instead of ".gdbinit", djgpp, does a strcpy over the gdbinit global array. This means the array needs to be sized, and the code that does that is doing the usual 'PATH_MAX/FILENAME_MAX/fallback constant/etc.' mess. Instead of all that, it's much simpler to have configure specificy the .gdbinit filename. As bonus, we can then make the "gdbinit" global array const. gdb/ 2013-07-01 Pedro Alves <palves@redhat.com> * configure.ac (GDBINIT): Define, depending on host. * go32-nat.c (init_go32_ops): Don't override gdbinit here. * top.c (PATH_MAX): Delete fallback definition. (GDBINIT_FILENAME): Delete. (gdbinit): Reimplement as const char array set to the GDBINIT string constant. * top.h (gdbinit): Make const.
Diffstat (limited to 'gdb/top.h')
-rw-r--r--gdb/top.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/top.h b/gdb/top.h
index 44aefb1fa95..2f70539630a 100644
--- a/gdb/top.h
+++ b/gdb/top.h
@@ -28,7 +28,7 @@ extern int in_user_command;
extern int confirm;
extern char gdb_dirbuf[1024];
extern int inhibit_gdbinit;
-extern char gdbinit[];
+extern const char gdbinit[];
extern void print_gdb_version (struct ui_file *);
extern void print_gdb_configuration (struct ui_file *);