diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-07-11 13:40:24 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-07-11 13:40:24 +0000 |
commit | 04ad99e60b4658ff3e7565000b5862c74cce2729 (patch) | |
tree | 0ddd26ad0d2f3ca822b0ebcd30cf04749c984d1c /gdb/dwarf2expr.c | |
parent | 713389e0245333ded5b75dc90583570f8446f508 (diff) | |
download | gdb-04ad99e60b4658ff3e7565000b5862c74cce2729.zip gdb-04ad99e60b4658ff3e7565000b5862c74cce2729.tar.gz gdb-04ad99e60b4658ff3e7565000b5862c74cce2729.tar.bz2 |
gdb/
* dwarf2expr.c (read_sleb128): Fix signed extension overflowing host
`int'.
gdb/testsuite/
* gdb.dwarf2/dw2-const.S (Pointer size): Change from 4 to 8.
(DW_AT_high_pc, DW_AT_low_pc): Remove them.
(val8, .Ltype_const8, .Ltype_int8, DW_TAG_variable): New.
* gdb.dwarf2/dw2-const.exp (print/x val8): New test.
Diffstat (limited to 'gdb/dwarf2expr.c')
-rw-r--r-- | gdb/dwarf2expr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c index 4522eb8..b23ad9a 100644 --- a/gdb/dwarf2expr.c +++ b/gdb/dwarf2expr.c @@ -418,7 +418,7 @@ read_sleb128 (const gdb_byte *buf, const gdb_byte *buf_end, LONGEST * r) break; } if (shift < (sizeof (*r) * 8) && (byte & 0x40) != 0) - result |= -(1 << shift); + result |= -(((LONGEST) 1) << shift); *r = result; return buf; |