From: Tom Tromey <tom@tromey.com>
To: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
Cc: Tom de Vries <tdevries@suse.de>
Subject: Re: [RFC] [gdb/tdep] Assume epilogue unwind info is valid unless gcc < 4.5.0
Date: Sat, 21 Jan 2023 10:48:20 -0700 [thread overview]
Message-ID: <87a62blqxn.fsf@tromey.com> (raw)
In-Reply-To: <20230121074807.22032-1-tdevries@suse.de> (Tom de Vries via Gdb-patches's message of "Sat, 21 Jan 2023 08:48:07 +0100")
>>>>> "Tom" == Tom de Vries via Gdb-patches <gdb-patches@sourceware.org> writes:
Tom> Fix these two issues by reversing the burden of proof:
Tom> - currently we assume epilogue unwind info is invalid unless we can proof that
Tom> gcc >= 4.5.0.
Tom> - instead, assume epilogue unwind info is valid unless we can proof that
Tom> gcc < 4.5.0.
FWIW this approach makes sense to me.
It's pretty lame that there's no way to detect this failure from the
frame section -- it can't be producer-sniffed and the augmentation
strings can't really be changed.
gcc 4.5 was released in 2010, and so it's not like we're inconveniencing
a lot of users. If needed I guess we could add a user setting to switch
this behavior back on.
Note there is a similar issue for the prologue, see:
https://sourceware.org/bugzilla/show_bug.cgi?id=25696
https://sourceware.org/bugzilla/show_bug.cgi?id=17265
https://sourceware.org/bugzilla/show_bug.cgi?id=21470
Also worth seeing the hilarious:
https://github.com/rust-lang/rust/issues/41252#issuecomment-293676579
I think that in this area we should assume the debug info is correct,
and keep a list of known-bad producers rather than assuming the debug
info is wrong and having a list of known-good ones.
Tom> + if (/* In absence of producer information, optimistically assume that we're
Tom> + not dealing with gcc < 4.5.0. */
This placement of the comment is pretty weird, it seems fine to just
stick it before the 'if'.
Tom> + if (cu->producer == nullptr)
Tom> + /* In absence of producer information, optimistically assume that we're
Tom> + not dealing with gcc < 4.5.0. */
Tom> + cust->set_epilogue_unwind_valid (true);
Tom> + if (!producer_is_gcc (cu->producer, nullptr, nullptr))
Normally if there is a comment and a line of code as the consequence of
an 'if', we put them both in a block.
Anyway I was also thinking that the second one should say 'else if'.
Tom
next prev parent reply other threads:[~2023-01-21 17:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-21 7:48 Tom de Vries
2023-01-21 17:48 ` Tom Tromey [this message]
2023-01-27 21:13 ` [PATCH] " Tom de Vries
2023-02-13 14:24 ` Tom de Vries
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=87a62blqxn.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/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).