From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4869 invoked by alias); 11 Feb 2009 22:50:27 -0000 Received: (qmail 4858 invoked by uid 22791); 11 Feb 2009 22:50:27 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 11 Feb 2009 22:50:19 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n1BMoGQD029460; Wed, 11 Feb 2009 17:50:16 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n1BMoGln022065; Wed, 11 Feb 2009 17:50:17 -0500 Received: from host0.dyn.jankratochvil.net (sebastian-int.corp.redhat.com [172.16.52.221]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n1BMoFKc023408; Wed, 11 Feb 2009 17:50:16 -0500 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.3/8.14.3) with ESMTP id n1BMoCqA029241; Wed, 11 Feb 2009 23:50:13 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.2/Submit) id n1BMoCou029238; Wed, 11 Feb 2009 23:50:12 +0100 Date: Wed, 11 Feb 2009 22:50:00 -0000 From: Jan Kratochvil To: Mark Kettenis Cc: drow@false.org, gdb-patches@sourceware.org Subject: Re: [patch] Fix `return' of long/long-long results with no debuginfo Message-ID: <20090211225012.GA28683@host0.dyn.jankratochvil.net> References: <20090211194511.GA9324@host0.dyn.jankratochvil.net> <200902112040.n1BKdxb3028188@brahms.sibelius.xs4all.nl> <20090211205045.GB9762@caradoc.them.org> <200902112122.n1BLMf8q000100@brahms.sibelius.xs4all.nl> <20090211214646.GA22247@host0.dyn.jankratochvil.net> <200902112157.n1BLvplk011339@brahms.sibelius.xs4all.nl> <20090211220824.GA26040@host0.dyn.jankratochvil.net> <200902112237.n1BMbbOb006035@brahms.sibelius.xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200902112237.n1BMbbOb006035@brahms.sibelius.xs4all.nl> User-Agent: Mutt/1.5.18 (2008-05-17) 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: 2009-02/txt/msg00272.txt.bz2 On Wed, 11 Feb 2009 23:37:38 +0100, Mark Kettenis wrote: > > ..., would it be an idea to use the type of the return value > > expression given by the user instead of int as a fallback? > > Which you seemed to ignore. I think it actually makes the return > command more powerful, by letting the user (implicitly or explicitly) > specify the return type of a function for which debugging information > is missing. Can you please consider the suggestion I make? Your suggestion ("type of the return value expression given by the user"): + improvement over the current state (one _can_ return long or long long) - may be more tricky to the user (requirement to cast to long or long long if the inferior function returns such type) (as the redhat.com Bug would be still filed on this implementation by the user I did not find it acceptable myself no matter of its technical aspects) My suggestion (long long cast forced by GDB): + improvement over the current state - like yours + easier for the user automatically fixing his mistakes - possibly incompatible with ABI having `int' value placement incompatible with `long long' value placement - possibly incompatible with ABI not having `long' returned in a register (both ABI requirements are compliant with the common ABIs I am aware of) You are right I should have been more addressing your opinion. Regards, Jan