binutils-gdb/gdb/testsuite/gdb.arch
Pedro Alves 433730c973 Fix the x87 FP register printout when issuing the “info float” command.
Consider the following simple program:

.globl  _start
.text
_start:
      fldt    val
.data
      val: .byte 0x00,0x00,0x45,0x07,0x11,0x19,0x22,0xe9,0xfe,0xbf

With current GDB on x86-64 GNU/Linux hosts, after the moment the fldt
command has been executed the register st(0) looks like this,
according to the “info regs” output (TOP=7):

  R7: Valid   0xffffffbffffffffeffffffe922191107450000 -0.910676542908976927

which is clearly wrong (just count its length).  The problem is due to
the printf statement (see patch) printing a promoted integer value of
a char argument "raw[i]", and, since char is signed on x86-64
GNU/Linux, the erroneous “ffffff” are printed for the first three
bytes which turn out to be "negative".  The fix is to use gdb_byte
instead which is unsigned (and is the type of value_contents(), the
type to be used for raw target bytes anyway).  After the fix the value
will be printed correctly:

  R7: Valid   0xbffee922191107450000 -0.910676542908976927

gdb/
2013-04-19  Vladimir Kargov <kargov@gmail.com>
	    Pedro Alves  <palves@redhat.com>

	* i387-tdep.c (i387_print_float_info): Use gdb_byte for pointer to
	value contents.

gdb/testsuite/
2013-04-19  Vladimir Kargov  <kargov@gmail.com>
	    Pedro Alves  <palves@redhat.com>

	* gdb.arch/i386-float.S: New file.
	* gdb.arch/i386-float.exp: New file.
2013-04-19 14:13:30 +00:00
..
alpha-step.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
alpha-step.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
altivec-abi.c
altivec-abi.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
altivec-regs.c
altivec-regs.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
amd64-byte.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
amd64-disp-step.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
amd64-disp-step.S Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
amd64-dword.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
amd64-entry-value-inline.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
amd64-entry-value-inline.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
amd64-entry-value-inline.S Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
amd64-entry-value-param.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
amd64-entry-value-param.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
amd64-entry-value-param.S Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
amd64-entry-value.cc Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
amd64-entry-value.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
amd64-entry-value.s Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
amd64-i386-address.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
amd64-i386-address.S Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
amd64-prologue-xmm.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
amd64-prologue-xmm.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
amd64-prologue-xmm.s Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
amd64-pseudo.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
amd64-tailcall-cxx1.cc gdb/ 2013-03-10 18:04:00 +00:00
amd64-tailcall-cxx1.S gdb/ 2013-03-10 18:04:00 +00:00
amd64-tailcall-cxx2.cc gdb/ 2013-03-10 18:04:00 +00:00
amd64-tailcall-cxx2.S gdb/ 2013-03-10 18:04:00 +00:00
amd64-tailcall-cxx.exp gdb/ 2013-03-10 18:04:00 +00:00
amd64-tailcall-noret.c gdb/ 2013-03-10 18:06:26 +00:00
amd64-tailcall-noret.exp gdb/ 2013-03-10 18:06:26 +00:00
amd64-tailcall-noret.S gdb/ 2013-03-10 18:06:26 +00:00
amd64-tailcall-ret.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
amd64-tailcall-ret.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
amd64-tailcall-ret.S Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
amd64-word.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
arm-disp-step.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
arm-disp-step.S Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
e500-abi.c
e500-abi.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
e500-prologue.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
e500-prologue.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
e500-regs.c
e500-regs.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
gcore.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
gdb1291.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
gdb1291.s Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
gdb1431.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
gdb1431.s Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
gdb1558.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
gdb1558.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-avx.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-avx.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-bp_permanent.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-byte.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-cfi-notcurrent.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-cfi-notcurrent.S Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-cpuid.h Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-disp-step.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-disp-step.S Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-dr3-watch.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-dr3-watch.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-float.exp Fix the x87 FP register printout when issuing the “info float” command. 2013-04-19 14:13:30 +00:00
i386-float.S Fix the x87 FP register printout when issuing the “info float” command. 2013-04-19 14:13:30 +00:00
i386-gnu-cfi-asm.S Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-gnu-cfi.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-gnu-cfi.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-permbkpt.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-permbkpt.S Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-prologue.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-prologue.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-pseudo.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-signal.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-signal.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-size-overlap.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-size-overlap.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-size.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-size.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-sse-stack-align.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-sse-stack-align.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-sse-stack-align.S Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-sse.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-sse.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-unwind.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-unwind.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
i386-word.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
ia64-breakpoint-shadow.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
ia64-breakpoint-shadow.S Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
iwmmxt-regs.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
iwmmxt-regs.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
Makefile.in * Makefile.in (clean): Remove Fission .dwo and .dwp files. 2012-05-17 19:03:59 +00:00
mips16-thunks-inmain.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
mips16-thunks-main.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
mips16-thunks-sin.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
mips16-thunks-sinfrob16.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
mips16-thunks-sinfrob.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
mips16-thunks-sinmain.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
mips16-thunks-sinmips16.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
mips16-thunks.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
mips-octeon-bbit.c 2012-08-19 Andrew Pinski <apinski@cavium.com> 2012-08-19 22:22:49 +00:00
mips-octeon-bbit.exp gdb/testsuite/ 2013-03-14 13:34:06 +00:00
pa64-nullify.s
pa-nullify.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
pa-nullify.s
powerpc-aix-prologue.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
powerpc-aix-prologue.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
powerpc-d128-regs.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
powerpc-d128-regs.exp gdb/testsuite/ 2013-03-14 13:34:06 +00:00
powerpc-prologue.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
powerpc-prologue.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
ppc64-atomic-inst.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
ppc64-atomic-inst.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
ppc-dfp.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
ppc-dfp.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
ppc-fp.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
ppc-fp.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
spu-info.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
spu-info.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
spu-ls.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
spu-ls.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
system-gcore.exp gdb/testsuite/ 2013-03-14 13:34:06 +00:00
thumb2-it.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
thumb2-it.S Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
thumb-bx-pc.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
thumb-bx-pc.S Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
thumb-prologue.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
thumb-prologue.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
thumb-singlestep.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
thumb-singlestep.S Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
vsx-regs.c
vsx-regs.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00