]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Don't tell m_redir (and the user) that debuginfo is about to be
authorJulian Seward <jseward@acm.org>
Thu, 6 Mar 2008 18:31:42 +0000 (18:31 +0000)
committerJulian Seward <jseward@acm.org>
Thu, 6 Mar 2008 18:31:42 +0000 (18:31 +0000)
discarded if in fact we never got as far as reading anything into
DebugInfo.  This unbreaks self-hosting.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7579

coregrind/m_debuginfo/debuginfo.c

index 7216fc381572f64ad2de4d5ceab754fca3591f26..a37aaa67efb29a2b5d169e47a0dace484c217252 100644 (file)
@@ -276,7 +276,8 @@ static void discard_DebugInfo ( DebugInfo* di )
    while (curr) {
       if (curr == di) {
          /* Found it;  remove from list and free it. */
-         if (VG_(clo_verbosity) > 1 || VG_(clo_trace_redir))
+         if (curr->have_dinfo
+             && (VG_(clo_verbosity) > 1 || VG_(clo_trace_redir)))
             VG_(message)(Vg_DebugMsg, 
                          "Discarding syms at %p-%p in %s due to %s()", 
                          di->text_avma, 
@@ -285,7 +286,8 @@ static void discard_DebugInfo ( DebugInfo* di )
                          reason);
          vg_assert(*prev_next_ptr == curr);
          *prev_next_ptr = curr->next;
-         VG_(redir_notify_delete_DebugInfo)( curr );
+         if (curr->have_dinfo)
+            VG_(redir_notify_delete_DebugInfo)( curr );
          free_DebugInfo(curr);
          return;
       }