diff options
author | Tom Tromey <tom@tromey.com> | 2019-02-08 01:40:39 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-02-17 16:28:38 -0700 |
commit | 9409233b0ec8a052eacc5846ee054f224f7e7213 (patch) | |
tree | 2074b48076d95b6f37bad36ddba994e03af6bf83 /gdb/macrotab.h | |
parent | 6506371f0671dd5ca11127fee4db8d8d7fec157f (diff) | |
download | gdb-9409233b0ec8a052eacc5846ee054f224f7e7213.zip gdb-9409233b0ec8a052eacc5846ee054f224f7e7213.tar.gz gdb-9409233b0ec8a052eacc5846ee054f224f7e7213.tar.bz2 |
Change macro_source_fullname to return a std::string
While working on the previous patch, I noticed that if
macro_source_fullname returned a std::string, then the callers would
be simplified. This patch implements this idea.
gdb/ChangeLog
2019-02-17 Tom Tromey <tom@tromey.com>
* macrotab.h (macro_source_fullname): Return a std::string.
* macrotab.c (macro_include, check_for_redefinition)
(macro_undef, macro_lookup_definition, foreach_macro)
(foreach_macro_in_scope): Update.
(macro_source_fullname): Return a std::string.
* macrocmd.c (show_pp_source_pos): Update.
Diffstat (limited to 'gdb/macrotab.h')
-rw-r--r-- | gdb/macrotab.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/macrotab.h b/gdb/macrotab.h index d14449e..d1e1453 100644 --- a/gdb/macrotab.h +++ b/gdb/macrotab.h @@ -351,12 +351,11 @@ void macro_for_each_in_scope (struct macro_source_file *file, int line, /* Return FILE->filename with possibly prepended compilation directory name. This is raw concatenation without the "set substitute-path" and gdb_realpath - applications done by symtab_to_fullname. Returned string must be freed by - xfree. + applications done by symtab_to_fullname. THis function ignores the "set filename-display" setting. Its default setting is "relative" which is backward compatible but the former behavior of macro filenames printing was "absolute". */ -extern char *macro_source_fullname (struct macro_source_file *file); +extern std::string macro_source_fullname (struct macro_source_file *file); #endif /* MACROTAB_H */ |