Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
* [ltt-dev] Question about instruction pointer and address attributes
@ 2010-12-01  2:17 Francis Giraldeau
  0 siblings, 0 replies; 4+ messages in thread
From: Francis Giraldeau @ 2010-12-01  2:17 UTC (permalink / raw)


> > > I want to relate trace events to source code. For testing, I did a small 
> > > C program that does a file access. In the event kernel.syscall_entry 
> > > sys_access, I got the instruction pointer ip=0x7fa4fba26ee7. I dumped the 
> > > process memory map from /proc/$PID/maps, and this address doesn't fit in 
> > > the process memory space. It's somewhat close to libc addresses, that are 
> > > in the range of 0x7f6471f56000-0x7f64724fc000.
> > 
> > Make sure you cat the /proc/$PID/maps from the exact same process you
> > gather the trace from, because the addresses at which the libraries are
> > loaded and the stack is located are randomised between executions.
> > 

That was the problem. Inside the C program, I dumped the process memory
map on disk and it matches the events ip field. Once the random offset
removed from ip in syscall event, it matches exactly the address in libc
objdump. 

Thanks for this info! 

Francis




^ permalink raw reply	[flat|nested] 4+ messages in thread
* [ltt-dev] Question about instruction pointer and address attributes
@ 2010-11-19 19:43 Francis Giraldeau
  2010-11-19 21:40 ` Mathieu Desnoyers
  2010-11-19 21:42 ` Michel Dagenais
  0 siblings, 2 replies; 4+ messages in thread
From: Francis Giraldeau @ 2010-11-19 19:43 UTC (permalink / raw)


Hi,

I want to relate trace events to source code. For testing, I did a  
small C program that does a file access. In the event  
kernel.syscall_entry sys_access, I got the instruction pointer  
ip=0x7fa4fba26ee7. I dumped the process memory map from  
/proc/$PID/maps, and this address doesn't fit in the process memory  
space. It's somewhat close to libc addresses, that are in the range of  
0x7f6471f56000-0x7f64724fc000.

Another example, inside a TRAP, I got two addresses,  
ip=0xffffffff812c722b and address=0x7fa4fba2cbc0, those two addresses  
doesn't map in the process space.

First, what is the difference between ip and address attribute? And  
wow does the ip can be converted back to the process address space?

Cheer,

Francis





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-12-01  2:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-01  2:17 [ltt-dev] Question about instruction pointer and address attributes Francis Giraldeau
  -- strict thread matches above, loose matches on Subject: below --
2010-11-19 19:43 Francis Giraldeau
2010-11-19 21:40 ` Mathieu Desnoyers
2010-11-19 21:42 ` Michel Dagenais

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox