Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* regression with huge integer
@ 2004-02-23 19:55 Michael Elizabeth Chastain
  2004-02-23 20:44 ` Andreas Schwab
  2004-02-23 21:31 ` Andrew Cagney
  0 siblings, 2 replies; 9+ messages in thread
From: Michael Elizabeth Chastain @ 2004-02-23 19:55 UTC (permalink / raw)
  To: gdb, jjohnstn

gdb.stabs/weird.def has this huge integer:

  # 256-bit integer.  The point is obviously not that GDB should have a
  # special case for this size, but that an integer of any size should
  # work (at least for printing in hex, not necessarily for arithmetic.  
  .stabs "int256var:G203=bu32;0;256;", N_GSYM,0,0, 0
  # The value is palindromic, so it works whether words are big or little
  # endian.  
  .globl int256var
  .data
  .align_it
       int256var:
  .long 42
       .long 0x2b, 0x2c, 0x2d, 0x2d, 0x2c, 0x2b, 0x2a

gdb 6.0 can print this just fine:

  (gdb) print int256var
  $1 = 0x0000002a0000002b0000002c0000002d0000002d0000002c0000002b0000002a
  (gdb) print /x int256var
  $2 = 0x0000002a0000002b0000002c0000002d0000002d0000002c0000002b0000002a

But with the recent simplification to print_scalar_formatted, gdb HEAD says:

  (gdb) print int256var
  $1 = 0x0000002a0000002b0000002c0000002d0000002d0000002c0000002b0000002a
  (gdb) print /x int256var
  $2 = That operation is not available on integers of more than 8 bytes.

This causes a regression in the test results.

I would like to just accept this output and change the test script.
Specifically, in gdb.stabs/weird.exp:

	  # This big number needs to be kept as one piece
  - 	gdb_test "p/x int256var" " = 0x0*2a0000002b0000002c0000002d0000002d0000002c0000002b0000002a" "print very big integer"
  + 	gdb_test "print int256var" " = 0x0*2a0000002b0000002c0000002d0000002d0000002c0000002b0000002a" "print very big integer"
    
Is this a good idea?  Or should I file a bug that "print /x" does not work
in this case?

Michael C


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-02-26 23:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-23 19:55 regression with huge integer Michael Elizabeth Chastain
2004-02-23 20:44 ` Andreas Schwab
2004-02-23 21:27   ` Mark Kettenis
2004-02-23 21:31 ` Andrew Cagney
2004-02-23 22:25   ` Jeff Johnston
2004-02-26 22:16     ` [RFA]: Patch for " Jeff Johnston
2004-02-26 23:09       ` Andrew Cagney
2004-02-26 23:17       ` Daniel Jacobowitz
2004-02-26 23:48         ` Jeff Johnston

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox