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]

Re: [rfa/i386] Throw i386's multi-arch switch

> Andrew Cagney <> writes:

>> Hello,
>> The attached tweeks the i386 targets (all of them) so that they are 
>> built with multi-arch enabled.  While this is far from having the i386 
>> properly multi-arched it does get the target over one of the major 
>> multi-arch conversion hurdles.
> The string of multi-arch patches made me suspect you were trying to do
> this  [:-)] .

Lets see, only ARM to go :-)

>> The change does contain one hack - i386-tdep.h had all its macros 
>> wrapped in #ifndef conditionals.  This is so that the old targets 
>> continue to work.
> Ouch, that's ugly.  However, I suspect that i386-tdep.h needs some
> serious polishing anyway, so go ahead.

Yes it is ugly.  Once all of those macros/functions have been converted 
the hacks can be removed again.

>> I've tested it on both Red Hat GNU/Linux 7.2 (no change) and FreeBSD 
>> 3.5.1 (tickles a GCC bug).
> Thanks.
>> ok to commit?


> Just one question: do we really want that XMALLOC macro?  In this case
> I'd simply use an explicit cast.  Otherwise: Yes please.

You mean something like:
	struct foo *b = (struct foo *) xmalloc (sizeof (struct foo *));
:-^  Since xmalloc() returns a ``void *'' the cast isn't needed.  I use 
XMALLOC() macro by habit as a strongly typed new() function.  (which is 
pretty ironic given how I don't like macro's :-)

Do we want it? Good question.


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