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]

Improvement to i386_analyze_frame_setup


This patch improves the i386 frame setup analyzer by recognizing one more
case that GCC might generate.

Andreas.

2003-10-06  Andreas Schwab  <schwab@suse.de>

	* i386-tdep.c (i386_analyze_frame_setup): Also handle xorl/subl
	with %eax.

--- gdb/i386-tdep.c.~1.170.~	2003-10-06 10:19:03.000000000 +0200
+++ gdb/i386-tdep.c	2003-10-06 23:21:29.000000000 +0200
@@ -499,12 +499,14 @@ i386_analyze_frame_setup (CORE_ADDR pc, 
 	    xorl %ebx, %ebx
 	    xorl %ecx, %ecx
 	    xorl %edx, %edx
+	    xorl %eax, %eax
 
 	 and the equivalent
 
 	    subl %ebx, %ebx
 	    subl %ecx, %ecx
 	    subl %edx, %edx
+	    subl %eax, %eax
 
 	 Make sure we only skip these instructions if we later see the
 	 `movl %esp, %ebp' that actually sets up the frame.  */
@@ -516,6 +518,7 @@ i386_analyze_frame_setup (CORE_ADDR pc, 
 	    case 0xdb:	/* %ebx */
 	    case 0xc9:	/* %ecx */
 	    case 0xd2:	/* %edx */
+	    case 0xc0:	/* %eax */
 	      skip += 2;
 	      break;
 	    default:

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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