[PATCH]: Don't assume source file in break.exp when optimizing

David S. Miller davem@davemloft.net
Wed Apr 5 05:17:00 GMT 2006


As discussed in:

Subject: Unreasonable expectation in gdb.base/break.exp

on gdb@sources.redhat.com, you cannot assume that a breakpoint
on main will be actually in $srcfile when optimizing.

In one case, it's actually in stdlib.h in some inline function
implementing one of the calls in main() in the testcase.

Ok to apply?

2006-04-04  David S. Miller  <davem@sunset.davemloft.net>

	* gdb.base/break.exp: Do not assume a breakpoint on
	main will actually be in $srcfile when optimizing.

--- gdb.base/break.exp.~1~	2006-04-01 16:55:19.000000000 -0800
+++ gdb.base/break.exp	2006-04-04 22:11:55.000000000 -0700
@@ -887,7 +887,7 @@
 # test break at function
 #
 gdb_test "break main" \
-    "Breakpoint.*at.* file .*$srcfile, line.*" \
+    "Breakpoint.*at.* file .*, line.*" \
     "breakpoint function, optimized file"
 
 #



More information about the Gdb-patches mailing list