From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23256 invoked by alias); 4 Mar 2002 12:35:57 -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 23165 invoked from network); 4 Mar 2002 12:35:49 -0000 Received: from unknown (HELO elgar.kettenis.dyndns.org) (213.93.115.180) by sources.redhat.com with SMTP; 4 Mar 2002 12:35:49 -0000 Received: (qmail 1445 invoked by uid 1001); 4 Mar 2002 12:35:47 -0000 To: Michal Ludvig Cc: Andreas Jaeger , Andrew Cagney , gdb-patches@sources.redhat.com Subject: Re: [patch] Add x86-64 target to MAINTAINERS, broken References: <3C7C4804.4070201@cygnus.com> <3C8356D6.1060202@suse.cz> From: Mark Kettenis Date: Mon, 04 Mar 2002 04:35:00 -0000 In-Reply-To: Michal Ludvig's message of "Mon, 04 Mar 2002 12:13:26 +0100" Message-ID: <86ofi45x3w.fsf@elgar.kettenis.dyndns.org> X-Mailer: Gnus v5.7/Emacs 20.7 X-SW-Source: 2002-03/txt/msg00026.txt.bz2 Michal Ludvig writes: > Andreas Jaeger wrote: > > Andrew Cagney writes: > >>In file included from /home/scratch/GDB/src/gdb/x86-64-tdep.c:30: > >>/home/scratch/GDB/src/gdb/x86-64-tdep.h:27: sys/reg.h: No such file or > >>directory > >>gmake[1]: *** [x86-64-tdep.o] Error 1 > >>gmake[1]: Leaving directory > >>`/home/scratch/GDB/X-x86_64-unknown-linux-gnu/gdb' > >>gmake: *** [all-gdb] Error 2 > >> > >>when trying to build an x86_64-linux-gnu target. > >> > > > > I fear you applied a broken patch by Michal. Has this been fixed? > > Michal, can you test whether the CVS version works now? > > File sys/reg.h comes from x86-64 glibc sources and yes, using my > crosscompiler it compiles without problems for --host=x86-64 and > --target=x86-64... x86-64-tdep.h should definitely *not* include , or any target header for that matter. It should be possible to build a GDB that can debug x86-64 stuff on any host. Currently that's not possible since there are problems with dwarfcfi.c, which doesn't compile on a 32-bit host right now, which is a pity since it means I cannot really help you with fixing the x86-64 bits. Anyway, you should really try to test your build with --target=x86-64 on a totally different platform, e.g. *BSD on a sparc. Anyway, I think the attached patch solves the problem. It shouldn't break your x86-64 target, but I'm not entirely sure. Can you test it for me? Mark Index: ChangeLog from Mark Kettenis * x86-64-tdep.h: Do not include . (x86_64_regmap): Remove. Index: x86-64-tdep.h =================================================================== RCS file: /cvs/src/src/gdb/x86-64-tdep.h,v retrieving revision 1.1 diff -u -p -r1.1 x86-64-tdep.h --- x86-64-tdep.h 2001/09/21 12:19:15 1.1 +++ x86-64-tdep.h 2002/03/04 11:34:55 @@ -1,5 +1,5 @@ /* Target-dependent code for GDB, the GNU debugger. - Copyright 2001 + Copyright 2001, 2002 Free Software Foundation, Inc. Contributed by Jiri Smid, SuSE Labs. @@ -24,18 +24,6 @@ #define X86_64_TDEP_H #include "i386-tdep.h" -#include - -/* Mapping between the general-purpose registers in `struct user' - format and GDB's register array layout. */ - -static int x86_64_regmap[] = { - RAX, RDX, RCX, RBX, - RSI, RDI, RBP, RSP, - R8, R9, R10, R11, - R12, R13, R14, R15, - RIP, EFLAGS -}; /* Number of all registers */ #define X86_64_NUM_REGS (51)