mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-02 02:35:00 +08:00
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.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user