2002-02-20 Daniel Jacobowitz <drow@mvista.com>

Fix PR gdb/265.
        * jv-exp.y (parse_number): Handle 64-bit integers.
This commit is contained in:
Daniel Jacobowitz 2002-02-20 22:41:52 +00:00
parent 0f5881fada
commit 551792a5ad
2 changed files with 14 additions and 5 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -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