diff options
author | Daniel Jacobowitz <drow@false.org> | 2004-09-19 22:49:23 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2004-09-19 22:49:23 +0000 |
commit | d092d1a2b8a62492928408bea7122a522d718308 (patch) | |
tree | 5359e41154b38b996f1d81f640197a08857887ac /gdb | |
parent | 8976e9a2052c83ab103edaf6ecde0e0d2c67f60c (diff) | |
download | gdb-d092d1a2b8a62492928408bea7122a522d718308.zip gdb-d092d1a2b8a62492928408bea7122a522d718308.tar.gz gdb-d092d1a2b8a62492928408bea7122a522d718308.tar.bz2 |
* symtab.c (output_source_filename): Mark first argument as const.
(sources_info): Use symtab_to_fullname and psymtab_to_fullname
for "info sources" output.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/symtab.c | 10 |
2 files changed, 12 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5be627b..471d2a7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2004-09-19 Daniel Jacobowitz <dan@debian.org> + + * symtab.c (output_source_filename): Mark first argument as const. + (sources_info): Use symtab_to_fullname and psymtab_to_fullname + for "info sources" output. + 2004-09-20 Mark Kettenis <kettenis@gnu.org> * config/i386/nm-fbsd.h, config/i386/nm-obsd.h: Don't include diff --git a/gdb/symtab.c b/gdb/symtab.c index 46325db..dd5ce54 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -69,7 +69,7 @@ static void variables_info (char *, int); static void sources_info (char *, int); -static void output_source_filename (char *, int *); +static void output_source_filename (const char *, int *); static int find_line_common (struct linetable *, int, int *); @@ -2622,7 +2622,7 @@ filename_seen (const char *file, int add, int *first) NAME is the name to print and *FIRST is nonzero if this is the first name printed. Set *FIRST to zero. */ static void -output_source_filename (char *name, int *first) +output_source_filename (const char *name, int *first) { /* Since a single source file can result in several partial symbol tables, we need to avoid printing it more than once. Note: if @@ -2671,7 +2671,8 @@ sources_info (char *ignore, int from_tty) first = 1; ALL_SYMTABS (objfile, s) { - output_source_filename (s->filename, &first); + const char *fullname = symtab_to_fullname (s); + output_source_filename (fullname ? fullname : s->filename, &first); } printf_filtered ("\n\n"); @@ -2682,7 +2683,8 @@ sources_info (char *ignore, int from_tty) { if (!ps->readin) { - output_source_filename (ps->filename, &first); + const char *fullname = psymtab_to_fullname (ps); + output_source_filename (fullname ? fullname : ps->filename, &first); } } printf_filtered ("\n"); |