[PATCH] Fix PPC scan_prologue for code generated with -mno-update

Fred Fish fnf@specifix.com
Fri Feb 16 01:07:00 GMT 2007


If the PPC gcc is used with the -mno-update option, it generates a
prologue instruction to allocate cache that gdb does not recognize.
Gdb disassembles it as "addi r1,r1,NUM".

If you run the gdb testsuite for powerpc-eabi and add -mno-update to
the list of compilation options, you get a huge increase in failures,
most due to problems doing backtraces.  Without using -mno-update
you get:

  # of expected passes          36024
  # of unexpected failures      756

With -mno-update you get:

  # of expected passes          33220
  # of unexpected failures      3928

After applying the attached patch, the results with -mno-update
become:

  # of expected passes          36028
  # of unexpected failures      752

This also fixes an existing failure (1 for each multilib):

  4448c4446
  < FAIL: gdb.base/recurse.exp: next over b = 0 in second instance
  ---
  > PASS: gdb.base/recurse.exp: next over b = 0 in second instance

I didn't examine why that failure was fixed by the patch.

-Fred

-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff.out
Type: text/x-diff
Size: 1010 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20070216/346e525d/attachment.bin>


More information about the Gdb-patches mailing list