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]

Re: new maint.exp FAIL w/-fdebug-types-section [Re: [RFA 1/2, doc RFA] maint check-symtabs, maint expand-symtabs]


Jan Kratochvil writes:
 > On Mon, 13 May 2013 22:20:59 +0200, Doug Evans wrote:
 > > +# Test "mt expand-symtabs" here as it's easier to verify before we
 > > +# run the program.
 > > +gdb_test_no_output "mt set per on" "mt set per on for expand-symtabs"
 > > +gdb_test_multiple "mt expand-symtabs $subdir/break\[.\]c$" \
 > > +    "mt expand-symtabs" {
 > > +	-re "#primary symtabs: 1 \\(\[+\]1\\),.*$gdb_prompt $" {
 > > +	    # This should expand exactly one (primary) symtab.
 > > +	    pass "mt expand-symtabs"
 > > +	}
 > > +    }
 > > +gdb_test "mt set per off" ".*" "mt set per off for expand-symtabs"
 > 
 > $ runtest CC_FOR_TARGET="gcc -gdwarf-4 -fdebug-types-section -g0" gdb.base/maint.exp
 > FAIL: gdb.base/maint.exp: mt expand-symtabs
 > 
 > mt expand-symtabs gdb.base/break[.]c$
 > Command execution time: 0.001000 (cpu), 0.000717 (wall)
 > Space used: 4292608 (+0 for this command)
 > #symtabs: 11 (+11), #primary symtabs: 2 (+2), #blocks: 9 (+9)
 > (gdb) FAIL: gdb.base/maint.exp: mt expand-symtabs

Blech.  My normal testing uses .debug_types as a matter of course.

Committed.

2013-05-20  Doug Evans  <dje@google.com>

	* gdb.base/maint.exp: Fix test for "mt expand-symtabs" to account for
	-fdebug-types-section.

diff -u -p -r1.65 maint.exp
--- testsuite/gdb.base/maint.exp	17 May 2013 18:09:06 -0000	1.65
+++ testsuite/gdb.base/maint.exp	20 May 2013 20:19:16 -0000
@@ -89,8 +89,11 @@ gdb_test "maint print registers" "Name.*
 gdb_test_no_output "mt set per on" "mt set per on for expand-symtabs"
 gdb_test_multiple "mt expand-symtabs $subdir/break\[.\]c$" \
     "mt expand-symtabs" {
-	-re "#primary symtabs: 1 \\(\[+\]1\\),.*$gdb_prompt $" {
-	    # This should expand exactly one (primary) symtab.
+	-re "#primary symtabs: (1|2) \\(\[+\](1|2)\\),.*$gdb_prompt $" {
+	    # This should expand one or at most two primary symtabs.
+	    # "Normally" it will expand just the one for break.c, but if the
+	    # file is compiled with -fdebug-types-section then a second primary
+	    # symtab for break.c will be created for any types.
 	    pass "mt expand-symtabs"
 	}
     }


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