[PATCH 3/4] GDB: Add support for 24 bit addresses
John Darrington
john@darrington.wattle.id.au
Wed Aug 29 14:18:00 GMT 2018
* gdb/dwarf2-frame.c (encoding_for_size): Deal with case 3.
(read_encoded_value): Deal with case DW_EH_PE_udata3
---
gdb/dwarf2-frame.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
index f7dc820f4d..b329e34997 100644
--- a/gdb/dwarf2-frame.c
+++ b/gdb/dwarf2-frame.c
@@ -1527,12 +1527,14 @@ encoding_for_size (unsigned int size)
{
case 2:
return DW_EH_PE_udata2;
+ case 3:
+ return DW_EH_PE_udata3;
case 4:
return DW_EH_PE_udata4;
case 8:
return DW_EH_PE_udata8;
default:
- internal_error (__FILE__, __LINE__, _("Unsupported address size"));
+ internal_error (__FILE__, __LINE__, _("Unsupported address size %d"), size);
}
}
@@ -1605,6 +1607,9 @@ read_encoded_value (struct comp_unit *unit, gdb_byte encoding,
case DW_EH_PE_udata2:
*bytes_read_ptr += 2;
return (base + bfd_get_16 (unit->abfd, (bfd_byte *) buf));
+ case DW_EH_PE_udata3:
+ *bytes_read_ptr += 3;
+ return (base + bfd_get_24 (unit->abfd, (bfd_byte *) buf));
case DW_EH_PE_udata4:
*bytes_read_ptr += 4;
return (base + bfd_get_32 (unit->abfd, (bfd_byte *) buf));
--
2.11.0
More information about the Gdb-patches
mailing list