From: Mark Kettenis Date: Sun, 17 Aug 2003 23:18:31 +0000 (+0000) Subject: * gdb.arch/i386-prologue.exp: Add testcase for PR backtrace/1338. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c945b932a44c97019e76ca76b5444f3207ee13de;p=binutils-gdb.git * gdb.arch/i386-prologue.exp: Add testcase for PR backtrace/1338. * gdb.arch/i386-prologue.c (gdb1338): Add function. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 93f0de10cc3..865793576ac 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2003-08-18 Mark Kettenis + + * gdb.arch/i386-prologue.exp: Add testcase for PR backtrace/1338. + * gdb.arch/i386-prologue.c (gdb1338): Add function. + 2003-08-17 Daniel Jacobowitz * 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 2bc362737d6..4c92a9c83e5 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 48cd1bbed03..68a3125632c 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"