public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM] archer-tromey-dwz-multifile: update .gnu_debugaltlink interpretation to follow dwz this handles dwz's new -r and -M options this change also adds a missing call to do_cleanups
@ 2012-06-04 17:21 tromey
0 siblings, 0 replies; only message in thread
From: tromey @ 2012-06-04 17:21 UTC (permalink / raw)
To: archer-commits
The branch, archer-tromey-dwz-multifile has been updated
via bab04ef9327d560904c75e7d4f302697f852effb (commit)
from 4aaf94e66616d14f4cf94060f943f94a67e3a023 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit bab04ef9327d560904c75e7d4f302697f852effb
Author: Tom Tromey <tromey@redhat.com>
Date: Mon Jun 4 11:20:43 2012 -0600
update .gnu_debugaltlink interpretation to follow dwz
this handles dwz's new -r and -M options
this change also adds a missing call to do_cleanups
-----------------------------------------------------------------------
Summary of changes:
gdb/dwarf2read.c | 26 ++++++++++++++++++++++----
1 files changed, 22 insertions(+), 4 deletions(-)
First 500 lines of diff:
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 66b0110..87eeac7 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -1810,17 +1810,33 @@ dwarf2_get_dwz_file (void)
bfd_errmsg (bfd_get_error ()));
cleanup = make_cleanup (xfree, data);
+ filename = data;
+ if (!IS_ABSOLUTE_PATH (filename))
+ {
+ char *abs = gdb_realpath (dwarf2_per_objfile->objfile->name);
+ char *rel;
+
+ make_cleanup (xfree, abs);
+ abs = ldirname (abs);
+ make_cleanup (xfree, abs);
+
+ rel = concat (abs, SLASH_STRING, filename, (char *) NULL);
+ make_cleanup (xfree, rel);
+ filename = rel;
+ }
+
/* The format is just a NUL-terminated file name, followed by the
build-id. For now, though, we ignore the build-id. */
- dwz_bfd = gdb_bfd_open (data, gnutarget, -1);
+ dwz_bfd = gdb_bfd_open (filename, gnutarget, -1);
if (dwz_bfd == NULL)
- error (_("could not read '%s': %s"), data, bfd_errmsg (bfd_get_error ()));
+ error (_("could not read '%s': %s"), filename,
+ bfd_errmsg (bfd_get_error ()));
if (!bfd_check_format (dwz_bfd, bfd_object))
{
gdb_bfd_unref (dwz_bfd);
- error (_("file '%s' was not usable: %s"),
- data, bfd_errmsg (bfd_get_error ()));
+ error (_("file '%s' was not usable: %s"), filename,
+ bfd_errmsg (bfd_get_error ()));
}
result = OBSTACK_ZALLOC (&dwarf2_per_objfile->objfile->objfile_obstack,
@@ -1829,6 +1845,8 @@ dwarf2_get_dwz_file (void)
bfd_map_over_sections (dwz_bfd, locate_dwz_sections, result);
+ do_cleanups (cleanup);
+
return result;
}
\f
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-06-04 17:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-04 17:21 [SCM] archer-tromey-dwz-multifile: update .gnu_debugaltlink interpretation to follow dwz this handles dwz's new -r and -M options this change also adds a missing call to do_cleanups tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).