Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Thiago Jung Bauermann <bauerman@br.ibm.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC] PowerPC prologue unwinder / epilogue detection 	improvements
Date: Mon, 15 Sep 2008 03:00:00 -0000	[thread overview]
Message-ID: <1221447585.2855.7.camel@localhost.localdomain> (raw)
In-Reply-To: <20071206214120.GA26771@caradoc.them.org>

(Leaving a lot of the context since this e-mail is from so long ago.)

El jue, 06-12-2007 a las 16:41 -0500, Daniel Jacobowitz escribió:
> The patch also contains two things that are not straightforward and I
> am not going to commit as they are:
> 
>   - Both the oldish MontaVista toolchain their customer was using, and
>   the Debian Sarge toolchain on the test machine I used for the port
>   to HEAD GDB, are built with GCC 3.4.  There's an annoying bug in
>   this version of GCC.  Given a sequence like this:
> 
>        stwu    r1,-48(r1)
>        mflr    r0
>        bl      0x26384
>        stw     r0,52(r1)
>        ...
> 
>   GCC will not report the move of the return address from LR to r0.
>   It leaves the return address column pointing at LR until the end of
>   the prologue, and then updates it to point directly at 52(r1) on the
>   stack.
> 
>   I forcibly detect this case in the patch below and use the prologue
>   unwinder instead of the DWARF-2 unwinder if the prologue contains a
>   bl instruction (-fpic or -fPIC).  This is much too heavy-handed.  Is
>   it worth working around this bug in GDB?
> 
>   If so, we should find a way to limit it to some likely selection of
>   GCC-generated objects.  If not - my inclination is not - I'll simply
>   drop this part of the patch.  Anyone who needs it can find it in the
>   list archives.

This is not a problem which affects me, but I wonder:

Is it an option to look at the DW_AT_producer for the CU in question and
enable the hack only for GCC 3.4? If there's no .debug_info section
available, then oh well, we tried...
-- 
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center


      reply	other threads:[~2008-09-15  3:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-07  0:28 Daniel Jacobowitz
2008-09-15  3:00 ` Thiago Jung Bauermann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1221447585.2855.7.camel@localhost.localdomain \
    --to=bauerman@br.ibm.com \
    --cc=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox