This is the mail archive of the gdb@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]
Other format: [Raw text]

Re: cross-target gdb compilation problems


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


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