qprof sends wrong values to addr2line on amd64
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
qprof (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: qprof
On my Ubuntu/Hardy-AMD64 on a Pentium D, qprof reports invalid values that do not map to a real location.
Example:
walter@
qprof: /home/walter/
[0x7fff3b347858] 16 (100%)
That should be:
walter@
qprof: /home/walter/
main 16 (100%)
I've played around a bit with the sigcontext pointer, and it seems like I got it right by replacing (&si) with (scv + 40). I have too little knowledge of CPUs, ABI's and binary files in general to know why scv+40 is right, but in my preliminary tests, I got valuable output similar to that which I get on a i686 system (also Hardy).
Attached are:
qprof_bug_fix.patch - The one line patch that works for me
qprof_bug_
qprof_bug_
walter@
Linux ananas.wjd.nu 2.6.24-23-generic #1 SMP Wed Apr 1 21:43:24 UTC 2009 x86_64 GNU/Linux
walter@
ii qprof 0.5.2-5 Profiling utilities for Linux
That's about all the information I can think of. Please let me know if there's anything I can assist with.
Greetings,
Walter Doekes
The 40 makes sense now as well:
walter@ ananas: 0:~/srcelf/ ucontext$ gcc qprof_bug_ ucontext. c -g ananas: 0:~/srcelf/ ucontext$ ./a.out | addr2line srcelf/ ucontext/ main.c: 18
walter@
gregs is at extra + 40
/home/walter/