[commit] New function gdbarch_infi_fill

Daniel Jacobowitz drow@mvista.com
Mon Nov 10 16:26:00 GMT 2003

On Mon, Nov 10, 2003 at 11:19:05AM -0500, Andrew Cagney wrote:
> >On Sun, Nov 09, 2003 at 06:50:54PM -0500, Andrew Cagney wrote:
> >
> >>Hello,
> >>
> >>The attached adds the new function gdbarch_info_fill.  This new function 
> >>fills in un-initialized fields of the "info" structure using global 
> >>"set" variables and the "gdbarch" parameter.
> >>
> >>committed,
> >>Andrew
> >
> >
> >Yeah!  I've wanted this before.  Though now I can't remember why.
> This all begs two questions.
> Should gdbarch_info be filled in first?

Not sure.

> Should the assertion:
> 	gdbarch_find_by_info (gdbarch_info (gdbarch)) == gdbarch
> always hold?  At present architectures like the MIPS make this very hard 
>  - keying off information found in the BFD and not the corresponding 
> info struct.

This, however, I'd really like.  I remember why I wanted it now.  Take
a look at the end of osabi.c:set_osabi - I am not especially confident
that that code works.  It seems to me that the above assertion makes it
much more likely to work.

Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

More information about the Gdb-patches mailing list