diff options
author | Mark Kettenis <kettenis@gnu.org> | 2003-08-17 23:18:31 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2003-08-17 23:18:31 +0000 |
commit | c945b932a44c97019e76ca76b5444f3207ee13de (patch) | |
tree | d89cbd65f2f8c67d27bdf550fdcde1d6a7f8e0a5 | |
parent | 99ab4326f1095f50d2991b6f633337e7d92e1134 (diff) | |
download | gdb-c945b932a44c97019e76ca76b5444f3207ee13de.zip gdb-c945b932a44c97019e76ca76b5444f3207ee13de.tar.gz gdb-c945b932a44c97019e76ca76b5444f3207ee13de.tar.bz2 |
* gdb.arch/i386-prologue.exp: Add testcase for PR backtrace/1338.
* gdb.arch/i386-prologue.c (gdb1338): Add function.
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/i386-prologue.c | 18 | ||||
-rw-r--r-- | gdb/testsuite/gdb.arch/i386-prologue.exp | 10 |
3 files changed, 31 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 93f0de1..8657935 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -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 diff --git a/gdb/testsuite/gdb.arch/i386-prologue.c b/gdb/testsuite/gdb.arch/i386-prologue.c index 2bc3627..4c92a9c 100644 --- a/gdb/testsuite/gdb.arch/i386-prologue.c +++ b/gdb/testsuite/gdb.arch/i386-prologue.c @@ -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"); diff --git a/gdb/testsuite/gdb.arch/i386-prologue.exp b/gdb/testsuite/gdb.arch/i386-prologue.exp index 48cd1bb..68a3125 100644 --- a/gdb/testsuite/gdb.arch/i386-prologue.exp +++ b/gdb/testsuite/gdb.arch/i386-prologue.exp @@ -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" |