This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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"
 
 #


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]