This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Prelinking on ARM with Debug Link
- From: Mark Wielaard <mjw at redhat dot com>
- To: Torsten Polle <Torsten dot Polle at gmx dot de>
- Cc: systemtap at sourceware dot org
- Date: Mon, 11 Apr 2016 23:01:57 +0200
- Subject: Re: Prelinking on ARM with Debug Link
- Authentication-results: sourceware.org; auth=none
- References: <1456246011 dot 7770 dot 120 dot camel at redhat dot com> <97BC1582-878D-4841-9D3B-B0C50A017B1B at gmx dot de> <CBF70205-25B4-4972-8AB5-BC6357618455 at gmx dot de> <8BE9FE12-777D-4C56-89C0-26FC2718CCAE at gmx dot de> <1459516058 dot 8147 dot 138 dot camel at redhat dot com> <ED8344C8-189F-41BF-9780-64DE038ED1B4 at gmx dot de> <1459863878 dot 8147 dot 242 dot camel at redhat dot com> <A15D4550-5249-4235-A89B-ED62327B948E at gmx dot de> <1459979805 dot 8147 dot 274 dot camel at redhat dot com> <D9911106-AB0E-4947-ADC9-F8CFB8700226 at gmx dot de>
On Mon, Apr 11, 2016 at 08:47:00PM +0200, Torsten Polle wrote:
> Iâve checked your patch. As a result the backtrace calculations
> break in my environment.
I assume this is an in-kernel backtrace, does it involve kernel modules?
Or is it a user backtrace, executable only? shared libraries?
Could you show a probe script and example backtrace?
Please do include some verbose output. If you can provide the output
of stap -DDEBUG_UNWIND=1 that might be helpful.
> Iâve therefore instrumented adjustStartLoc() as follows:
>
> if (is_ehframe) {
> printk(KERN_ERR "eh: s=%lu, v=%lu, l=%lu\n", startLoc, vm_addr, s->sec_load_offset);
> return startLoc + vm_addr;
> }
> else {
> printk(KERN_ERR "no eh: s=%lu, v=%lu, l=%lu\n", startLoc, vm_addr, s->sec_load_offset);
> return startLoc + vm_addr - s->sec_load_offset;
> }
>
> As a result I get the following output:
>
> [ 1215.876537] no eh: s=297684, v=1307279360, l=4294962112
> [ 1215.876542] no eh: s=297532, v=1307279360, l=4294962112
> [ 1215.876546] no eh: s=297568, v=1307279360, l=4294962112
> [ 1215.876551] no eh: s=297612, v=1307279360, l=4294962112
> [ 1215.876555] no eh: s=297612, v=1307279360, l=4294962112
> [ 1215.876560] no eh: s=297612, v=1307279360, l=4294962112
>
> This means that the non-ehframe path is taken and that sec_load_offset
> is non-zero.
And that calculation wraps around because it is all unsigned.
I admit I don't understand what this calculation represents.
Cheers,
Mark