From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6768 invoked by alias); 9 Nov 2012 00:15:57 -0000 Received: (qmail 6754 invoked by uid 22791); 9 Nov 2012 00:15:50 -0000 X-SWARE-Spam-Status: No, hits=-7.8 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 09 Nov 2012 00:15:45 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qA90FhYE019330 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 8 Nov 2012 19:15:43 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qA90FfRI001127; Thu, 8 Nov 2012 19:15:42 -0500 Message-ID: <509C4B2D.9090809@redhat.com> Date: Fri, 09 Nov 2012 00:15:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121016 Thunderbird/16.0.1 MIME-Version: 1.0 To: Joel Brobecker CC: "H.J. Lu" , GDB Subject: Re: [7.5] PATCH: PR backtrace/14646 [x32] backtrace doesn't work References: <20121020234741.GA3626@gmail.com> <20121021015636.GD3050@adacore.com> In-Reply-To: <20121021015636.GD3050@adacore.com> 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: 2012-11/txt/msg00224.txt.bz2 On 10/21/2012 02:56 AM, Joel Brobecker wrote: >> This patch backports the fix from trunk to 7.5 branch. Tested on >> Linux/x86-64 and Linux/x32. OK to install? > [...] >> PR backtrace/14646 >> PR gdb/14647 >> * i386-tdep.h (gdbarch_tdep): Remove sp_regnum_from_eax and >> pc_regnum_from_eax. >> * i386-tdep.c (i386_gdbarch_init): Don't use sp_regnum_from_eax >> nor pc_regnum_from_eax. >> * amd64-tdep.c (amd64_x32_init_abi): Don't set sp_regnum_from_eax >> nor pc_regnum_from_eax. > > I'm sorry to say that I am not comfortable at all with this going > in the 7.5 branch. If Mark is super confident, then OK, but this is > touching sp/pc handling for all x86 and x86-64 targets. And I don't > think that the issue this patch is fixing is that critical. I'm not Mark, but it looks safe on all x86 and x86-64 targets to me. Note how tdep->sp_regnum_from_eax and tdep->sp_regnum_from_eax are -1 by default, and only x32 sets it to something else. Then, the only use for those fields: - if (tdep->sp_regnum_from_eax != -1) - set_gdbarch_sp_regnum (gdbarch, - (tdep->eax_regnum - + tdep->sp_regnum_from_eax)); - if (tdep->pc_regnum_from_eax != -1) - set_gdbarch_pc_regnum (gdbarch, - (tdep->eax_regnum - + tdep->pc_regnum_from_eax)); only had effect on x32. -- Pedro Alves