summaryrefslogtreecommitdiff
path: root/gdb/source.h
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2013-02-03 16:09:29 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2013-02-03 16:09:29 +0000
commitd4f5987387f1f61969b86ca9305264820ad01499 (patch)
tree3fba27336b665d49484c17b14adf2db7c0f5e038 /gdb/source.h
parentc73c602ab2e8ff0baf26ca94d9b5f4d442306bbc (diff)
downloadgdb-d4f5987387f1f61969b86ca9305264820ad01499.tar.gz
gdb/
Add a new variable that controls a way in which filenames are displayed. * NEWS (set filename-display): New entry. * source.c (filename_display_basename, filename_display_relative) (filename_display_absolute, filename_display_kind_names) (filename_display_string, show_filename_display_string) (symtab_to_filename_for_display): New. (_initialize_source): Added initialization of 'filename-display' variable. * source.h (symtab_to_filename_for_display): Added declaration. * stack.c (print_frame): Added new variable and calling of a new function and condition with this variable. Changed third argument of calling of a function. gdb/doc/ * gdb.texinfo (Backtrace): Added description of 'filename-display' variable in 'set/show backtrace' section. gdb/testsuite/ * gdb.dwarf2/dw2-dir-file-name.exp: New file. * gdb.dwarf2/dw2-dir-file-name.c: New file.
Diffstat (limited to 'gdb/source.h')
-rw-r--r--gdb/source.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/source.h b/gdb/source.h
index 0c6804cb065..1e9d8a530ec 100644
--- a/gdb/source.h
+++ b/gdb/source.h
@@ -50,6 +50,10 @@ extern int open_source_file (struct symtab *s);
extern const char *symtab_to_fullname (struct symtab *s);
+/* Returns filename without the compile directory part, basename or absolute
+ filename. It depends on 'set filename-display' value. */
+extern const char *symtab_to_filename_for_display (struct symtab *symtab);
+
/* Create and initialize the table S->line_charpos that records the
positions of the lines in the source file, which is assumed to be
open on descriptor DESC. All set S->nlines to the number of such