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 tdep/21907] New: Dn/Qn registers are printed wrongly by "info reg" on a system with NEON support


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

            Bug ID: 21907
           Summary: Dn/Qn registers are printed wrongly by "info reg" on a
                    system with NEON support
           Product: gdb
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tdep
          Assignee: unassigned at sourceware dot org
          Reporter: b7.10110111 at gmail dot com
  Target Milestone: ---

Tested on remotely-debugged program on Lenovo A328. To reproduce, run this
command:

arm-unknown-linux-gnueabihf-gdb -q -ex 'target remote 192.168.0.235:9999' -ex
'p $d0' -ex 'info reg d0'

Then it outputs:
$1 = {
  u8 = {49, 105, 110, 47, 116, 114, 117, 101}, 
  u16 = {26929, 12142, 29300, 25973}, 
  u32 = {795765041, 1702195828}, 
  u64 = 7310875413443406129, 
  f32 = {2.16833454e-10, 7.24431922e+22}, 
  f64 = 5.5621884095669346e+180
}
d0             {
  u8 = {0x31, 0x69, 0x6e, 0x2f, 0x74, 0x72, 0x75, 0x65}, 
  u16 = {0x6931, 0x2f6e, 0x7274, 0x6575}, 
  u32 = {0x2f6e6931, 0x65757274}, 
  u64 = 0x657572742f6e6931, 
  f32 = {0x0, 0x0}, 
  f64 = 0x8000000000000000
}

Notice how the first case ("p" command) is OK, while the second (info reg)
gives wrong values for f32 and f64. Looks like they are first converted to
integers, and then printed in hex format. They should at the very least not be
converted, and additionally maybe printed in natural format as well as raw.

Similar pattern is with $q0-$q15 registers.

Data from /proc/cpuinfo:
Processor       : ARMv7 Processor rev 3 (v7l)
Features        : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpv4
idiva idivt

-- 
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]