From 385fa495bfa18b350d21d71e4064359f96599ff0 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Thu, 21 Feb 2002 02:54:46 +0000 Subject: 2002-02-20 Daniel Jacobowitz * jv-exp.y (parse_number): Change type of implicit longs to builtin_type_uint64. --- gdb/ChangeLog | 5 +++++ gdb/jv-exp.y | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'gdb') diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 295c0e1..063701c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2002-02-20 Daniel Jacobowitz + * jv-exp.y (parse_number): Change type of implicit longs + to builtin_type_uint64. + +2002-02-20 Daniel Jacobowitz + * gdbserver/linux-low.c (mywait): Change argument to waitpid to be an integer instead of a `union wait'. diff --git a/gdb/jv-exp.y b/gdb/jv-exp.y index 403794e..1b80ab4 100644 --- a/gdb/jv-exp.y +++ b/gdb/jv-exp.y @@ -797,8 +797,13 @@ parse_number (p, len, parsed_float, putithere) n += c; } - if (type == java_int_type && n > (ULONGEST)0xffffffff) - type = java_long_type; + /* If the type is bigger than a 32-bit signed integer can be, implicitly + promote to long. Java does not do this, so mark it as builtin_type_uint64 + rather than java_long_type. 0x80000000 will become -0x80000000 instead + of 0x80000000L, because we don't know the sign at this point. + */ + if (type == java_int_type && n > (ULONGEST)0x80000000) + type = builtin_type_uint64; putithere->typed_val_int.val = n; putithere->typed_val_int.type = type; -- cgit v1.1