gdbserver build broken on amd64-linux

Daniel Jacobowitz
Wed Oct 20 15:53:00 GMT 2004

On Wed, Oct 20, 2004 at 05:47:08PM +0200, Mark Kettenis wrote:
>    Date: Wed, 20 Oct 2004 08:24:41 -0700
>    From: Joel Brobecker <>
>    > How about ths instead?
>    > 
>    > #ifndef ARCH_GET_FS
>    > #define ARCH_SET_GS 0x1001
>    > #define ARCH_SET_FS 0x1002
>    > #define ARCH_GET_FS 0x1003
>    > #define ARCH_GET_GS 0x1004
>    > #endif
> That's better, since it's dangerous to include kernel headers
> directly.
>    Yes, that should work too. I'm curious as to why these macros are not
>    defined for me, or said differently how it is that they are defined for
>    others (assuming others can build this code on amd64-linux unmodified).
> It all depends on the combination of installed kernel headers and
> glibc headers whether it'll work or not.  There are broken
> combinations out there, even on i386.  It's inherent to the way
> GNU/Linux is developped since there is no real attempt to keep kernel
> and libc in sync.  Learn to live with or <plug> switch to a free
> operating system with decent release management </plug>.

While your accusation is generally valid, in this case Joel hit the
salient point:

	(assuming others can build this code on amd64-linux unmodified)

Since I wrote that code before I got an amd64-linux machine (long time
ago), and didn't test it on one before I checked it in, it's my own
stupid fault.  I assumed that <linux/prctl.h> would include
<asm/prctl.h>, whch does not seem to be the case.

Joel, could you test the #ifndef version and check it in?

Daniel Jacobowitz

More information about the Gdb-patches mailing list