This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] setting the raw content of a register


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]