diff options
author | Daniel Jacobowitz <dan@debian.org> | 2005-08-01 04:06:27 +0000 |
---|---|---|
committer | Daniel Jacobowitz <dan@debian.org> | 2005-08-01 04:06:27 +0000 |
commit | 14ea44241722a937f66911454a0b59f3924d5f1d (patch) | |
tree | 9dffc227c07e46f8711d198ee9a6164a79512976 /gdb/dwarf2-frame.c | |
parent | bedd3394b73b85b069754ed87a09d172da34d967 (diff) | |
download | gdb-14ea44241722a937f66911454a0b59f3924d5f1d.tar.gz |
* dwarf2-frame.c (read_signed_leb128): Handle values that do not
fit in 32 bits.
* dwarf2read.c (read_signed_leb128): Likewise.
Diffstat (limited to 'gdb/dwarf2-frame.c')
-rw-r--r-- | gdb/dwarf2-frame.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c index 945d21647fd..ef0d6266fd8 100644 --- a/gdb/dwarf2-frame.c +++ b/gdb/dwarf2-frame.c @@ -1105,8 +1105,8 @@ read_signed_leb128 (bfd *abfd, gdb_byte *buf, unsigned int *bytes_read_ptr) } while (byte & 0x80); - if ((shift < 32) && (byte & 0x40)) - result |= -(1 << shift); + if (shift < 8 * sizeof (result) && (byte & 0x40)) + result |= -(((LONGEST)1) << shift); *bytes_read_ptr = num_read; |