Author: sewardj
Date: 2008-01-13 15:27:44 +0000 (Sun, 13 Jan 2008)
New Revision: 7344

Log:
Improve error reporting when failing to open the ELF file.

Modified:
   branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c
   branches/DATASYMS/coregrind/m_debuginfo/storage.c


Modified: branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c 2008-01-13 15:26:15 UTC 
(rev 7343)
+++ branches/DATASYMS/coregrind/m_debuginfo/debuginfo.c 2008-01-13 15:27:44 UTC 
(rev 7344)
@@ -451,7 +451,10 @@
    VG_(memset)(buf1k, 0, sizeof(buf1k));
    fd = VG_(open)( filename, VKI_O_RDONLY, 0 );
    if (fd.isError) {
-      ML_(symerr)(NULL, True, "can't open file to inspect ELF header");
+      DebugInfo fake_di;
+      VG_(memset)(&fake_di, 0, sizeof(fake_di));
+      fake_di.filename = filename;
+      ML_(symerr)(&fake_di, True, "can't open file to inspect ELF header");
       return;
    }
    nread = VG_(read)( fd.res, buf1k, sizeof(buf1k) );

Modified: branches/DATASYMS/coregrind/m_debuginfo/storage.c
===================================================================
--- branches/DATASYMS/coregrind/m_debuginfo/storage.c   2008-01-13 15:26:15 UTC 
(rev 7343)
+++ branches/DATASYMS/coregrind/m_debuginfo/storage.c   2008-01-13 15:27:44 UTC 
(rev 7344)
@@ -64,7 +64,7 @@
 
       VG_(message)(Vg_DebugMsg, "WARNING: Serious error when "
                                 "reading debug info");
-      if (VG_(clo_verbosity) < 2) {
+      if (True || VG_(clo_verbosity) < 2) {
          /* Need to show what the file name is, at verbosity levels 2
             or below, since that won't already have been shown */
          VG_(message)(Vg_DebugMsg, 


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Valgrind-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-developers

Reply via email to