From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25480 invoked by alias); 21 Oct 2004 04:15:20 -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 25464 invoked from network); 21 Oct 2004 04:15:16 -0000 Received: from unknown (HELO takamaka.act-europe.fr) (142.179.108.108) by sourceware.org with SMTP; 21 Oct 2004 04:15:16 -0000 Received: by takamaka.act-europe.fr (Postfix, from userid 507) id 5EA7847D9C; Wed, 20 Oct 2004 21:15:13 -0700 (PDT) Date: Thu, 21 Oct 2004 04:15:00 -0000 From: Joel Brobecker To: gdb-patches@sources.redhat.com Subject: Re: gdbserver build broken on amd64-linux Message-ID: <20041021041513.GR21300@gnat.com> References: <20041020053216.GB3527@gnat.com> <20041020142645.GA24010@nevyn.them.org> <20041020152441.GD3527@gnat.com> <200410201547.i9KFl8i6022712@elgar.sibelius.xs4all.nl> <20041020155316.GA17828@nevyn.them.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="76DTJ5CE0DCVQemd" Content-Disposition: inline In-Reply-To: <20041020155316.GA17828@nevyn.them.org> User-Agent: Mutt/1.4i X-SW-Source: 2004-10/txt/msg00355.txt.bz2 --76DTJ5CE0DCVQemd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 945 > Joel, could you test the #ifndef version and check it in? I verified that the attached patch allows gdbserver to build, and I also double-checked the values with the ones I have in my prctl.h file. But I've never used gdbserver before, and when I tried it, I had a failure: (gdb) target remote localhost:2345 Remote debugging using localhost:2345 Couldn't establish connection to remote target Remote register badly formatted: T0506:0000000000000000;07:c0f1ffbf7f000000;10:2 06f55952a000000; here: 0000000;07:c0f1ffbf7f000000;10:206f55952a000000; Not sure why there seems to be discrepancy in the protocol... In any case, I checked in this patch, since it can only be correct. 2004-10-20 Joel Brobecker * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing. (ARCH_SET_FS): Likewise. (ARCH_GET_FS): Likewise. (ARCH_GET_GS): Likewise. Thanks, -- Joel --76DTJ5CE0DCVQemd Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="linux-x86-64-low.c.diff" Content-length: 736 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 21 Oct 2004 04:05:38 -0000 @@ -47,6 +47,15 @@ #define PTRACE_ARCH_PRCTL 30 #endif +/* The following definitions come from prctl.h, but may be absent + for certain configurations. */ +#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 + static int x86_64_regmap[] = { RAX * 8, RBX * 8, RCX * 8, RDX * 8, RSI * 8, RDI * 8, RBP * 8, RSP * 8, --76DTJ5CE0DCVQemd--