public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
From: pmachata@sourceware.org
To: frysk-cvs@sourceware.org
Subject: [SCM]  master: elfutils: load dynsym when debuginfo not available
Date: Wed, 02 Apr 2008 06:37:00 -0000	[thread overview]
Message-ID: <20080402063720.10141.qmail@sourceware.org> (raw)

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 <pmachata@redhat.com>
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  <pmachata@redhat.com>
+
+	* 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  <scox@redhat.com>
 
 	* 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


                 reply	other threads:[~2008-04-02  6:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080402063720.10141.qmail@sourceware.org \
    --to=pmachata@sourceware.org \
    --cc=frysk-cvs@sourceware.org \
    --cc=frysk@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).