From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25387 invoked by alias); 15 Oct 2012 10:10:04 -0000 Received: (qmail 25363 invoked by uid 22791); 15 Oct 2012 10:10:03 -0000 X-SWARE-Spam-Status: No, hits=-3.2 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 15 Oct 2012 10:09:58 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3) with ESMTP id q9FA9t8S006555; Mon, 15 Oct 2012 12:09:55 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id q9FA9r3O027266; Mon, 15 Oct 2012 12:09:53 +0200 (CEST) Date: Mon, 15 Oct 2012 10:10:00 -0000 Message-Id: <201210151009.q9FA9r3O027266@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: hjl.tools@gmail.com CC: gdb-patches@sourceware.org In-reply-to: (hjl.tools@gmail.com) Subject: Re: PING: PATCH: PR backtrace/14646: [x32] backtrace doesn't work References: <20121003154712.GH3028@adacore.com> <201210040657.q946vJlc006566@glazunov.sibelius.xs4all.nl> <201210081948.q98Jm3D7020175@glazunov.sibelius.xs4all.nl> <201210082022.q98KM82d014759@glazunov.sibelius.xs4all.nl> <201210082047.q98KlQ6V031554@glazunov.sibelius.xs4all.nl> <20121008210142.GA14305@gmail.com> <20121009153217.GA6936@gmail.com> <201210091539.q99Fdj3D027359@glazunov.sibelius.xs4all.nl> <201210091547.q99FlrrT005368@glazunov.sibelius.xs4all.nl> 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-10/txt/msg00209.txt.bz2 > Date: Tue, 9 Oct 2012 09:38:32 -0700 > From: "H.J. Lu" > > The current GDB doesn't work on x32. This patch: > > http://sourceware.org/ml/gdb-patches/2012-09/msg00714.html > > isn't perfect where $pc/$sp is displayed as 64-bit integer. But > otherwise, GDB works fine. Finally found some time to dig a little bit deeper. The x32 ABI isn't the only 32-bit ABI with 64-bit registers. The mips n32 ABI has exactly the same issue. The relevant code there carries the following comment: /* Use pointer types for registers if we can. For n32 we can not, since we do not have a 64-bit pointer type. */ So I'd say that you should probably commit the diff in: on the grounds that other 32-bit on 64-bit ABIs also punt on the issue. But it would be good to try to come up with a way to print 64-bit registers as pointers for this class of ABIs. But that should almost certainly done by fixing target-independent parts of GDB and not by adding more complexity to the target descriptions like your last couple of diffs did.