[review] Add scalar_storage_order support for floating point

Tom Tromey (Code Review) gerrit@gnutoolchain-gerrit.osci.io
Tue Dec 3 21:30:00 GMT 2019


Tom Tromey has posted comments on this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/727
......................................................................


Patch Set 1:

(1 comment)

| --- gdb/testsuite/gdb.base/endianity.exp
| +++ gdb/testsuite/gdb.base/endianity.exp
| @@ -25,16 +25,17 @@ if ![runto "endianity.c:$bp_location" ] then {
|    return -1
|  }
|  
| -gdb_test "print o" "= {v = 3, w = 2}" "print o before assignment"
| +gdb_test "print o" "= {v = 3, w = 2, f = 23.5, cplx = 1.25 \\+ 7.25 \\* I}" \
| +    "print o before assignment"
|  
|  gdb_test "print o.v = 4" "= 4"
|  gdb_test "print o.w = 3" "= 3"
| +gdb_test "print o.f = 1.5" "= 1.5"

PS1, Line 33:

> Just wondering why we don't set cplx, does gdb not offer a way to set complex?

I don't think there's a way.  I went through the GCC node about
complex
types, and basically gdb doesn't implement any of it, and in fact
the way gdb print complex numbers for C is not a way that GCC can
read.

|  
|  # scalar_storage_order requires gcc >= 6
|  if { ([test_compiler_info {gcc-[0-5]-*}] || ![test_compiler_info gcc*]) } {
|    setup_xfail "*-*-*"
|  }
|  gdb_test "x/x &o.v" "0x04000000"
|  gdb_test "x/xh &o.w" "0x0300"
|  
| -gdb_test "print o" "= {v = 4, w = 3}" "print o after assignment"

-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: Ic02eb711d80ce678ef0ecf8c506a626e441b8440
Gerrit-Change-Number: 727
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-Reviewer: Tom Tromey <tromey@sourceware.org>
Gerrit-CC: Simon Marchi <simon.marchi@polymtl.ca>
Gerrit-Comment-Date: Tue, 03 Dec 2019 21:30:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Simon Marchi <simon.marchi@polymtl.ca>
Gerrit-MessageType: comment



More information about the Gdb-patches mailing list