From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26550 invoked by alias); 4 Jun 2012 17:21:39 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 26299 invoked by uid 306); 4 Jun 2012 17:21:36 -0000 Date: Mon, 04 Jun 2012 17:21:00 -0000 Message-ID: <20120604172136.26284.qmail@sourceware.org> From: tromey@sourceware.org To: archer-commits@sourceware.org Subject: [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 X-Git-Refname: refs/heads/archer-tromey-dwz-multifile X-Git-Reftype: branch X-Git-Oldrev: 4aaf94e66616d14f4cf94060f943f94a67e3a023 X-Git-Newrev: bab04ef9327d560904c75e7d4f302697f852effb X-SW-Source: 2012-q2/txt/msg00041.txt.bz2 List-Id: 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 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; } hooks/post-receive -- Repository for Project Archer.