diff options
author | Tristan Gingold <gingold@adacore.com> | 2009-11-10 10:48:51 +0000 |
---|---|---|
committer | Tristan Gingold <gingold@adacore.com> | 2009-11-10 10:48:51 +0000 |
commit | 8a1d23b2abc7fecd3991624276fb76f2b2d1dbfb (patch) | |
tree | d0410ef1e58e96bdcccef7e67f6dc811fb360442 /gdb/avr-tdep.c | |
parent | 8c201e543a54f7bc01841a0cbd7ca19000a34de1 (diff) | |
download | gdb-8a1d23b2abc7fecd3991624276fb76f2b2d1dbfb.zip gdb-8a1d23b2abc7fecd3991624276fb76f2b2d1dbfb.tar.gz gdb-8a1d23b2abc7fecd3991624276fb76f2b2d1dbfb.tar.bz2 |
2009-11-10 Tristan Gingold <gingold@adacore.com>
* avr-tdep.c (avr_integer_to_address): New function.
(avr_gdbarch_init): Set integer_to_address.
Diffstat (limited to 'gdb/avr-tdep.c')
-rw-r--r-- | gdb/avr-tdep.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c index 68244fc..6d6d488 100644 --- a/gdb/avr-tdep.c +++ b/gdb/avr-tdep.c @@ -318,6 +318,15 @@ avr_pointer_to_address (struct gdbarch *gdbarch, } static CORE_ADDR +avr_integer_to_address (struct gdbarch *gdbarch, + struct type *type, const gdb_byte *buf) +{ + ULONGEST addr = unpack_long (type, buf); + + return avr_make_saddr (addr); +} + +static CORE_ADDR avr_read_pc (struct regcache *regcache) { ULONGEST pc; @@ -1353,6 +1362,7 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_address_to_pointer (gdbarch, avr_address_to_pointer); set_gdbarch_pointer_to_address (gdbarch, avr_pointer_to_address); + set_gdbarch_integer_to_address (gdbarch, avr_integer_to_address); set_gdbarch_skip_prologue (gdbarch, avr_skip_prologue); set_gdbarch_inner_than (gdbarch, core_addr_lessthan); |