This is the mail archive of the gdb-patches@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]

gdbserver build broken on amd64-linux


The compiler fails to find a couple of macros:

> gcc -c -Wall -g -O2    -I. -I. -I./../regformats -I./../../include -I../../bfd -I./../../bfd linux-x86-64-low.c
> linux-x86-64-low.c: In function 'ps_get_thread_area':
> linux-x86-64-low.c:70: error: 'ARCH_GET_FS' undeclared (first use in this function)
> linux-x86-64-low.c:70: error: (Each undeclared identifier is reported only once
> linux-x86-64-low.c:70: error: for each function it appears in.)
> linux-x86-64-low.c:74: error: 'ARCH_GET_GS' undeclared (first use in this function)

I found the definitions in asm-x86_64/prctl.h. So I #included that file,
and the build succeeded. Looking at the name, I wasn't too enthusiastic
about it, as it didn't look too standard, so I looked around, and saw
that this file is included from asm/prctl.h. So I changed the #include
to that file instead, and got the builds again.

2004-10-19  Joel Brobecker  <brobecker@gnat.com>

        * linux-x86-64-low.c: Include asm/prctl.h.

I hope this is the right fix, but at the same time, I can't help but
wonder how it did work before... Let me know if this is OK to apply
or if it is the wrong fix (I am hoping that the location of these
macros is not dependent on the Linux distribution).

Thanks,
-- 
Joel

Attachment: linux-x86-64-low.c.diff
Description: Text document


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