diff options
author | Tom Tromey <tom@tromey.com> | 2021-07-04 13:26:15 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2021-07-17 10:41:42 -0600 |
commit | 4584f33d68b79c362ce9f3543052027b1676f30e (patch) | |
tree | 70a1be2b98dff96f47a37bb1df0bcfcbc97ba34b /gdb/source.h | |
parent | d030267c9cc0fb594d3dda264b78114afc6eb214 (diff) | |
download | gdb-4584f33d68b79c362ce9f3543052027b1676f30e.zip gdb-4584f33d68b79c362ce9f3543052027b1676f30e.tar.gz gdb-4584f33d68b79c362ce9f3543052027b1676f30e.tar.bz2 |
Introduce find_source_or_rewrite
The final bug fix in this series would duplicate the logic in
psymtab_to_fullname, so this patch extracts the body of this function
into a new function.
Diffstat (limited to 'gdb/source.h')
-rw-r--r-- | gdb/source.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/source.h b/gdb/source.h index e4f6129..6c383ef 100644 --- a/gdb/source.h +++ b/gdb/source.h @@ -72,6 +72,13 @@ extern scoped_fd find_and_open_source (const char *filename, const char *dirname, gdb::unique_xmalloc_ptr<char> *fullname); +/* A wrapper for find_and_open_source that returns the full name. If + the full name cannot be found, a full name is constructed based on + the parameters, passing them through rewrite_source_path. */ + +extern gdb::unique_xmalloc_ptr<char> find_source_or_rewrite + (const char *filename, const char *dirname); + /* Open a source file given a symtab S. Returns a file descriptor or negative number for error. */ extern scoped_fd open_source_file (struct symtab *s); |