Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Re: [PATCH]  Fix PPC scan_prologue for code generated with -mno-update
       [not found] <200702151807.06227.fnf@specifix.com>
@ 2007-02-16  8:22 ` Mark Kettenis
  2007-02-16 12:00   ` Daniel Jacobowitz
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Mark Kettenis @ 2007-02-16  8:22 UTC (permalink / raw)
  To: fnf; +Cc: gdb-patches, fnf

> From: Fred Fish <fnf@specifix.com>
> Date: Thu, 15 Feb 2007 18:07:06 -0700
> 
> 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.

Looks reasonable to me.  However there's one thing I don't understand.
Presuming you're using DWARF2 debug info, why does improving the
prologue scanner make such a big difference?

Mark


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH]  Fix PPC scan_prologue for code generated with -mno-update
  2007-02-16  8:22 ` [PATCH] Fix PPC scan_prologue for code generated with -mno-update Mark Kettenis
@ 2007-02-16 12:00   ` Daniel Jacobowitz
  2007-02-16 14:01   ` Fred Fish
  2007-02-16 16:47   ` Fred Fish
  2 siblings, 0 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2007-02-16 12:00 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: fnf, gdb-patches

On Fri, Feb 16, 2007 at 09:22:34AM +0100, Mark Kettenis wrote:
> Looks reasonable to me.  However there's one thing I don't understand.
> Presuming you're using DWARF2 debug info, why does improving the
> prologue scanner make such a big difference?

Because we still haven't hooked up the DWARF2 unwinder for PowerPC;
I believe this is because of the (now long-ago fixed) botch on CFI
register numbering for lr.  The last message I recall is:

  http://sourceware.org/ml/gdb-patches/2006-05/msg00341.html

I think all that we need is a way to check the recorded LR column
and adjust register numbering based on that.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH]  Fix PPC scan_prologue for code generated with -mno-update
  2007-02-16  8:22 ` [PATCH] Fix PPC scan_prologue for code generated with -mno-update Mark Kettenis
  2007-02-16 12:00   ` Daniel Jacobowitz
@ 2007-02-16 14:01   ` Fred Fish
  2007-02-16 16:47   ` Fred Fish
  2 siblings, 0 replies; 6+ messages in thread
From: Fred Fish @ 2007-02-16 14:01 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: gdb-patches

On Friday 16 February 2007, Mark Kettenis wrote:
> Looks reasonable to me.  However there's one thing I don't understand.
> Presuming you're using DWARF2 debug info, why does improving the
> prologue scanner make such a big difference?

Good question.

Originally the problem popped up in an environment where the user was
using stabs debugging format with a pretty ancient compiler.

I distilled the problem down to a simple test case and compiled it
without debugging info, after I figured out the problem was an issue
with the prologue scanner.

Perhaps this has uncovered another bug related to how the DWARF info
is used.  It's certainly worth investigating.

However I believe the patch is still beneficial, for the cases where
the debug format is something other than DWARF or there is no debug
info.

-Fred




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH]  Fix PPC scan_prologue for code generated with -mno-update
  2007-02-16  8:22 ` [PATCH] Fix PPC scan_prologue for code generated with -mno-update Mark Kettenis
  2007-02-16 12:00   ` Daniel Jacobowitz
  2007-02-16 14:01   ` Fred Fish
@ 2007-02-16 16:47   ` Fred Fish
  2007-02-27 17:11     ` Daniel Jacobowitz
  2 siblings, 1 reply; 6+ messages in thread
From: Fred Fish @ 2007-02-16 16:47 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: gdb-patches

On Friday 16 February 2007, Mark Kettenis wrote:
> Looks reasonable to me.

I'll wait a day or two then and if there's no objections by then, check it it.

-Fred




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH]  Fix PPC scan_prologue for code generated with -mno-update
  2007-02-16 16:47   ` Fred Fish
@ 2007-02-27 17:11     ` Daniel Jacobowitz
  2007-02-27 17:31       ` Fred Fish
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2007-02-27 17:11 UTC (permalink / raw)
  To: Fred Fish; +Cc: Mark Kettenis, gdb-patches

On Fri, Feb 16, 2007 at 09:46:53AM -0700, Fred Fish wrote:
> On Friday 16 February 2007, Mark Kettenis wrote:
> > Looks reasonable to me.
> 
> I'll wait a day or two then and if there's no objections by then, check it it.

Just a reminder that you haven't committed this yet :-)  Please go ahead.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH]  Fix PPC scan_prologue for code generated with -mno-update
  2007-02-27 17:11     ` Daniel Jacobowitz
@ 2007-02-27 17:31       ` Fred Fish
  0 siblings, 0 replies; 6+ messages in thread
From: Fred Fish @ 2007-02-27 17:31 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Mark Kettenis, gdb-patches

On Tuesday 27 February 2007, Daniel Jacobowitz wrote:
> Just a reminder that you haven't committed this yet :-)  Please go ahead.

It's committed now.  Thanks for the reminder.

-Fred


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-02-27 17:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200702151807.06227.fnf@specifix.com>
2007-02-16  8:22 ` [PATCH] Fix PPC scan_prologue for code generated with -mno-update Mark Kettenis
2007-02-16 12:00   ` Daniel Jacobowitz
2007-02-16 14:01   ` Fred Fish
2007-02-16 16:47   ` Fred Fish
2007-02-27 17:11     ` Daniel Jacobowitz
2007-02-27 17:31       ` Fred Fish

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox