This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] setting the raw content of a register
- From: Pedro Alves <palves at redhat dot com>
- To: Jerome Guitton <guitton at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 22 May 2012 15:55:04 +0100
- Subject: Re: [RFC] setting the raw content of a register
- References: <1337697398-25866-1-git-send-email-guitton@adacore.com>
On 05/22/2012 03:36 PM, Jerome Guitton wrote:
> When trying to set the raw content of a fp register, many users try
> something like:
>
> (gdb) set $f14 := 0xFFF0000000000050
> (gdb) info registers $f14
> f14 -4503599627370416.0 (raw 0xc32fffffffffff60)
>
> Of course, GDB sets the value of $f14, not its raw content. Now
> this can be worked around by writing the raw content in memory,
> re-read it as a float and store the value into register f14. Quite
> kludgy though, and it often hits some limitations of the interpreter
> regarding floats (e.g. signs of NaN are lost).
What about :
p $f14 = {double} {0xFFF0000000000050}
?
--
Pedro Alves