From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22015 invoked by alias); 21 Oct 2015 18:36:39 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 21264 invoked by uid 89); 21 Oct 2015 18:36:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 21 Oct 2015 18:36:37 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id CC9BC8F31A; Wed, 21 Oct 2015 18:36:36 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t9LIaY0O027519; Wed, 21 Oct 2015 14:36:35 -0400 Message-ID: <5627DB32.2040208@redhat.com> Date: Wed, 21 Oct 2015 18:36:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Richard Henderson , Gary Benson , "H.J. Lu" CC: GDB Subject: Re: Changes required for x86 address spaces References: <5626BF4A.2080600@redhat.com> <20151021081610.GA13381@blade.nx> <5627CFB6.1050809@redhat.com> In-Reply-To: <5627CFB6.1050809@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-10/txt/msg00090.txt.bz2 On 10/21/2015 06:47 PM, Richard Henderson wrote: > I was thinking the same thing. Presumably all one needs to do is define new > architecture registers and fill in the blanks. But I've lost track of how to > do that these days; it seems to be scattered across 19 different files... Yeah, on x86-64, fs_base and fs_base are available in user_regs_struct nowadays, thus accessible with PTRACE_PEEKUSER and PTRACE_GETREGSET. Basically you need to: - add new gdb register numbers to amd64-tdep.h - add the ptrace/gdb register mapping to amd64-linux-tdep.c:amd64_linux_gregset_reg_offset - add new xml files to gdb/features/i386/ - make gdb/x86-linux-nat.c:x86_linux_read_description return the new description. Thanks, Pedro Alves