public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: elfutils: load dynsym when debuginfo not available
@ 2008-04-02  6:37 pmachata
  0 siblings, 0 replies; only message in thread
From: pmachata @ 2008-04-02  6:37 UTC (permalink / raw)
  To: frysk-cvs

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-04-02  6:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-02  6:37 [SCM] master: elfutils: load dynsym when debuginfo not available pmachata

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).