From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15021 invoked by alias); 11 Jun 2013 09:21:51 -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 14978 invoked by uid 89); 11 Jun 2013 09:21:44 -0000 X-Spam-SWARE-Status: No, score=-7.6 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 11 Jun 2013 09:21:43 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r5B9LcoH005251 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 11 Jun 2013 05:21:38 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r5B9LZdd004662; Tue, 11 Jun 2013 05:21:36 -0400 Message-ID: <51B6EC1F.3020401@redhat.com> Date: Tue, 11 Jun 2013 09:21:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6 MIME-Version: 1.0 To: Mark Kettenis CC: macro@codesourcery.com, brobecker@adacore.com, lgustavo@codesourcery.com, gdb@sourceware.org Subject: Re: Assuming types for PC References: <51B5E06A.8020807@codesourcery.com> <201306101431.r5AEVAfb007850@glazunov.sibelius.xs4all.nl> <51B5E3D4.9010105@codesourcery.com> <201306101504.r5AF4pJJ010320@glazunov.sibelius.xs4all.nl> <201306101844.r5AIi8Ou017730@glazunov.sibelius.xs4all.nl> In-Reply-To: <201306101844.r5AIi8Ou017730@glazunov.sibelius.xs4all.nl> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-06/txt/msg00031.txt.bz2 On 06/10/2013 07:44 PM, Mark Kettenis wrote: >> Date: Mon, 10 Jun 2013 19:04:08 +0100 >> From: "Maciej W. Rozycki" >> >> I think it is important to let the user access the full width of the PC >> both for writes and -- more importantly -- for reads (as in: why did my >> program crash, did it jump to an odd place?), as this lets the user do >> with GDB what hardware permits. There is nothing in hardware that >> prevents one from writing an out-of-valid ABI address space value to the >> PC at a program's runtime (neither on Linux nor on bare iron) when >> executing an n32 program. I think GDB should not stand in a user's way >> and should allow the same to be done via ptrace(2) or RSP. > > Absolutely! +1. Hmm, it'd be nice to have this spelled out in the internals manual (or the wiki?). I while ago I pointed this out on a review of some port. Can't recall which, but in the end I let it go. Maybe I should have pushed back stronger. >> Overall I think the test is too strict. If you think the use of "long >> long" is unfortunate for the PC, then an artificial type might be created >> internally within GDB specifically for the PC, similarly to what we do >> e.g. for IEEE 754 data types and floating-point registers in some cases. > > An artificial type like that probably is the way to go. I agree. Something like the GDB equivalent of: typedef void * ptr64 __attribute ((mode(DI))); (That worked last time I tried it on x32, probably works on MIPS too.) -- Pedro Alves