aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2002-02-20 22:41:52 +0000
committerDaniel Jacobowitz <drow@false.org>2002-02-20 22:41:52 +0000
commit551792a5ade93126dfbcb56d7263a21f5bbb7fc7 (patch)
treec36b18a9c1fb78e3ab4c6d4bbdf8de653a152dde /gdb
parent0f5881fadab5ef01a25e56ba1aa9164d3774fe57 (diff)
downloadgdb-551792a5ade93126dfbcb56d7263a21f5bbb7fc7.zip
gdb-551792a5ade93126dfbcb56d7263a21f5bbb7fc7.tar.gz
gdb-551792a5ade93126dfbcb56d7263a21f5bbb7fc7.tar.bz2
2002-02-20 Daniel Jacobowitz <drow@mvista.com>
Fix PR gdb/265. * jv-exp.y (parse_number): Handle 64-bit integers.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/jv-exp.y14
2 files changed, 14 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 168cfb1..22d2785 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2002-02-20 Daniel Jacobowitz <drow@mvista.com>
+ Fix PR gdb/265.
+ * jv-exp.y (parse_number): Handle 64-bit integers.
+
+2002-02-20 Daniel Jacobowitz <drow@mvista.com>
+
* gdbserver/configure.in: Remove AM_PROC_CC_STDC. Change
AC_STDC_HEADERS to AC_HEADER_STDC.
* gdbserver/configure: Regenerated.
diff --git a/gdb/jv-exp.y b/gdb/jv-exp.y
index 2a9b17e..403794e 100644
--- a/gdb/jv-exp.y
+++ b/gdb/jv-exp.y
@@ -764,13 +764,13 @@ parse_number (p, len, parsed_float, putithere)
}
c = p[len-1];
+ /* A paranoid calculation of (1<<64)-1. */
limit = (ULONGEST)0xffffffff;
+ limit = ((limit << 16) << 16) | limit;
if (c == 'l' || c == 'L')
{
type = java_long_type;
len--;
- /* A paranoid calculation of (1<<64)-1. */
- limit = ((limit << 16) << 16) | limit;
}
else
{
@@ -797,9 +797,13 @@ parse_number (p, len, parsed_float, putithere)
n += c;
}
- putithere->typed_val_int.val = n;
- putithere->typed_val_int.type = type;
- return INTEGER_LITERAL;
+ if (type == java_int_type && n > (ULONGEST)0xffffffff)
+ type = java_long_type;
+
+ putithere->typed_val_int.val = n;
+ putithere->typed_val_int.type = type;
+
+ return INTEGER_LITERAL;
}
struct token