This is the mail archive of the
mailing list for the GDB project.
Re: [rfa/i386] Throw i386's multi-arch switch
- To: Mark Kettenis <kettenis at science dot uva dot nl>
- Subject: Re: [rfa/i386] Throw i386's multi-arch switch
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Thu, 08 Nov 2001 13:52:11 -0500
- Cc: gdb-patches at sources dot redhat dot com
- References: <3BE9ED9F.firstname.lastname@example.org> <email@example.com>
> Andrew Cagney <firstname.lastname@example.org> writes:
>> 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).
>> 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.