This is the mail archive of the gdb-patches@sourceware.org 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: [RFC 5/6] Associate siginfo_t with any signal


On Tue, Jul 27, 2010 at 12:51:22AM +0200, Jan Kratochvil wrote:
> this patch brings the primary fix of this patchset.  siginfo_t gets associated
> with every signal (both target_signal_t and int host_signal).
> 
> <signal.h> included from "gdb/signals.h" is fatal on ppc64-rhel55 host with
> --enable-targets=all as there are various conflicts like:
> 
> In file included from mips-linux-tdep.c:39:
> mips-linux-tdep.h:21:1: error: "ELF_NGREG" redefined
> In file included from /usr/include/asm/sigcontext.h:12,
>                  from /usr/include/bits/sigcontext.h:28,
>                  from /usr/include/signal.h:333,
>                  from ./../include/gdb/signals.h:24,
>                  from defs.h:68,
>                  from mips-linux-tdep.c:21:
> /usr/include/asm/elf.h:91:1: error: this is the location of the previous definition
> make[2]: *** [mips-linux-tdep.o] Error 1
> 
> I believe *-tdep.h file must not define such a general symbol as "ELF_NGREG".
> I can fix these *-tdep.* files if this way gets approved.

Mark K. is right.  Host files like signal.h should not be included in
most of GDB, to prevent people from accidentally using the native
types.  There's no promise that a native siginfo_t has any resemblence
to a target siginfo_t.

-- 
Daniel Jacobowitz
CodeSourcery


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