This is the mail archive of the gdb-patches@sourceware.cygnus.com 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]

Re: gdb patch for 64-bit enum values on 64-bit hosts (ia64-linux)


I think I had gdb testsuite problems because I looked at the results too
closely.  We get lots of failures, particularly at the beginning, but
if I ignore them and let it run for a while the end result looks about OK.
Well, about OK as it ever has been I think.

The patch I posted yesterday for dwarf2read.c (read_array_type) et al
works fine.  There are no additional gdb testsuite failures with the patch
on an ia64-linux machine.

For Michael Snyder's new enum tests in exprs.exp I get this:
FAIL: gdb.base/exprs.exp: print pigment > enum (print pigment > black)
FAIL: gdb.base/exprs.exp: print pigment > int (print pigment > 0)
FAIL: gdb.base/exprs.exp: print pigment < enum (print pigment < black)
FAIL: gdb.base/exprs.exp: print pigment < int (print pigment < 0)
FAIL: gdb.base/exprs.exp: print shade == int (print shade == 0x1000000000000001L)
FAIL: gdb.base/exprs.exp: print shade != int (print shade != 0x1000000000000001L)
FAIL: gdb.base/exprs.exp: print shade > int (print shade > 0x1000000000000000L)
FAIL: gdb.base/exprs.exp: print shade < int (print shade < 0x1000000000000000L)
FAIL: gdb.base/exprs.exp: print shade < int (print shade < 0x1000000000000001L)
FAIL: gdb.base/exprs.exp: print hue != int (print hue != -2L)
FAIL: gdb.base/exprs.exp: print hue > enum (print hue > white)
FAIL: gdb.base/exprs.exp: print hue > int (print hue > -2L)
FAIL: gdb.base/exprs.exp: print hue > int (print hue > 0L)
FAIL: gdb.base/exprs.exp: print hue < enum (print hue < white)
FAIL: gdb.base/exprs.exp: print hue < int (print hue < 0L)

The pigment tests fail because gcc does not emit signed/unsigned type info
for enums, and gdb assumes that enums are unsigned.  Thus comparing -2 < 0
does not give the expected result.

The shade tests fail apparently because of a problem in the expression
evaluation code.  It seems to be truncating long input values to int somewhere.
I had some trouble debugging gdb with gdb though, so I don't know where this
is happening.

The hue tests fail for two reasons.  One is the unsigned/signed confusion
mentioned above.  The other is that gcc makes the enum a 4-byte value even
though it contains values like -2L which one would expect to be 64-bit values.

Jim

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