diff options
author | Tom Tromey <tromey@redhat.com> | 2001-12-21 22:32:37 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2001-12-21 22:32:37 +0000 |
commit | 068c3a92563f4cd3928f7466603cb6dd656b8aba (patch) | |
tree | 6cb2f85a81f1a23036b7d65c602cabe812ef7aeb /gdb/utils.c | |
parent | b4bff1351397a169d7b7c47a1afea2e49cb9983c (diff) | |
download | gdb-068c3a92563f4cd3928f7466603cb6dd656b8aba.tar.gz |
* configure, config.in: Rebuilt.
* configure.in: Check for realpath.
* defs.h (gdb_realpath): Declare.
* symtab.h (partial_symtab): Added fullname field.
* source.c (openp): Use gdb_realpath.
(forget_cached_source_info): Clear full name of each partial
symtab.
* utils.c (gdb_realpath): New function.
* symtab.c (lookup_symtab): Removed.
(lookup_symtab_1): Renamed to lookup_symtab.
(lookup_symtab): Look for real path.
(lookup_partial_symtab): Likewise.
Diffstat (limited to 'gdb/utils.c')
-rw-r--r-- | gdb/utils.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/utils.c b/gdb/utils.c index 4d12c3998ce..a5ff5557006 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -2544,3 +2544,15 @@ string_to_core_addr (const char *my_string) } return addr; } + +char * +gdb_realpath (const char *filename) +{ +#ifdef HAVE_REALPATH + char buf[PATH_MAX]; + char *rp = realpath (filename, buf); + return xstrdup (rp ? rp : filename); +#else + return xstrdup (filename); +#endif +} |