]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Erroneous backtrace on AVR.
authorPierre Langlois <pierre.langlois@embecosm.com>
Fri, 21 Mar 2014 19:46:07 +0000 (19:46 +0000)
committerPierre Langlois <pierre.langlois@embecosm.com>
Fri, 11 Apr 2014 09:31:26 +0000 (10:31 +0100)
PR backtrace/16721
PR backtrace/16832
* 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.
(avr_scan_prologue): Accept push r1 instruction for small stack
allocation.
* MAINTAINERS (Write After Approval): Add "Pierre Langlois".

gdb/ChangeLog
gdb/MAINTAINERS
gdb/avr-tdep.c

index 30c7d99aa5a8b9ede169dbb7eb029a726b425087..bb1e848f8b44c6ba80461afa8d8086e5fd9e2fed 100644 (file)
@@ -1,3 +1,14 @@
+2014-04-11  Pierre Langlois  <pierre.langlois@embecosm.com>
+
+       PR backtrace/16721
+       PR backtrace/16832
+       * 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.
+       (avr_scan_prologue): Accept push r1 instruction for small stack
+       allocation.
+       * MAINTAINERS (Write After Approval): Add "Pierre Langlois".
+
 2014-03-05  Pedro Alves  <palves@redhat.com>
 
        PR gdb/16575
index ffd310b53842aa6609f6379c6c991da531953e00..c0297c12955abd3b65c0ecfaf91afb1d9c640217 100644 (file)
@@ -546,6 +546,7 @@ Jim Kingdon                                 kingdon@panix.com
 Paul Koning                                    paul_koning@dell.com
 Jan Kratochvil                                 jan.kratochvil@redhat.com
 Maxim Kuvyrkov                                 maxim@kugelworks.com
+Pierre Langlois                                pierre.langlois@embecosm.com
 Jonathan Larmour                               jifl@ecoscentric.com
 Jeff Law                                       law@redhat.com
 Justin Lebar                                   justin.lebar@gmail.com
index cb330ea54f7a04b9ffc06b0e79ddbabbec12f003..1be9e7d3415f5c1bd4505070b4c923656210d979 100644 (file)
@@ -179,7 +179,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.  */
@@ -719,7 +719,7 @@ avr_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR pc_beg, CORE_ADDR pc_end,
           info->size += gdbarch_tdep (gdbarch)->call_length;
           vpc += 2;
         }
-      else if (insn == 0x920f)  /* push r0 */
+      else if (insn == 0x920f || insn == 0x921f)  /* push r0 or push r1 */
         {
           info->size += 1;
           vpc += 2;
@@ -1355,14 +1355,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;
     }