aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2010-12-07 17:30:52 +0000
committerDoug Evans <dje@google.com>2010-12-07 17:30:52 +0000
commit74dd2ca6a705dd8239f13b173b2f3ddd9f0b14af (patch)
tree0498b62bbbae67dd9249d59829fbfd295fe95ecf /gdb/dwarf2read.c
parentaae1c79a03aa76ca68e9a989e7652703178362f0 (diff)
downloadgdb-74dd2ca6a705dd8239f13b173b2f3ddd9f0b14af.zip
gdb-74dd2ca6a705dd8239f13b173b2f3ddd9f0b14af.tar.gz
gdb-74dd2ca6a705dd8239f13b173b2f3ddd9f0b14af.tar.bz2
* dwarf2read.c (dw2_lookup_symtab): Remove duplicate call to
gdb_realpath.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 31a08a7..1cc5258 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -2199,16 +2199,11 @@ dw2_lookup_symtab (struct objfile *objfile, const char *name,
const char *this_full_name = dw2_require_full_path (objfile,
per_cu, j);
- if (this_full_name != NULL)
+ if (this_full_name != NULL
+ && FILENAME_CMP (real_path, this_full_name) == 0)
{
- char *rp = gdb_realpath (this_full_name);
- if (rp != NULL && FILENAME_CMP (real_path, rp) == 0)
- {
- xfree (rp);
- *result = dw2_instantiate_symtab (objfile, per_cu);
- return 1;
- }
- xfree (rp);
+ *result = dw2_instantiate_symtab (objfile, per_cu);
+ return 1;
}
}
}