]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Have m_addrinfo.c giving more details about an address in a text segment
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Fri, 25 Jul 2014 20:46:01 +0000 (20:46 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Fri, 25 Jul 2014 20:46:01 +0000 (20:46 +0000)
(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

coregrind/m_addrinfo.c

index 20d56c605efa0f7bf6a2e5fb878b7144dde13309..072b7823a503bc8af77180eebbcbd702113b95b3 100644 (file)
@@ -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: