From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10182 invoked by alias); 2 Apr 2008 06:37:20 -0000 Received: (qmail 10156 invoked by uid 9697); 2 Apr 2008 06:37:20 -0000 Date: Wed, 02 Apr 2008 06:37:00 -0000 Message-ID: <20080402063720.10141.qmail@sourceware.org> From: pmachata@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: elfutils: load dynsym when debuginfo not available X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: ff2a266581b1fe1c8120849b6bdb5f372151ad4d X-Git-Newrev: 35c524fa916d0a8fa8a68fce1164f7dbd7c3bad3 Mailing-List: contact frysk-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-cvs-owner@sourceware.org Reply-To: frysk@sourceware.org X-SW-Source: 2008-q2/txt/msg00016.txt.bz2 The branch, master has been updated via 35c524fa916d0a8fa8a68fce1164f7dbd7c3bad3 (commit) from ff2a266581b1fe1c8120849b6bdb5f372151ad4d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 35c524fa916d0a8fa8a68fce1164f7dbd7c3bad3 Author: Petr Machata Date: Wed Apr 2 06:29:08 2008 +0200 elfutils: load dynsym when debuginfo not available ----------------------------------------------------------------------- Summary of changes: frysk-imports/elfutils/libdwfl/ChangeLog | 6 ++++++ .../elfutils/libdwfl/dwfl_module_getdwarf.c | 15 +++++++++++++++ 2 files changed, 21 insertions(+), 0 deletions(-) First 500 lines of diff: diff --git a/frysk-imports/elfutils/libdwfl/ChangeLog b/frysk-imports/elfutils/libdwfl/ChangeLog index 30272d1..9182f49 100644 --- a/frysk-imports/elfutils/libdwfl/ChangeLog +++ b/frysk-imports/elfutils/libdwfl/ChangeLog @@ -1,3 +1,9 @@ +2008-04-02 Petr Machata + + * dwfl_module_getdwarf.c (find_debuginfo): Return DWFL_E_CB when + the callback results in an error. + (find_file): Likewise. + 2008-03-24 Stan Cox * dwfl_module_getdwarf.c (load_symtab): Keep looking for an external diff --git a/frysk-imports/elfutils/libdwfl/dwfl_module_getdwarf.c b/frysk-imports/elfutils/libdwfl/dwfl_module_getdwarf.c index 4044514..5e84924 100644 --- a/frysk-imports/elfutils/libdwfl/dwfl_module_getdwarf.c +++ b/frysk-imports/elfutils/libdwfl/dwfl_module_getdwarf.c @@ -117,6 +117,15 @@ find_file (Dwfl_Module *mod) mod->main.fd = (*mod->dwfl->callbacks->find_elf) (MODCB_ARGS (mod), &mod->main.name, &mod->main.elf); + + /* Bail out on error, but if there was a pre-primed file name left + behind by the callback, try to open that file name. */ + if (mod->main.fd < 0 && mod->main.name == NULL) + { + mod->elferr = DWFL_E_CB; + return; + } + mod->elferr = open_elf (mod, &mod->main); if (mod->elferr == DWFL_E_NOERROR && !mod->main.valid) @@ -206,6 +215,12 @@ find_debuginfo (Dwfl_Module *mod) debuglink_file, debuglink_crc, &mod->debug.name); + + /* Bail out on error, but if there was a pre-primed file name left + behind by the callback, try to open that file name. */ + if (mod->debug.fd < 0 && mod->debug.name == NULL) + return DWFL_E_CB; + return open_elf (mod, &mod->debug); } hooks/post-receive -- frysk system monitor/debugger