[PATCH] Add testcase for PR backtrace/1338.
Mark Kettenis
kettenis@chello.nl
Sun Aug 17 23:18:00 GMT 2003
Here's the testcase I promised.
Checked in.
Index: testsuite/ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* gdb.arch/i386-prologue.exp: Add testcase for PR backtrace/1338.
* gdb.arch/i386-prologue.c (gdb1338): Add function.
Index: testsuite/gdb.arch/i386-prologue.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.arch/i386-prologue.c,v
retrieving revision 1.1
diff -u -p -r1.1 i386-prologue.c
--- testsuite/gdb.arch/i386-prologue.c 10 Aug 2003 11:55:58 -0000 1.1
+++ testsuite/gdb.arch/i386-prologue.c 17 Aug 2003 23:17:36 -0000
@@ -1,13 +1,15 @@
void gdb1253 (void);
+void gdb1338 (void);
int
main (void)
{
gdb1253 ();
+ gdb1338 ();
return 0;
}
-/* Relevant part of the prologue from gdb/1253. */
+/* Relevant part of the prologue from symtab/1253. */
asm(".text\n"
" .align 8\n"
@@ -18,4 +20,18 @@ asm(".text\n"
" pushl %edi\n"
" int $0x03\n"
" leave\n"
+ " ret\n");
+
+/* Relevant part of the prologue from backtrace/1338. */
+
+asm(".text\n"
+ " .align 8\n"
+ "gdb1338:\n"
+ " pushl %edi\n"
+ " pushl %esi\n"
+ " pushl %ebx\n"
+ " int $0x03\n"
+ " popl %ebx\n"
+ " popl %esi\n"
+ " popl %edi\n"
" ret\n");
Index: testsuite/gdb.arch/i386-prologue.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.arch/i386-prologue.exp,v
retrieving revision 1.1
diff -u -p -r1.1 i386-prologue.exp
--- testsuite/gdb.arch/i386-prologue.exp 10 Aug 2003 11:55:58 -0000 1.1
+++ testsuite/gdb.arch/i386-prologue.exp 17 Aug 2003 23:17:36 -0000
@@ -53,10 +53,18 @@ if ![runto_main] then {
gdb_suppress_tests
}
-# Testcase from gdb/1253.
+# Testcase from symtab/1253.
gdb_test "continue" "Program received signal SIGTRAP.*" "continue to gdb1253"
gdb_test "backtrace 10" \
"#0\[ \t\]*$hex in gdb1253.*\r\n#1\[ \t\]*$hex in main.*" \
"backtrace in gdb1253"
+
+# Testcase from backtrace/1338.
+
+gdb_test "continue" "Program received signal SIGTRAP.*" "continue to gdb1338"
+
+gdb_test "backtrace 10" \
+ "#0\[ \t\]*$hex in gdb1338.*\r\n#1\[ \t\]*$hex in main.*" \
+ "backtrace in gdb1338"
More information about the Gdb-patches
mailing list