This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdbarch_init called for core files, too?

On Thu, Apr 25, 2002 at 10:35:04AM -0700, Jason R Thorpe wrote:
> On Thu, Apr 25, 2002 at 01:07:26PM -0400, Andrew Cagney wrote:
>  > There may not necessarily be a program corresponding to the core file: 
>  > gdb --core core.
> Sure, but it doesn't make any sense to do this if there *is* a program
> corresponding to the core file.

I agree with Jason on this.  GNU/Linux code in GDB has started identifying
itself based on .note.ABI-tag sections; once we get an executable, we
don't want to change the architecture again when we load its core file
(which does not have identifying marks).

It seems to me that we should initialize gdbarch when we load a binary,
or once if no binary is loaded; calling the init function with a
corefile is counterintuitive.

>  > > ...or should I make the code that looks for ABI tags in note sections to
>  > > also look for "NetBSD-CORE" notes, too?
>  > 
>  > Sounds right.  I'd check with michael snyder though.
> I looked into this, and I'm not particularly pleased with it as a solution.
> -- 
>         -- Jason R. Thorpe <>

Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]