|
From: Oriol P. <aut...@gm...> - 2007-07-19 09:24:21
|
Hi, Is it possible to know the mapping address of each dynamic library for the instrumented program? ldd gives the valgrind libraries mapping addresses not the instrumented program ones. Thanks, Oriol Prat |
|
From: Nicholas N. <nj...@cs...> - 2007-07-19 22:26:24
|
On Thu, 19 Jul 2007, Oriol Prat wrote: > Is it possible to know the mapping address of each dynamic library for > the instrumented program? > ldd gives the valgrind libraries mapping addresses not the > instrumented program ones. I don't understand how you would use ldd with a program running under Valgrind, and it's going to depend on exactly the order of library loading, but on Linux looking at /proc/<pid>/maps of the running process will give you some idea of where things end up. Nick |
|
From: Oriol P. <aut...@gm...> - 2007-07-20 07:36:05
|
Hi Nick, I'm developing a tool for tracing powerpc programs and I would like to test if addresses traced match with disassembled addresses at dynamic libraries that are relative to the start of mapping. What I've done is to run "ldd valgrind ...." Later "ldd <interpreted_program>". These address mappings don't match with interpreted execution ones and I guess why. So I needed some way to know theese mappings. The /proc/<pid>/maps approach is perfect for me, thank you Nick. Oriol 2007/7/20, Nicholas Nethercote <nj...@cs...>: > On Thu, 19 Jul 2007, Oriol Prat wrote: > > > Is it possible to know the mapping address of each dynamic library for > > the instrumented program? > > ldd gives the valgrind libraries mapping addresses not the > > instrumented program ones. > > I don't understand how you would use ldd with a program running under > Valgrind, and it's going to depend on exactly the order of library loading, > but on Linux looking at /proc/<pid>/maps of the running process will give > you some idea of where things end up. > > Nick > |