From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29623 invoked by alias); 19 Apr 2010 17:28:26 -0000 Received: (qmail 29615 invoked by uid 22791); 19 Apr 2010 17:28:25 -0000 X-SWARE-Spam-Status: No, hits=1.1 required=5.0 tests=BAYES_00,RCVD_IN_JMF_BL,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from terminus.zytor.com (HELO mail.zytor.com) (198.137.202.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 19 Apr 2010 17:28:19 +0000 Received: from anacreon.sc.intel.com (hpa@localhost [127.0.0.1]) (authenticated bits=0) by mail.zytor.com (8.14.3/8.14.3) with ESMTP id o3JHRqch010110 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 19 Apr 2010 10:27:56 -0700 Message-ID: <4BCC9298.3010100@zytor.com> Date: Mon, 19 Apr 2010 17:28:00 -0000 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Thunderbird/3.0.4 MIME-Version: 1.0 To: "H.J. Lu" CC: Mark Kettenis , gdb-patches@sourceware.org Subject: Re: PATCH: PR corefiles/11511: gcore doesn't work with orig_rax on Linux/amd64 References: <20100417161115.GA25919@intel.com> <201004171625.o3HGPc93029549@glazunov.sibelius.xs4all.nl> <201004182132.o3ILWqtn029873@glazunov.sibelius.xs4all.nl> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-04/txt/msg00565.txt.bz2 On 04/19/2010 10:21 AM, H.J. Lu wrote: > > I am CCing Peter, who is the Linux x86 kernel maintainer. > Also adding Roland McGrath. > We have 2 general-purpose register maps in GDB. One is in nat.c: > > /* Mapping between the general-purpose registers in GNU/Linux x86-64 > `struct user' format and GDB's register cache layout. */ > > static int amd64_linux_gregset64_reg_offset[] = > > It is used for reading/writing registers from/to kernel. One is in tdep.c: > > /* Mapping between the general-purpose registers in `struct user' > format and GDB's register cache layout. */ > > /* From . */ > static int amd64_linux_gregset_reg_offset[] = > > It is use for reading/writing core dump. > > Both are mappings between `struct user' and GDB's register cache. > It is very unlikely that the current x86 Linux kernel ABI for accessing > `struct user' will change. If the kernel ABI does need to change for > whatever reason, the new interface will be introduced. > > This applies to both i386 and x86-64 Linux kernel. I'd like to keep > a single map between the general-purpose registers in `struct user' > format and GDB's register cache for i386/x86-64 Linux. Will such > a patch acceptable? > struct user will not change, at least not for i386/x86-64. New additions will be done via regsets, i.e. PTRACE_GETREGSET. I can't speak for the embedded architectures, obviously, but they should do something similar. -hpa