* gdb.arch/i386-prologue.exp: Add testcase for PR backtrace/1338.

* gdb.arch/i386-prologue.c (gdb1338): Add function.
This commit is contained in:
Mark Kettenis 2003-08-17 23:18:31 +00:00
parent 99ab4326f1
commit c945b932a4
3 changed files with 31 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2003-08-18 Mark Kettenis <kettenis@gnu.org>
* gdb.arch/i386-prologue.exp: Add testcase for PR backtrace/1338.
* gdb.arch/i386-prologue.c (gdb1338): Add function.
2003-08-17 Daniel Jacobowitz <drow@mvista.com>
* mi-var-display.exp (-var-list-children weird): Accept function

View File

@ -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"
@ -19,3 +21,17 @@ asm(".text\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");

View File

@ -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"