This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: cross-target gdb compilation problems
- From: Kevin Buettner <kevinb at redhat dot com>
- To: Michal Ludvig <mludvig at suse dot cz>, gdb <gdb at sources dot redhat dot com>
- Date: Mon, 1 Jul 2002 10:52:10 -0700
- Subject: Re: cross-target gdb compilation problems
- References: <3D2080A2.6080702@suse.cz>
On Jul 1, 6:17pm, Michal Ludvig wrote:
> When I add '#include "solib.h"' directly to breakpoints.c it compiles
> and links just fine. Also it seems like most targets use it anyway. If
> we would wrap all #defines in solib.h between #ifndef...#endif it would
> remain backward compatible for targets that define their own macros. Or
> am I wrong?
For targets with shared library support, I think you're right. I
think there may be problems, however, on targets without shared
library support. (In breakpoint.c, the SOLIB_ADD macro is being used
as a flag which indicates that the target has shared library support.)
> Like this:
>
> [solib.h]
> + #ifndef SOLIB_ADD
> #define SOLIB_ADD(filename, from_tty, targ, readsyms) \
> solib_add (filename, from_tty, targ, readsyms)
> + #endif
>
> Or is there another way to solve my compilation problems?
We've had this problem in the past for other pure multiarch targets.
I think we ended up creating (or recreating) a tm-*.h file for these
targets.
Kevin