[ppc part commit] [patchv2 3/4] unwinder: ppc and ppc64

Mark Wielaard mjw at redhat.com
Wed Dec 18 16:55:49 UTC 2013


On Sun, 2013-12-15 at 18:57 +0100, Jan Kratochvil wrote:
> On Thu, 05 Dec 2013 22:25:34 +0100, Mark Wielaard wrote:
> > Yes, the patch seems OK, please just checkin the non-tests parts that
> > don't depend on the ppc64bidir stuff.
> 
> Checked in that part: 5cbf42aaf47195e2c41171786371d55b253a7667

I rebased my mjw/odp branch on top of master with this checked in and
everything looks fine on ppc64 with ppc32 as biarch except for one issue
(using gcc 4.4.7). It looks like this assert is too strong in
tests/backtrace.c (callback_verify):

    case 5:
      /* Verify we trapped on the very last instruction of child.  */
      assert (symname != NULL && strcmp (symname, "backtracegen") == 0);
      mod = dwfl_addrmodule (dwfl, pc);
      if (mod)
        symname2 = dwfl_module_addrname (mod, pc);
      assert (symname2 == NULL || strcmp (symname2, "backtracegen") != 0);
      break;

The disassambly of backtracegen in backtrace-child looks as follows:

Dump of assembler code for function backtracegen:
   0x0000000055e715d0 <+0>:	mflr    r0
   0x0000000055e715d4 <+4>:	li      r3,1
   0x0000000055e715d8 <+8>:	std     r0,16(r1)
   0x0000000055e715dc <+12>:	stdu    r1,-112(r1)
   0x0000000055e715e0 <+16>:	bl      0x55e714d0 <stdarg>
=> 0x0000000055e715e4 <+20>:	.long 0x0
   0x0000000055e715e8 <+24>:	.long 0x1
   0x0000000055e715ec <+28>:	lwz     r0,0(0)
End of assembler dump.

So it looks like some extra padding was included in the function by the
compiler. Should we make this check is_x86_64_native only like the case
3 jmp one?

Thanks,

Mark



More information about the elfutils-devel mailing list