From: Philippe Waroquiers Date: Thu, 3 May 2012 21:09:51 +0000 (+0000) Subject: Improve m_redir.c debug trace by adding filename. X-Git-Tag: svn/VALGRIND_3_8_0~316 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35b77cecf7cb8243185a41a9629160193433703a;p=thirdparty%2Fvalgrind.git Improve m_redir.c debug trace by adding filename. Many objects (shared or non shared) have no soname. In such case, showing the filename clarifies where the redir spec is coming from. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12552 --- diff --git a/coregrind/m_redir.c b/coregrind/m_redir.c index 9c7dbd66a4..c7936b1567 100644 --- a/coregrind/m_redir.c +++ b/coregrind/m_redir.c @@ -1547,11 +1547,15 @@ static void show_redir_state ( HChar* who ) VG_(message)(Vg_DebugMsg, "<<\n"); VG_(message)(Vg_DebugMsg, " ------ REDIR STATE %s ------\n", who); for (ts = topSpecs; ts; ts = ts->next) { - VG_(message)(Vg_DebugMsg, - " TOPSPECS of soname %s\n", - ts->seginfo - ? (HChar*)VG_(DebugInfo_get_soname)(ts->seginfo) - : "(hardwired)" ); + if (ts->seginfo) + VG_(message)(Vg_DebugMsg, + " TOPSPECS of soname %s filename %s\n", + (HChar*)VG_(DebugInfo_get_soname)(ts->seginfo), + (HChar*)VG_(DebugInfo_get_filename)(ts->seginfo)); + else + VG_(message)(Vg_DebugMsg, + " TOPSPECS of soname (hardwired)\n"); + for (sp = ts->specs; sp; sp = sp->next) show_spec(" ", sp); }