This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA] arm_skip_prologue: Recognize "sub sp, sp, #nn"



GCC sometimes follows the "sub fp, ip, #nn" instruction with a
"sub sp, sp, #nn".

2002-04-22  Michael Snyder  <msnyder@redhat.com>

	* arm-tdep.c (arm_skip_prologue): Recognize "sub sp, sp, #nn".

Index: arm-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-tdep.c,v
retrieving revision 1.48
diff -p -r1.48 arm-tdep.c
*** arm-tdep.c	19 Feb 2002 19:20:31 -0000	1.48
--- arm-tdep.c	22 Apr 2002 23:07:12 -0000
*************** arm_skip_prologue (CORE_ADDR pc)
*** 477,482 ****
--- 477,488 ----
      }
  
    if ((inst & 0xfffff000) == 0xe24cb000)	/* sub fp, ip, #nn */
+     {
+       skip_pc += 4;
+       inst = read_memory_integer (skip_pc, 4);
+     }
+ 
+   if ((inst & 0xfffff000) == 0xe24dd000)                /* sub sp, sp, #nn */
      skip_pc += 4;
  
    return skip_pc;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]