From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31460 invoked by alias); 3 Jul 2012 15:54:39 -0000 Received: (qmail 31449 invoked by uid 22791); 3 Jul 2012 15:54:38 -0000 X-SWARE-Spam-Status: No, hits=-5.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-qc0-f169.google.com (HELO mail-qc0-f169.google.com) (209.85.216.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 03 Jul 2012 15:54:23 +0000 Received: by qcsd16 with SMTP id d16so4170113qcs.0 for ; Tue, 03 Jul 2012 08:54:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.202.67 with SMTP id fd3mr8524554qab.26.1341330862577; Tue, 03 Jul 2012 08:54:22 -0700 (PDT) Received: by 10.229.192.129 with HTTP; Tue, 3 Jul 2012 08:54:22 -0700 (PDT) In-Reply-To: <201207031408.q63E8DbR009742@glazunov.sibelius.xs4all.nl> References: <20120621181452.GA23413@intel.com> <201207031408.q63E8DbR009742@glazunov.sibelius.xs4all.nl> Date: Tue, 03 Jul 2012 15:54:00 -0000 Message-ID: Subject: Re: [PATCH 1/3] Add sp_regnum_from_eax and pc_regnum_from_eax From: "H.J. Lu" To: Mark Kettenis Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes 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: 2012-07/txt/msg00040.txt.bz2 On Tue, Jul 3, 2012 at 7:08 AM, Mark Kettenis wrote: >> Date: Thu, 21 Jun 2012 11:14:52 -0700 >> From: "H.J. Lu" >> >> Hi, >> >> Here are the first of the last 3 patches for x32 support in GDB. This >> patch maps $pc to $eip and $sp to $esp for x32. OK to install? > > The pseudo register handling code is getting too complex :(. I feel > that hiding the set_gdbarch_pc_regnum() and set_gdbarch_sp_regnum() > calls in i386-tdep.c isn't the right approach. But I haven't found a > better one yet :(. > One possibility is to set pc/sp to register name instead of regnum. i386_gdbarch_init can map them to regnum after all pseudo registers are finalized. -- H.J.