From: Daniel Jacobowitz <drow@false.org>
To: Thiago Jung Bauermann <bauerman@br.ibm.com>
Cc: Grzegorz Cieslewski <cieslewski@hcs.ufl.edu>, gdb@sourceware.org
Subject: Re: Setting a floating point register to raw hex value
Date: Fri, 19 Oct 2007 20:15:00 -0000 [thread overview]
Message-ID: <20071019201528.GA20360@caradoc.them.org> (raw)
In-Reply-To: <1192823285.5787.122.camel@localhost.localdomain>
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<double>(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
next prev parent reply other threads:[~2007-10-19 20:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-12 15:29 Grzegorz Cieslewski
2007-10-18 19:38 ` Grzegorz Cieslewski
2007-10-18 20:16 ` Thiago Jung Bauermann
2007-10-18 21:44 ` Grzegorz Cieslewski
2007-10-18 21:54 ` Daniel Jacobowitz
2007-10-19 19:48 ` Thiago Jung Bauermann
2007-10-19 20:15 ` Daniel Jacobowitz [this message]
2007-10-22 16:22 ` Grzegorz Cieslewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071019201528.GA20360@caradoc.them.org \
--to=drow@false.org \
--cc=bauerman@br.ibm.com \
--cc=cieslewski@hcs.ufl.edu \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox