This is the mail archive of the gdb-prs@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]

[Bug gdb/20506] New: floating point register not print in 'f' format will get the wrong value


https://sourceware.org/bugzilla/show_bug.cgi?id=20506

            Bug ID: 20506
           Summary: floating point register not print in 'f' format will
                    get the wrong value
           Product: gdb
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: elson.wei at gmail dot com
  Target Milestone: ---

Demo:

1. print $mmx0 register
(gdb) p $xmm0
$1 = {v4_float = {0, 0, 0, 0}, v2_double = {0, 0}, v16_int8 = {0 <repeats 16
times>}, v8_int16 = {0, 0, 0,
    0, 0, 0, 0, 0}, v4_int32 = {0, 0, 0, 0}, v2_int64 = {0, 0}, uint128 = 0}

2. set a value
(gdb)set $xmm0.v4_int32[0]=0xd0d0d0d0

3. check $xmm0, the result is correct
(gdb) p $xmm0
$2 = {v4_float = {-2.80267653e+10, 0, 0, 0}, v2_double =
{1.730882840854945e-314, 0}, v16_int8 = {-48, -48,
    -48, -48, 0 <repeats 12 times>}, v8_int16 = {-12080, -12080, 0, 0, 0, 0, 0,
0}, v4_int32 = {-791621424,
    0, 0, 0}, v2_int64 = {3503345872, 0}, uint128 = 3503345872}

4. print $xmm0 in hex format, the v4_float and v2_double are wrong.
$3 = {v4_float = {0x79798000, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8
= {0xd0, 0xd0, 0xd0, 0xd0,
    0x0 <repeats 12 times>}, v8_int16 = {0xd0d0, 0xd0d0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0}, v4_int32 = {
    0xd0d0d0d0, 0x0, 0x0, 0x0}, v2_int64 = {0xd0d0d0d0, 0x0}, uint128 =
0x000000000000000000000000d0d0d0d0}

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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