This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: print_ubacktrace() and ppc 32
- From: Holger Brunck <holger dot brunck at keymile dot com>
- To: Lukas Berk <lberk at redhat dot com>
- Cc: Mark Wielaard <mjw at redhat dot com>, systemtap at sourceware dot org
- Date: Mon, 05 Aug 2013 10:46:31 +0200
- Subject: Re: print_ubacktrace() and ppc 32
- References: <51BF1C1E dot 7020208 at keymile dot com> <1371491014 dot 4501 dot 97 dot camel at bordewijk dot wildebeest dot org> <20130617180008 dot GC2219 at redhat dot com> <1371492348 dot 4501 dot 106 dot camel at bordewijk dot wildebeest dot org> <51C005AA dot 8010300 at keymile dot com> <20130803011202 dot GA1956 at redhat dot com>
Hi,
On 08/03/2013 03:12 AM, Lukas Berk wrote:
>>> So for a ppc32 kernel we do need a new runtime/unwind/ppc32.h
>>> definitions file. It should not be that hard to write based on the
>>> ppc64.h version and the ppc32 DWARF register mappings from
>>> http://refspecs.linuxbase.org/elf/elfspec_ppc.pdf
>>> But note that testing might be needed to see if those really map to
>>> actually used DWARF register numbers generated by the toolchain. As can
>>> be seen in the comments in ppc64.h sometimes mistakes have been made and
>>> theory/spec and practice are not the same :{
>>
>> Ok thanks for pointing out. If someone has a first ppc32.h file and needs
>> some help for testing on a native 32 bit ppc system, let me know. Or maybe
>> in the next week I find the time to implement one.
>
> Looking over the DWARF register specs the mappings should be the same,
> so hopefully we can use the same header file. Would you mind trying
> this patch?
>
no unfortunately it does not work. First I had to fix a compile error because
"softe" is not defined for ppc_32 in the linux kernel in ptrace.h. I changed it
temporary to "mq" in runtime/unwind/ppc_64.h and then I was able to compile my
probe.
I gave it a try with a simple main.c which calls a function foo(). My probe was:
probe process("/usr/local/bin/main").function("foo")
{
print_ubacktrace()
}
But the output is:
0x10000448 : foo+0x1c/0x7c [/usr/local/bin/main]
So the calling function main() was not shown on an ARM architecture a similar
setup shows:
0x83b8 : foo+0x14/0x64 [/usr/local/bin/main]
0x8444 : main+0x3c/0x40 [/usr/local/bin/main]
So there is still something missing for ppc32.
Best regards
Holger