Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Add test for PR backtrace/1718
@ 2004-07-23 13:08 Mark Kettenis
  2004-07-23 20:06 ` mec.gnu
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Kettenis @ 2004-07-23 13:08 UTC (permalink / raw)
  To: mec.gnu; +Cc: gdb-patches

This is a testcase for PR backtrace/1718.  It's kfailed for now, since
I haven't fixed the bug yet.  Tested on i386-unknown-freebsd4.7.

OK Michael?

Mark


Index: testsuite/ChangeLog
from  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.

Index: testsuite/gdb.arch/i386-prologue.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.arch/i386-prologue.c,v
retrieving revision 1.4
diff -u -p -r1.4 i386-prologue.c
--- testsuite/gdb.arch/i386-prologue.c 29 Jun 2004 17:52:49 -0000 1.4
+++ testsuite/gdb.arch/i386-prologue.c 23 Jul 2004 13:05:55 -0000
@@ -26,6 +26,7 @@
 #endif
 
 void gdb1253 (void);
+void gdb1718 (void);
 void gdb1338 (void);
 void jump_at_beginning (void);
 
@@ -33,6 +34,7 @@ int
 main (void)
 {
   gdb1253 ();
+  gdb1718 ();
   gdb1338 ();
   jump_at_beginning ();
   return 0;
@@ -51,6 +53,21 @@ asm(".text\n"
     "    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"
Index: testsuite/gdb.arch/i386-prologue.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.arch/i386-prologue.exp,v
retrieving revision 1.5
diff -u -p -r1.5 i386-prologue.exp
--- testsuite/gdb.arch/i386-prologue.exp 29 Jun 2004 17:52:49 -0000 1.5
+++ testsuite/gdb.arch/i386-prologue.exp 23 Jul 2004 13:05:55 -0000
@@ -73,6 +73,20 @@ gdb_test "info frame" \
 	".*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"


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Add test for PR backtrace/1718
  2004-07-23 13:08 [PATCH] Add test for PR backtrace/1718 Mark Kettenis
@ 2004-07-23 20:06 ` mec.gnu
  2004-07-24  7:58   ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: mec.gnu @ 2004-07-23 20:06 UTC (permalink / raw)
  To: kettenis; +Cc: gdb-patches

This patch is approved.  Beautiful.

As soon as I saw:

  pushl %ebp
  movl $0x11111111, %eax
  movl %esp, %ebp

... I knew that Mark would nail it!

===

	* 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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Add test for PR backtrace/1718
  2004-07-23 20:06 ` mec.gnu
@ 2004-07-24  7:58   ` Eli Zaretskii
  0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2004-07-24  7:58 UTC (permalink / raw)
  To: mec.gnu; +Cc: kettenis, gdb-patches

> Date: Fri, 23 Jul 2004 16:06:51 -0400
> From: mec.gnu@mindspring.com
> 
> As soon as I saw:
> 
>   pushl %ebp
>   movl $0x11111111, %eax
>   movl %esp, %ebp
> 
> ... I knew that Mark would nail it!

Bother: are you saying that Mark posted a patch to fix the problem?
Because if he did, I somehow missed that.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-07-24  7:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-23 13:08 [PATCH] Add test for PR backtrace/1718 Mark Kettenis
2004-07-23 20:06 ` mec.gnu
2004-07-24  7:58   ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox