aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPierre Langlois <pierre.langlois@embecosm.com>2014-04-04 18:31:36 +0100
committerPierre Langlois <pierre.langlois@embecosm.com>2014-04-08 18:04:25 +0100
commit9c97a0704e03c662b6afd92032c171fe6714b42d (patch)
tree47c5b5d9d5e6bc04210933cbc79321ca04f0dbf2 /gdb
parent6c1799adabb2391ac088828501135cd0dd11b2da (diff)
downloadgdb-9c97a0704e03c662b6afd92032c171fe6714b42d.zip
gdb-9c97a0704e03c662b6afd92032c171fe6714b42d.tar.gz
gdb-9c97a0704e03c662b6afd92032c171fe6714b42d.tar.bz2
Fix erroneous backtrace on avrxmega architectures.
* avr-tdep.c (struct gdbarch_tdep): Mention avrxmega in the comment. (avr_gdbarch_init): Add xmega architectures given by bfd_architecture when setting the size of call_length.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/avr-tdep.c9
2 files changed, 14 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e2962c9..889b574 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2014-04-08 Pierre Langlois <pierre.langlois@embecosm.com>
+
+ * avr-tdep.c (struct gdbarch_tdep): Mention avrxmega in the comment.
+ (avr_gdbarch_init): Add xmega architectures given by bfd_architecture
+ when setting the size of call_length.
+
2014-04-07 Siva Chandra Reddy <sivachandra@google.com>
* python/py-value.c (valpy_get_dynamic_type): Use coerce_ref to
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index 7fb16d1..9b0bfaf 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -180,7 +180,7 @@ struct avr_unwind_cache
struct gdbarch_tdep
{
/* Number of bytes stored to the stack by call instructions.
- 2 bytes for avr1-5, 3 bytes for avr6. */
+ 2 bytes for avr1-5 and avrxmega1-5, 3 bytes for avr6 and avrxmega6-7. */
int call_length;
/* Type for void. */
@@ -1356,14 +1356,21 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
switch (info.bfd_arch_info->mach)
{
case bfd_mach_avr1:
+ case bfd_mach_avrxmega1:
case bfd_mach_avr2:
+ case bfd_mach_avrxmega2:
case bfd_mach_avr3:
+ case bfd_mach_avrxmega3:
case bfd_mach_avr4:
+ case bfd_mach_avrxmega4:
case bfd_mach_avr5:
+ case bfd_mach_avrxmega5:
default:
call_length = 2;
break;
case bfd_mach_avr6:
+ case bfd_mach_avrxmega6:
+ case bfd_mach_avrxmega7:
call_length = 3;
break;
}