Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de>
To: Richard.Earnshaw@arm.com
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFD] How to fix FRAME_CHAIN_VALID redefinition in config/i386/tm-i386v4.h ?
Date: Mon, 18 Feb 2002 04:02:00 -0000	[thread overview]
Message-ID: <200202181202.NAA06278@reisser.regent.e-technik.tu-muenchen.de> (raw)
In-Reply-To: <200202181051.KAA02319@cam-mail2.cambridge.arm.com>; from "Richard Earnshaw" at Feb 18, 102 11:54 am

> > I did have a look at Richard's code, but *gdbarch_init() depends on the
> > things passed in via `struct gdbarch_info'.
> > 
> > gdbarch_tdep_info seemed promising, but is currently unused, so it seems
> > that in the current framework we have to deduce everything from a BFD.
> > 
> > However, in my particular case, you can't tell a GNU/Linux core file
> > from a generic ELF core file (there are no .note.ABI-tag sections in a
> > core file).
> > Even if we add an `os' field to `struct gdbarch_info', we would have to pass
> > the os information down all the way from core_open -> set_gdbarch_from_file.
> > And even then we can't tell the current `os' for the core file in core_open.
> > It seems that we have to avoid any additional OS dependency for core files
> > in the gdbarch vector, although having gdbarch try the OS specific one before
> > the generic one might be feasible.
> > 
> > The immediate problem would be fixed by requiring FRAME_CHAIN_VALID only at
> > multi-arch level 2.
> > 
> 
> A couple of observations, which may be off base.
> 
> 1) If you are running with a core file, the functionality of gdb is going 
> to be largely limited to examining data structures etc.  I'm not aware 
> that gdb can step or call inferior functions etc once we've dumped core.  
> So it may be that a generic core description is adequate.

In my particular case, I was thinking about tinkering with frame_chain_valid,
which affected backtraces in core files.

> 2) Where are your symbols coming from.  It surely isn't the core file, so 
> it is probably the original image.  If you have that somewhere then you 
> can determine its OS and ABI and use that to aid interpreting the core 
> file, right?

If we should ever need it (although we should try hard to avoid it), this
might be the right approach.
Passing a `core file' flag to *gdbarch_init, and leaving *gdbarch_init the
choice to not change the `os' if it is called from core_open.

-- 
Peter Schauer			pes@regent.e-technik.tu-muenchen.de


  reply	other threads:[~2002-02-18 12:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-17  5:45 Peter.Schauer
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 [this message]
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=200202181202.NAA06278@reisser.regent.e-technik.tu-muenchen.de \
    --to=peter.schauer@regent.e-technik.tu-muenchen.de \
    --cc=Richard.Earnshaw@arm.com \
    --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