aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.arch
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2004-07-23 22:08:39 +0000
committerMark Kettenis <kettenis@gnu.org>2004-07-23 22:08:39 +0000
commit621046191f444b042bb1bd05bdd12b5dd55911de (patch)
tree068d131f4e986f0de21de8125dfbaf0031c80fd9 /gdb/testsuite/gdb.arch
parent32b05c072b89ff09199bd1ecd2608188ab61364f (diff)
downloadgdb-621046191f444b042bb1bd05bdd12b5dd55911de.zip
gdb-621046191f444b042bb1bd05bdd12b5dd55911de.tar.gz
gdb-621046191f444b042bb1bd05bdd12b5dd55911de.tar.bz2
* gdb.arch/i386-prologue.exp: Add testcase for PR backtrace/1718.
* gdb.arch/i386-prologue.c (gdb1718): New prototype and function. (main): Call new function.
Diffstat (limited to 'gdb/testsuite/gdb.arch')
-rw-r--r--gdb/testsuite/gdb.arch/i386-prologue.c17
-rw-r--r--gdb/testsuite/gdb.arch/i386-prologue.exp14
2 files changed, 31 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.arch/i386-prologue.c b/gdb/testsuite/gdb.arch/i386-prologue.c
index 15ed2ca..5b4e5d8 100644
--- a/gdb/testsuite/gdb.arch/i386-prologue.c
+++ b/gdb/testsuite/gdb.arch/i386-prologue.c
@@ -26,6 +26,7 @@
#endif
void gdb1253 (void);
+void gdb1718 (void);
void gdb1338 (void);
void jump_at_beginning (void);
@@ -33,6 +34,7 @@ int
main (void)
{
gdb1253 ();
+ gdb1718 ();
gdb1338 ();
jump_at_beginning ();
return 0;
@@ -51,6 +53,21 @@ asm(".text\n"
" leave\n"
" ret\n");
+/* Relevant part of the prologue from backtrace/1718. */
+
+asm(".text\n"
+ " .align 8\n"
+ SYMBOL (gdb1718) ":\n"
+ " pushl %ebp\n"
+ " movl $0x11111111, %eax\n"
+ " movl %esp, %ebp\n"
+ " pushl %esi\n"
+ " movl $0x22222222, %esi\n"
+ " pushl %ebx\n"
+ " int $0x03\n"
+ " leave\n"
+ " ret\n");
+
/* Relevant part of the prologue from backtrace/1338. */
asm(".text\n"
diff --git a/gdb/testsuite/gdb.arch/i386-prologue.exp b/gdb/testsuite/gdb.arch/i386-prologue.exp
index 1258e44..243c15f 100644
--- a/gdb/testsuite/gdb.arch/i386-prologue.exp
+++ b/gdb/testsuite/gdb.arch/i386-prologue.exp
@@ -73,6 +73,20 @@ gdb_test "info frame" \
".*Saved registers:.*ebp at.*edi at.*eip at.*" \
"saved registers in gdb1253"
+# Testcase from backtrace/1718.
+
+gdb_test "continue" "Program received signal SIGTRAP.*" "continue to gdb1718"
+
+setup_kfail *-*-* gdb/1718
+gdb_test "backtrace 10" \
+ "#0\[ \t\]*$hex in gdb1718.*\r\n#1\[ \t\]*$hex in main.*" \
+ "backtrace in gdb1718"
+
+setup_kfail *-*-* gdb/1718
+gdb_test "info frame" \
+ ".*Saved registers:.*esi at.*ebx at.*eip at.*" \
+ "saved registers in gdb1718"
+
# Testcase from backtrace/1338.
gdb_test "continue" "Program received signal SIGTRAP.*" "continue to gdb1338"