public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug tdep/30028] [gdb/tdep, x86_64] Epilogue unwinder preferred over dwarf unwinder based on gcc 4.4
Date: Fri, 20 Jan 2023 16:24:32 +0000	[thread overview]
Message-ID: <bug-30028-4717-fBREMscW1G@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-30028-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=30028

--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #4)
> (In reply to Tom de Vries from comment #2)
> > Here ( https://gcc.gnu.org/gcc-4.5/changes.html ) I read:
> > ...
> > GCC now generates unwind info also for epilogues. 
> > ...
> > So, maybe this was fixed in gcc 4.5 ?
> 
> OK, I think this is referring to:
> https://gcc.gnu.org/pipermail/gcc-patches/2009-May/261377.html which was
> committed as cd9c1ca866b6aa5041a352e0ed07ae5f91e235e5 .
> 
> First tag to contain the commit: 4.5.0.

And, we already know this:
...
      if (gcc_4_minor >= 5)
        cust->set_epilogue_unwind_valid (true);
...

So we already scan the producer for
https://sourceware.org/pipermail/gdb-patches/2011-June/083429.html , and
crucially:
...
I find questionable this detection uses DWARF DW_AT_producer.  Therefore on
binaries with .eh_frame but no (DWARF) debug info the detection fails and
epilogue unwinders will get into affect.
...

So, that's what's happening.  We have dwarf apart from .eh_frame, and we don't
use the .eh_frame info because we can't check that the producer is 4.5 or
older.

So, maybe we should just flip the switch on the default assumption.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2023-01-20 16:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-20 14:06 [Bug tdep/30028] New: " vries at gcc dot gnu.org
2023-01-20 14:13 ` [Bug tdep/30028] " vries at gcc dot gnu.org
2023-01-20 14:23 ` vries at gcc dot gnu.org
2023-01-20 14:47 ` vries at gcc dot gnu.org
2023-01-20 16:02 ` vries at gcc dot gnu.org
2023-01-20 16:24 ` vries at gcc dot gnu.org [this message]
2023-01-20 16:43 ` vries at gcc dot gnu.org
2023-01-20 17:46 ` vries at gcc dot gnu.org
2023-01-21  7:49 ` vries at gcc dot gnu.org
2023-01-21  7:49 ` [Bug tdep/30028] [gdb/tdep, x86_64, i386] " vries at gcc dot gnu.org
2023-02-20 13:51 ` vries at gcc dot gnu.org

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=bug-30028-4717-fBREMscW1G@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).