This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Line numbers reported by pp() do not respond to the reality
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: Tim Beaulen <tbscope at gmail dot com>
- Cc: systemtap at sources dot redhat dot com
- Date: Sun, 05 Sep 2010 09:08:26 -0400
- Subject: Re: Line numbers reported by pp() do not respond to the reality
- References: <AANLkTikQ-_YW2huZQJiHPmU8nmqUoSMcOQJLKNW5EuWD@mail.gmail.com>
Tim Beaulen <tbscope@gmail.com> writes:
> I get these results: [...]
> As you can see, the line numbers start at 4995 and end at 5024.
>
> The actual part of the .cpp file including the line numbers:
> 4947 bool Style::drawScrollBarSliderControl( const QStyleOption*
> option, QPainter* painter, const QWidget* widget ) const
> [...]
> 4980 }
>
> As you can see, the line numbers differ. Why is that?
They should not, something odd is going on. When you run stap -p2 on
your script, you should get some PC addresses for the actual statement
probes. Running binutils' addr2line on those addresses should resolve
to the same source file / line that stap. Similarly, putting a gdb
breakpoint on the same file / line should resolve to basically the same
addresses (modulo shared library relocation type complications).
Can you compare some of the systemtap-computed values to addr2line &
gdb?
- FChE