This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: [rfc] Swap out current when creating a new architecture


> The attached changes the run-time environment within which a new architectures are created.  Briefly the simplified sequence:
> 
> - call XXX_gdbarch_init()
> - swap out old architecture
> - install new architecture
> 
> is changed to:
> 
> - swap out old architecture
> - call XX_gdbarch_init()
> - install new architecture
> 
> This has the effect of making current_gdbarch invalid for the lifetime of the XXX_gdbarch_init() call.
> 

This patch is evi^D^D^D nasty.

The CRIS target also dumps core with it applied.  Like rs6000 was, it is 
refering to the previous (current_gdbarch) architecture.

I'll sit on this for a bit longer.  Could I encourage target maintainers 
to check their XXX_gdbarch_init() function for references to 
current_gdbarch.

Andrew



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