From: "Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de>
To: gdb-patches@sources.redhat.com
Subject: [RFD] How to fix FRAME_CHAIN_VALID redefinition in config/i386/tm-i386v4.h ?
Date: Sun, 17 Feb 2002 05:45:00 -0000 [thread overview]
Message-ID: <200202171345.OAA04571@reisser.regent.e-technik.tu-muenchen.de> (raw)
Due to this change:
2002-02-10 Andrew Cagney <ac131313@redhat.com>
* gdbarch.sh: For for level one methods, disallow a definition
when partially multi-arched. Add comments explaining rationale.
* gdbarch.h: Re-generate.
native SVR4 based platforms (including Solaris x86) no longer compile,
as they redefine FRAME_CHAIN_VALID in config/i386/tm-i386v4.h.
I understand, that this redefinition has to go, but I have no idea, how to
get back to the old behaviour cleanly.
Three approaches come to mind:
- Do nothing about it and let SVR4 based platforms backtrace through main.
This is the simplest solution, albeit ugly.
- Use func_frame_chain_valid instead of file_frame_chain_valid in
i386-tdep.c. This would stop backtraces through main on GNU/Linux. See also
http://sources.redhat.com/ml/gdb/2002-02/msg00117.html
- Try to switch the frame_chain_valid method dynamically in i386_gdbarch_init,
something like:
if (os_ident != ELFOSABI_NONE)
set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
else
set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
This approach would work well for SVR4, but causes interesting problems
on GNU/Linux. As core files have no ABI markers, we can't distinguish
them, and we get different backtracing behaviour when debugging an
executable (GNU/Linux ABI) or a core file (generic ELF ABI), so we
simply can't do it.
I suspect that we will hit this kind of multiarching problem more often
in native setups, where we can't discern the native ABI flavour from the
generic one (the various native sigtramp variants come to mind).
Do we need a hook from XXX_gdbarch_init to some native code ?
Any ideas, suggestions ?
--
Peter Schauer pes@regent.e-technik.tu-muenchen.de
next reply other threads:[~2002-02-17 13:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-17 5:45 Peter.Schauer [this message]
2002-02-17 8:23 ` Andrew Cagney
2002-02-17 8:37 ` Daniel Jacobowitz
2002-02-17 8:57 ` Andrew Cagney
2002-02-17 8:58 ` Daniel Jacobowitz
2002-02-18 0:44 ` Peter.Schauer
2002-02-18 2:52 ` Richard Earnshaw
2002-02-18 4:02 ` Peter.Schauer
2002-02-18 2:43 ` Richard Earnshaw
2002-02-17 9:23 ` Andrew Cagney
2002-02-18 0:33 ` Peter.Schauer
2002-02-18 6:58 ` Andrew Cagney
2002-02-18 7:57 ` Andrew Cagney
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=200202171345.OAA04571@reisser.regent.e-technik.tu-muenchen.de \
--to=peter.schauer@regent.e-technik.tu-muenchen.de \
--cc=gdb-patches@sources.redhat.com \
/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