From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17695 invoked by alias); 20 Oct 2004 05:32:18 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 17678 invoked from network); 20 Oct 2004 05:32:16 -0000 Received: from unknown (HELO takamaka.act-europe.fr) (142.179.108.108) by sourceware.org with SMTP; 20 Oct 2004 05:32:16 -0000 Received: by takamaka.act-europe.fr (Postfix, from userid 507) id 5EFFD47D9C; Tue, 19 Oct 2004 22:32:16 -0700 (PDT) Date: Wed, 20 Oct 2004 05:32:00 -0000 From: Joel Brobecker To: gdb-patches@sources.redhat.com Subject: gdbserver build broken on amd64-linux Message-ID: <20041020053216.GB3527@gnat.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="+QahgC5+KEYLbs62" Content-Disposition: inline User-Agent: Mutt/1.4i X-SW-Source: 2004-10/txt/msg00330.txt.bz2 --+QahgC5+KEYLbs62 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 1249 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 * 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 --+QahgC5+KEYLbs62 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="linux-x86-64-low.c.diff" Content-length: 537 Index: linux-x86-64-low.c =================================================================== RCS file: /cvs/src/src/gdb/gdbserver/linux-x86-64-low.c,v retrieving revision 1.8 diff -u -p -r1.8 linux-x86-64-low.c --- linux-x86-64-low.c 16 Oct 2004 17:42:00 -0000 1.8 +++ linux-x86-64-low.c 20 Oct 2004 05:27:24 -0000 @@ -41,6 +41,7 @@ #include #include #include +#include /* This definition comes from prctl.h, but some kernels may not have it. */ #ifndef PTRACE_ARCH_PRCTL --+QahgC5+KEYLbs62--