aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2004-08-01 14:28:51 +0000
committerMark Kettenis <kettenis@gnu.org>2004-08-01 14:28:51 +0000
commitb6702b23360ddb41470fd527a6e2ef6ad457f6be (patch)
treedd755f3e48064b92547202c8eaa1b0bc97d4943a /gdb
parentc203e0ca367bb25bb0d3a3bd64aea495bebc3d7a (diff)
downloadgdb-b6702b23360ddb41470fd527a6e2ef6ad457f6be.zip
gdb-b6702b23360ddb41470fd527a6e2ef6ad457f6be.tar.gz
gdb-b6702b23360ddb41470fd527a6e2ef6ad457f6be.tar.bz2
* gdb.arch/i386-prologue.exp: Add testcase for standard prolgue.
* gdb.arch/i386-prologue.c (standard): New prototype and function. (main): Call new function.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.arch/i386-prologue.c13
-rw-r--r--gdb/testsuite/gdb.arch/i386-prologue.exp12
3 files changed, 31 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index a011af1..bd4ca9d 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -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.
diff --git a/gdb/testsuite/gdb.arch/i386-prologue.c b/gdb/testsuite/gdb.arch/i386-prologue.c
index 5b4e5d8..e684657 100644
--- a/gdb/testsuite/gdb.arch/i386-prologue.c
+++ b/gdb/testsuite/gdb.arch/i386-prologue.c
@@ -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"
diff --git a/gdb/testsuite/gdb.arch/i386-prologue.exp b/gdb/testsuite/gdb.arch/i386-prologue.exp
index 420773c..4c50898 100644
--- a/gdb/testsuite/gdb.arch/i386-prologue.exp
+++ b/gdb/testsuite/gdb.arch/i386-prologue.exp
@@ -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"