Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: francis.giraldeau@usherbrooke.ca (Francis Giraldeau)
Subject: [ltt-dev] Question about instruction pointer and address attributes
Date: Tue, 30 Nov 2010 21:17:25 -0500	[thread overview]
Message-ID: <1291169845.23609.52.camel@francis-laptop> (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




             reply	other threads:[~2010-12-01  2:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-01  2:17 Francis Giraldeau [this message]
  -- 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1291169845.23609.52.camel@francis-laptop \
    --to=francis.giraldeau@usherbrooke.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox