From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 316 invoked by alias); 19 Oct 2007 20:15:36 -0000 Received: (qmail 306 invoked by uid 22791); 19 Oct 2007 20:15:35 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 19 Oct 2007 20:15:32 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 8C28A982DF; Fri, 19 Oct 2007 20:15:30 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 3A5CB980A7; Fri, 19 Oct 2007 20:15:30 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1IiyFk-0005Os-Tv; Fri, 19 Oct 2007 16:15:28 -0400 Date: Fri, 19 Oct 2007 20:15:00 -0000 From: Daniel Jacobowitz To: Thiago Jung Bauermann Cc: Grzegorz Cieslewski , gdb@sourceware.org Subject: Re: Setting a floating point register to raw hex value Message-ID: <20071019201528.GA20360@caradoc.them.org> Mail-Followup-To: Thiago Jung Bauermann , Grzegorz Cieslewski , gdb@sourceware.org References: <7aa837f80710120829y33db4c3cya21f6ead14ca56f3@mail.gmail.com> <7aa837f80710181238o4aa3e19djffe5324df65e5928@mail.gmail.com> <1192738560.5787.86.camel@localhost.localdomain> <20071018215448.GA12140@caradoc.them.org> <1192823285.5787.122.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1192823285.5787.122.camel@localhost.localdomain> User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes 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 X-SW-Source: 2007-10/txt/msg00178.txt.bz2 On Fri, Oct 19, 2007 at 05:48:05PM -0200, Thiago Jung Bauermann wrote: > You mean that rs6000_convert_register_p should return true for every > type that's not double, and then GDB would try to convert a void * to a > double and fail? Maybe. To be honest, I didn't think that would reach this point at all for the expression "(void *) $f0". I thought that would take the value of the register and call value_cast. But I guess that's not happening, or else we're marking the result of the cast as an lvalue. GCC stopped doing that; maybe we should too. What we really want here is not: set (long) $f0 = 0x1 but rather something like: set $f0 = reinterpret_cast(0x1) No, I'm not seriously suggesting we implement reinterpret_cast, which C++ wouldn't let us use like that anyway. > $sp - 8 will mess with the function's frame if he happens to be stepping > through the prologue. Just telling to make sure Grzegorz is aware of > it... Depends on the architecture - only if you have a red zone. > > Oddly, this does not work on PowerPC. I can't figure out why > > not. It certainly ought to work; perhaps it requires a current > > version of GDB, since 0x1 is a denormal. It does work for normals, > > though, so I know the approach is sound. > > It worked for me in GDB 6.7 but not in HEAD. Hmm, failed for me in 6.6. -- Daniel Jacobowitz CodeSourcery