+2004-07-23 Mark Kettenis <kettenis@gnu.org>
+
+ * 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.
+
2004-07-22 Michael Chastain <mec.gnu@mindspring.com>
Test for PR exp/1715.
#endif
void gdb1253 (void);
+void gdb1718 (void);
void gdb1338 (void);
void jump_at_beginning (void);
main (void)
{
gdb1253 ();
+ gdb1718 ();
gdb1338 ();
jump_at_beginning ();
return 0;
" 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"
".*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"