aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTheodore A. Roth <troth@openavr.org>2003-06-13 17:52:28 +0000
committerTheodore A. Roth <troth@openavr.org>2003-06-13 17:52:28 +0000
commit4ea2465e326958603cb2e94329e2c3e7db6bddc0 (patch)
tree3340d3c39fa6113cc4f20c65196ed1bac981fd8c /gdb
parent1581182a448382596b344ebc0857138310bec402 (diff)
downloadgdb-4ea2465e326958603cb2e94329e2c3e7db6bddc0.zip
gdb-4ea2465e326958603cb2e94329e2c3e7db6bddc0.tar.gz
gdb-4ea2465e326958603cb2e94329e2c3e7db6bddc0.tar.bz2
* avr-tdep.c (avr_address_to_pointer): Shift code addrs right 1 bit.
(avr_pointer_to_address): Shift code addrs left 1 bit. (avr_convert_from_func_ptr_addr): Delete function since operation is better handled by avr_address_to_pointer and avr_pointer_to_address. (avr_gdbarch_init): Don't set convert_from_func_ptr_add method.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/avr-tdep.c16
2 files changed, 10 insertions, 14 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d2aa809..bfe305b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+2003-06-13 Theodore A. Roth <troth@openavr.org>
+
+ * avr-tdep.c (avr_address_to_pointer): Shift code addrs right 1 bit.
+ (avr_pointer_to_address): Shift code addrs left 1 bit.
+ (avr_convert_from_func_ptr_addr): Delete function since operation is
+ better handled by avr_address_to_pointer and avr_pointer_to_address.
+ (avr_gdbarch_init): Don't set convert_from_func_ptr_add method.
+
2003-06-13 Mark Kettenis <kettenis@gnu.org>
From Kelley Cook <kelleycook@wideopenwest.com>:
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index b6967c8..df1ffdd 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -311,7 +311,7 @@ avr_address_to_pointer (struct type *type, void *buf, CORE_ADDR addr)
|| TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_METHOD)
{
store_unsigned_integer (buf, TYPE_LENGTH (type),
- avr_convert_iaddr_to_raw (addr));
+ avr_convert_iaddr_to_raw (addr >> 1));
}
else
{
@@ -338,7 +338,7 @@ avr_pointer_to_address (struct type *type, const void *buf)
if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_FUNC
|| TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_METHOD
|| TYPE_CODE_SPACE (TYPE_TARGET_TYPE (type)))
- return avr_make_iaddr (addr);
+ return avr_make_iaddr (addr << 1);
else
return avr_make_saddr (addr);
}
@@ -411,15 +411,6 @@ avr_remote_translate_xfer_address (struct gdbarch *gdbarch,
*targ_len = nr_bytes;
}
-/* Function pointers obtained from the target are half of what gdb expects so
- multiply by 2. */
-
-static CORE_ADDR
-avr_convert_from_func_ptr_addr (CORE_ADDR addr)
-{
- return addr * 2;
-}
-
/* avr_scan_prologue is also used as the
deprecated_frame_init_saved_regs().
@@ -1214,9 +1205,6 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_frame_locals_address (gdbarch, avr_frame_address);
set_gdbarch_deprecated_saved_pc_after_call (gdbarch, avr_saved_pc_after_call);
- set_gdbarch_convert_from_func_ptr_addr (gdbarch,
- avr_convert_from_func_ptr_addr);
-
return gdbarch;
}