Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA]: Fix testsuite/gdb.base/break.exp when test compiled with -DPROTOTYPES
@ 2003-02-24 21:19 Stephane Carrez
  2003-02-24 21:34 ` Elena Zannoni
  2003-04-04 20:09 ` Stephane Carrez
  0 siblings, 2 replies; 10+ messages in thread
From: Stephane Carrez @ 2003-02-24 21:19 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 502 bytes --]

Hi!

In the gdb.base/break.c test, the function marker4() is defined at line 46 when
the test is compiled with -DPROTOTYPES and at line 51 otherwise.  The break.exp
test only check for line 51.

This patch adds the missing regexp for marker4 at line 46.
(tested with make check for m6811-elf; break.exp passes completely)

Can you approve it?

Thanks,
	Stephane

2003-02-24  Stephane Carrez  <stcarrez@nerim.fr>

	* gdb.base/break.exp: marker4() is defined at line 46 when compiled
	with -DPROTOTYPES.

[-- Attachment #2: break.exp.diffs --]
[-- Type: text/plain, Size: 1169 bytes --]

Index: gdb.base/break.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/break.exp,v
retrieving revision 1.14
diff -u -p -r1.14 break.exp
--- gdb.base/break.exp	16 Jan 2003 01:56:15 -0000	1.14
+++ gdb.base/break.exp	24 Feb 2003 21:13:24 -0000
@@ -907,11 +907,16 @@ if ![target_info exists use_gdb_stub] {
 # as if it were in the middle of a line rather than at the beginning.
 
 send_gdb "continue\n"
+# marker4() is defined at line 46 when compiled with -DPROTOTYPES
+# and at line 51 otherwise.
 gdb_expect {
     -re "Breakpoint $decimal, marker4 \\(d=177601976\\) at .*$srcfile:51\[\r\n\]+51\[\t \]+void marker4.*" {
 	pass "run until breakpoint set at small function, optimized file"
     }
     -re "Breakpoint $decimal, $hex in marker4 \\(d=177601976\\) at .*$srcfile:51\[\r\n\]+51\[\t \]+void marker4.*" {
+	pass "run until breakpoint set at small function, optimized file"
+    }
+    -re "Breakpoint $decimal, marker4 \\(d=177601976\\) at .*$srcfile:46\[\r\n\]+46\[\t \]+void marker4.*" {
 	pass "run until breakpoint set at small function, optimized file"
     }
     -re ".*$gdb_prompt " {

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: [RFA]: Fix testsuite/gdb.base/break.exp when test compiled with -DPROTOTYPES
@ 2003-04-04 20:41 Michael Elizabeth Chastain
  2003-04-04 21:31 ` Stephane Carrez
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Elizabeth Chastain @ 2003-04-04 20:41 UTC (permalink / raw)
  To: stcarrez; +Cc: gdb-patches

I could be wrong, but I don't think you can put comments in the
middle of a gdb_expect block like this.

  +    # marker4() is defined at line 46 when compiled with -DPROTOTYPES
  +    -re "Breakpoint $decimal, marker4 \\(d=177601976\\) at .*$srcfile:46\[\r\n\]+46\[\t \]+void marker4.*" {
  +	pass "run until breakpoint set at small function, optimized file"
  +    }

I think you have to do this:

  -re "Breakpoint ... void marker.*" {
    # marker4() is defined at line 46 when compiled with -DPROTOTYPES
    pass "run until breakpoint set at small function, optimized file"
  }

Michael C


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

end of thread, other threads:[~2003-04-05 13:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-24 21:19 [RFA]: Fix testsuite/gdb.base/break.exp when test compiled with -DPROTOTYPES Stephane Carrez
2003-02-24 21:34 ` Elena Zannoni
2003-02-24 21:46   ` Stephane Carrez
2003-02-24 23:34     ` Jason Molenda
2003-04-04 20:09 ` Stephane Carrez
2003-04-04 20:41 Michael Elizabeth Chastain
2003-04-04 21:31 ` Stephane Carrez
2003-04-04 22:29   ` Daniel Jacobowitz
2003-04-05 10:46     ` Stephane Carrez
2003-04-05 13:20       ` Andrew Cagney

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