This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Line numbers reported by pp() do not respond to the reality


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]