- Treat dyn_ptr members of .dynamic entries as addresses rather than
pointers.
- Don't truncate pointers in svr4_truncate_ptr() if the pointer size is
larger than a CORE_ADDR as the truncation effectively sets them to
zero in this case. This should perhaps be using
gdbarch_integer_to_address() instead of it's own explicit truncation
anyway.
static CORE_ADDR
svr4_truncate_ptr (CORE_ADDR addr)
{
- if (gdbarch_ptr_bit (target_gdbarch ()) == sizeof (CORE_ADDR) * 8)
+ if (gdbarch_ptr_bit (target_gdbarch ()) >= sizeof (CORE_ADDR) * 8)
/* We don't need to truncate anything, and the bit twiddling below
will fail due to overflow problems. */
return addr;
entry. */
if (ptr)
{
+#if 0
struct type *ptr_type;
+#else
+ enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
+#endif
gdb_byte ptr_buf[8];
CORE_ADDR ptr_addr_1;
+#if 0
ptr_type = builtin_type (target_gdbarch ())->builtin_data_ptr;
+#endif
ptr_addr_1 = dyn_addr + (buf - bufstart) + arch_size / 8;
if (target_read_memory (ptr_addr_1, ptr_buf, arch_size / 8) == 0)
+#if 0
dyn_ptr = extract_typed_address (ptr_buf, ptr_type);
+#else
+ dyn_ptr = extract_unsigned_integer (ptr_buf, arch_size / 8,
+ byte_order);
+#endif
*ptr = dyn_ptr;
if (ptr_addr)
*ptr_addr = dyn_addr + (buf - bufstart);