[PATCH] more m68k multi-arch

Andrew Cagney ac131313@ges.redhat.com
Wed Jul 10 16:04:00 GMT 2002


> On Jun 28, 11:03am, Kevin Buettner wrote:

Kevin,

See:
http://sources.redhat.com/gdb/current/onlinedocs/gdbint_9.html#SEC82
>  9.11.4 Prepare for multi-arch level to one
> 
> Temporally set GDB_MULTI_ARCH to GDB_MULTI_ARCH_PARTIAL and then build and start GDB (the change should not be committed). GDB may not build, and once built, it may die with an internal error listing the architecture methods that must be provided.
> 
> Fix any build problems (patch(es)).
> 
> Convert all the architecture methods listed, which are only macros, into functions (patch(es)).
> 
> Update arch_gdbarch_init to set all the missing architecture methods and wrap the corresponding macros in #if !GDB_MULTI_ARCH (patch(es)). 

The presence of #define GDB_MULTI_ARCH 0 indicates that this is being 
tested.

enjoy,
Andrew


> I've been looking at this some more...
> 
> I've noticed the following define near the top of tm-m68k.h:
> 
>     #define GDB_MULTI_ARCH 0
> 
> Clearly, with this definition in place, you do need to keep the old
> definitions around, because those are the ones that will be used!
> 
> It seems to me that your testing will be more productive if you do
> one of the following:
> 
>     1) define GDB_MULTI_ARCH to be GDB_MULTI_ARCH_PARTIAL (1) instead of 0.
> 
> or
> 
>     2) change the macro definitions being replaced to instead refer to
>        the newly defined functions in m68k-tdep.c.
> 
> As it stands now, you are only testing that the functions that you've
> added to the tdep.c file build (i.e. compile), but GDB won't actually
> be using them.  This means that if you make a typo, it won't be
> noticed until some later point when GDB_MULTI_ARCH is changed from 0
> to some other value.





More information about the Gdb-patches mailing list