PowerPC: Call of a function+8 address

Jan Kratochvil <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
Hello IBM,

[ppc64le] Setting breakpoint on function name doesn't work
https://bugzilla.redhat.com/show_bug.cgi?id=1539664

<JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*)+2296>:
   bl <JavaCallWrapper::JavaCallWrapper+8>
=> ld r4,96(r31)

<JavaCallWrapper::JavaCallWrapper(methodHandle, Handle, JavaValue*, Thread*)>:
<JavaCallWrapper::JavaCallWrapper+0>:   addis r2,r12,101
<JavaCallWrapper::JavaCallWrapper+4>: addi  r2,r2,-20016
<JavaCallWrapper::JavaCallWrapper+8>: mflr  r0

GDB puts breakpoint on function+0 and so the breakpoint gets missed as caller
calls function+8.

in gdb-7.10:
38360086aea4f956dcd4ba406318595ea11f7dea is the first bad commit
Date:   Sun Jan 25 11:20:39 2015 +0100
    Merge GCC producer parsers. Allow digits in identifiers.

But I would call that a false positive.  Before that GDB was skipping whole
prologue (0x30 bytes).  Now GDB does not skip prologue as it is -O2 -g
optimized code.

Still GDB should skip the first 8 bytes on ppc64 but I do not know the rules
when it should be done so and whether GDB already knows about this issue
(and the pattern match failed) or not.


Thanks,
Jan Kratochvil
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.