From: Julian Seward Date: Thu, 6 Mar 2008 18:31:42 +0000 (+0000) Subject: Don't tell m_redir (and the user) that debuginfo is about to be X-Git-Tag: svn/VALGRIND_3_4_0~960 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8c1638a9ed8796824f4781533ec15939565073ee;p=thirdparty%2Fvalgrind.git Don't tell m_redir (and the user) that debuginfo is about to be 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 --- diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c index 7216fc3815..a37aaa67ef 100644 --- a/coregrind/m_debuginfo/debuginfo.c +++ b/coregrind/m_debuginfo/debuginfo.c @@ -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; }