* gdb.arch/i386-prologue.exp: Add testcase for standard prolgue.
authorMark Kettenis <kettenis@gnu.org>
Sun, 1 Aug 2004 14:28:51 +0000 (14:28 +0000)
committerMark Kettenis <kettenis@gnu.org>
Sun, 1 Aug 2004 14:28:51 +0000 (14:28 +0000)
* gdb.arch/i386-prologue.c (standard): New prototype and function.
(main): Call new function.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.arch/i386-prologue.c
gdb/testsuite/gdb.arch/i386-prologue.exp

index a011af11c141e7c71892ef9f196120a7329fb878..bd4ca9da164a734921eb1a688449d08f5ffe0b89 100644 (file)
@@ -1,3 +1,9 @@
+2004-08-01  Mark Kettenis  <kettenis@gnu.org>
+
+       * gdb.arch/i386-prologue.exp: Add testcase for standard prolgue.
+       * gdb.arch/i386-prologue.c (standard): New prototype and function.
+       (main): Call new function.
+
 2004-07-31  Michael Chastain  <mec.gnu@mindspring.com>
 
        * gdb.cp/namespace.exp: Accept more varieties of ptype output.
index 5b4e5d83e9b89cdd67d2c450b117effec07525a3..e6846576fde46829f8bf8b13231a13ed17aec371 100644 (file)
@@ -33,6 +33,7 @@ void jump_at_beginning (void);
 int
 main (void)
 {
+  standard ();
   gdb1253 ();
   gdb1718 ();
   gdb1338 ();
@@ -40,6 +41,18 @@ main (void)
   return 0;
 }
 
+/* A normal prologue.  */
+
+asm(".text\n"
+    "    .align 8\n"
+    SYMBOL (standard) ":\n"
+    "    pushl %ebp\n"
+    "    movl  %esp, %ebp\n"
+    "    pushl %edi\n"
+    "    int   $0x03\n"
+    "    leave\n"
+    "    ret\n");
+
 /* Relevant part of the prologue from symtab/1253.  */
 
 asm(".text\n"
index 420773c603708f869687c80f8c59e599a96eb4d5..4c5089848d6a911d204c999945c9f70209592fca 100644 (file)
@@ -61,6 +61,18 @@ if ![runto_main] then {
     gdb_suppress_tests
 }
 
+# Testcase for standard prologue.
+
+gdb_test "continue" "Program received signal SIGTRAP.*" "continue to standard"
+
+gdb_test "backtrace 10" \
+       "#0\[ \t\]*$hex in standard.*\r\n#1\[ \t\]*$hex in main.*" \
+       "backtrace in standard"
+
+gdb_test "info frame" \
+       ".*Saved registers:.*ebp at.*edi at.*eip at.*" \
+       "saved registers in standard"
+
 # Testcase from symtab/1253.
 
 gdb_test "continue" "Program received signal SIGTRAP.*" "continue to gdb1253"
This page took 0.031854 seconds and 4 git commands to generate.