From: Tristan Gingold Date: Tue, 10 Nov 2009 09:49:52 +0000 (+0000) Subject: 2009-11-10 Tristan Gingold X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=53f6a2c9fa05574449d01931ed87a7619810dced;p=binutils-gdb.git 2009-11-10 Tristan Gingold * avr-tdep.c (avr_dwarf_reg_to_regnum): New function. (avr_gdbarch_init): Call set_gdbarch_dwarf2_reg_to_regnum. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b7e7fc58ddc..f532d4bca82 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2009-11-10 Tristan Gingold + + * avr-tdep.c (avr_dwarf_reg_to_regnum): New function. + (avr_gdbarch_init): Call set_gdbarch_dwarf2_reg_to_regnum. + 2009-11-09 Sebastien Granjoux PR mi/9583: @@ -266,6 +271,11 @@ * target.c (dummy_find_memory_regions): Change output. (dummy_make_corefile_notes): Ditto. +2009-10-26 Tristan Gingold + + * charset.c (_initialize_charset): Set a default value to + auto_host_charset_name if empty. + 2009-10-26 Tristan Gingold * avr-tdep.c (avr_push_dummy_call): Handle avr6 architecture. diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c index 6340c21783f..6d04e56684c 100644 --- a/gdb/avr-tdep.c +++ b/gdb/avr-tdep.c @@ -1263,6 +1263,21 @@ avr_push_dummy_call (struct gdbarch *gdbarch, struct value *function, return sp + call_length; } +/* Unfortunately dwarf2 register for SP is 32. */ + +static int +avr_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg) +{ + if (reg >= 0 && reg < 32) + return reg; + if (reg == 32) + return AVR_SP_REGNUM; + + warning (_("Unmapped DWARF Register #%d encountered."), reg); + + return -1; +} + /* Initialize the gdbarch structure for the AVR's. */ static struct gdbarch * @@ -1335,6 +1350,8 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_push_dummy_call (gdbarch, avr_push_dummy_call); + set_gdbarch_dwarf2_reg_to_regnum (gdbarch, avr_dwarf_reg_to_regnum); + set_gdbarch_address_to_pointer (gdbarch, avr_address_to_pointer); set_gdbarch_pointer_to_address (gdbarch, avr_pointer_to_address);