From 04affae3ef7aa124b6ac0ce4f3a54063b7b4784f Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Mon, 2 Dec 2013 22:24:32 +0100 Subject: Record objfile->original_name as an absolute path gdb/ 2013-12-02 Doug Evans Jan Kratochvil * objfiles.c (allocate_objfile): Save original_name as an absolute path. * objfiles.h (struct objfile): Expand comment on original_name. * source.c (openp): Call gdb_abspath. * utils.c (gdb_abspath): New function. * utils.h (gdb_abspath): Declare. gdb/testsuite/ 2013-12-02 Doug Evans * gdb.dwarf/dwp-symlink.c: Fake out gdb to not load debug info at start. * gdb.dwarf/dwp-symlink.exp: Test trying to load dwp when the binary has been specified with a relative path and we have chdir'd before accessing the debug info. --- gdb/objfiles.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gdb/objfiles.h') diff --git a/gdb/objfiles.h b/gdb/objfiles.h index 9bca812..bc16dc7 100644 --- a/gdb/objfiles.h +++ b/gdb/objfiles.h @@ -212,8 +212,10 @@ struct objfile struct objfile *next; - /* The object file's name, tilde-expanded and absolute. This - pointer is never NULL. This does not have to be freed; it is + /* The object file's original name as specified by the user, + made absolute, and tilde-expanded. However, it is not canonicalized + (i.e., it has not been passed through gdb_realpath). + This pointer is never NULL. This does not have to be freed; it is guaranteed to have a lifetime at least as long as the objfile. */ char *original_name; -- cgit v1.1