From 04ad99e60b4658ff3e7565000b5862c74cce2729 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Mon, 11 Jul 2011 13:40:24 +0000 Subject: 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. --- gdb/dwarf2expr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/dwarf2expr.c') 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; -- cgit v1.1