From: Philippe Waroquiers Date: Fri, 25 Jul 2014 20:46:01 +0000 (+0000) Subject: Have m_addrinfo.c giving more details about an address in a text segment X-Git-Tag: svn/VALGRIND_3_10_0~246 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=151d27b101d35561a8c69c8a21acf90611a37e59;p=thirdparty%2Fvalgrind.git Have m_addrinfo.c giving more details about an address in a text segment (using a fake 'one address' stack trace). This a.o. can be used with the gdbsrv 'monitor v.info location 0x.....' to compare gdb and valgrind address to source mapping. Any tool that use pub_tool_addrinfo.h will also better descrive text addresses. No impact on tests, as there is no test testing 'segment' address description :( git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14192 --- diff --git a/coregrind/m_addrinfo.c b/coregrind/m_addrinfo.c index 20d56c605e..072b7823a5 100644 --- a/coregrind/m_addrinfo.c +++ b/coregrind/m_addrinfo.c @@ -433,6 +433,11 @@ static void pp_addrinfo_WRK ( Addr a, AddrInfo* ai, Bool mc, Bool maybe_gcc ) VG_(pp_SectKind)(ai->Addr.SectKind.kind), ai->Addr.SectKind.objname, xpost ); + if (ai->Addr.SectKind.kind == Vg_SectText) { + /* To better describe the address in a text segment, + pp a dummy stacktrace made of this single address. */ + VG_(pp_StackTrace)( &a, 1 ); + } break; default: