This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: new maint.exp FAIL w/-fdebug-types-section [Re: [RFA 1/2, doc RFA] maint check-symtabs, maint expand-symtabs]
- From: Doug Evans <dje at google dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 20 May 2013 13:27:10 -0700
- Subject: Re: new maint.exp FAIL w/-fdebug-types-section [Re: [RFA 1/2, doc RFA] maint check-symtabs, maint expand-symtabs]
- References: <yjt2k3n2d42c dot fsf at ruffy2 dot mtv dot corp dot google dot com> <20130519112343 dot GA1260 at host2 dot jankratochvil dot net>
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"
}
}