* Re: [PATCH] gdb.c++/method.exp: xfail for missing const
@ 2002-04-08 12:28 Michael Elizabeth Chastain
2002-04-08 14:07 ` Daniel Jacobowitz
0 siblings, 1 reply; 5+ messages in thread
From: Michael Elizabeth Chastain @ 2002-04-08 12:28 UTC (permalink / raw)
To: drow; +Cc: gdb-patches
Daniel Jacobowitz writes:
> [I'll accept this. It could be an XPASS/KPASS if something really
> bizarre happened and we started ADDING consts. But that'd be
> caught elsewhere, so let's not worry about it.]
I don't follow you. Do you mean "print this" in a non-const method that
replies "const A *" or "const A * const"? That's already a straight FAIL.
> I would prefer:
> "XFAIL if stabs debugging format and GCC and GCC version < 3.1"
> so that we go to FAIL instead of XFAIL if the stabs const code stops
> working in either GCC or GDB.
I would like that too. But how can the test script determine the gcc
version? I don't see a way to do this in gdb/lib.exp.
BTW I'll add a section for "const class {...} *" specifically so that
we can kfail it eventually.
Michael C
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] gdb.c++/method.exp: xfail for missing const
2002-04-08 12:28 [PATCH] gdb.c++/method.exp: xfail for missing const Michael Elizabeth Chastain
@ 2002-04-08 14:07 ` Daniel Jacobowitz
0 siblings, 0 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2002-04-08 14:07 UTC (permalink / raw)
To: Michael Elizabeth Chastain; +Cc: gdb-patches
On Mon, Apr 08, 2002 at 02:28:09PM -0500, Michael Elizabeth Chastain wrote:
> Daniel Jacobowitz writes:
> > [I'll accept this. It could be an XPASS/KPASS if something really
> > bizarre happened and we started ADDING consts. But that'd be
> > caught elsewhere, so let's not worry about it.]
>
> I don't follow you. Do you mean "print this" in a non-const method that
> replies "const A *" or "const A * const"? That's already a straight FAIL.
What I meant is that, in the hypothetical situation where we
const-qualified things accidentally, if we were using GCC 2.95/stabs (a
combination which "we, the testsuite" know can not say "const"!)
printing out const would be quite surprising.
This is completely unimportant, of course.
> > I would prefer:
> > "XFAIL if stabs debugging format and GCC and GCC version < 3.1"
> > so that we go to FAIL instead of XFAIL if the stabs const code stops
> > working in either GCC or GDB.
>
> I would like that too. But how can the test script determine the gcc
> version? I don't see a way to do this in gdb/lib.exp.
It's not there. I can add it trivially, if you want. The major
version is there already; it's [ $gcc_compiled > 2 ]. We could just
set gcc_compiler_minor if necessary. They're __GNUC__ and
__GNUC_MINOR__.
> BTW I'll add a section for "const class {...} *" specifically so that
> we can kfail it eventually.
Thanks.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] gdb.c++/method.exp: xfail for missing const
@ 2002-04-08 15:24 Michael Elizabeth Chastain
0 siblings, 0 replies; 5+ messages in thread
From: Michael Elizabeth Chastain @ 2002-04-08 15:24 UTC (permalink / raw)
To: drow; +Cc: gdb-patches
Daniel Jacobowitz writes:
danj> What I meant is that, in the hypothetical situation where we
danj> const-qualified things accidentally, if we were using GCC 2.95/stabs (a
danj> combination which "we, the testsuite" know can not say "const"!)
danj> printing out const would be quite surprising.
Well, there are so few XPASS's, that I am definitely adding XPASS
to my attention reports. I'm also adding XFAIL's. In fact everything
except a PASS is now in the attention report.
The difference reports already pick up any XFAIL -> XPASS transitions.
mec> I would like that too. But how can the test script determine the gcc
mec> version? I don't see a way to do this in gdb/lib.exp.
danj> It's not there. I can add it trivially, if you want. The major
danj> version is there already; it's [ $gcc_compiled > 2 ]. We could just
danj> set gcc_compiler_minor if necessary. They're __GNUC__ and
danj> __GNUC_MINOR__.
At this point I want to get the darn thing finished so that I can
spend some time on local.exp and templates.exp, which are also very
gnarly and have a lot of bit rot. So since the feature is not there,
I'm going to go ahead with 'setup_xfail_format "stabs"' and not worry
about this.
It would still be useful to import the gcc version number into the
dejagnu context, because we are going to have this "const" issue for
another 2-3 years.
Michael C
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] gdb.c++/method.exp: xfail for missing const
@ 2002-04-08 11:32 Michael Elizabeth Chastain
2002-04-08 11:46 ` Daniel Jacobowitz
0 siblings, 1 reply; 5+ messages in thread
From: Michael Elizabeth Chastain @ 2002-04-08 11:32 UTC (permalink / raw)
To: drow; +Cc: gdb-patches
How about this for printing "this" in a const method?
It reports PASS if the required "const" is present.
It reports (XFAIL|FAIL) with "missing const" if required "const" is missing.
XFAIL if stabs debugging format
FAIL if any other debugging format
It reports FAIL for any other output.
Michael C
===
# Check access to this pointer
#
# gcc versions up to 3.0.4 with -gstabs+ do not emit "const" indicators,
# so the output is "A *". It should be "const A *" or "const A * const".
get_debug_format
send_gdb "print this\n"
gdb_expect {
-re "\\$\[0-9\]* = \\(const (class |)A *\\* *(const|)\\) $hex\r\n$gdb_prompt $" {
pass "print this in A::bar"
}
-re "\\$\[0-9\]* = \\((class |)A *\\* *(const|)\\) $hex\r\n$gdb_prompt $" {
setup_xfail_format "stabs"
fail "print this in A::bar (missing const)"
}
-re ".*$gdb_prompt $" { fail "print this in A::bar" }
timeout { fail "(timeout) print this in A::bar" }
}
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] gdb.c++/method.exp: xfail for missing const
2002-04-08 11:32 Michael Elizabeth Chastain
@ 2002-04-08 11:46 ` Daniel Jacobowitz
0 siblings, 0 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2002-04-08 11:46 UTC (permalink / raw)
To: Michael Elizabeth Chastain; +Cc: gdb-patches
On Mon, Apr 08, 2002 at 01:32:15PM -0500, Michael Elizabeth Chastain wrote:
> How about this for printing "this" in a const method?
>
> It reports PASS if the required "const" is present.
> It reports (XFAIL|FAIL) with "missing const" if required "const" is missing.
> XFAIL if stabs debugging format
> FAIL if any other debugging format
> It reports FAIL for any other output.
I would rather do it based on compiler version:
> It reports PASS if the required "const" is present.
[I'll accept this. It could be an XPASS/KPASS if something really
bizarre happened and we started ADDING consts. But that'd be
caught elsewhere, so let's not worry about it.]
> It reports (XFAIL|FAIL) with "missing const" if required "const" is missing.
> XFAIL if stabs debugging format
I would prefer:
"XFAIL if stabs debugging format and GCC and GCC version < 3.1"
so that we go to FAIL instead of XFAIL if the stabs const code stops
working in either GCC or GDB.
> FAIL if any other debugging format
> It reports FAIL for any other output.
Great otherwise.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-04-08 22:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-08 12:28 [PATCH] gdb.c++/method.exp: xfail for missing const Michael Elizabeth Chastain
2002-04-08 14:07 ` Daniel Jacobowitz
-- strict thread matches above, loose matches on Subject: below --
2002-04-08 15:24 Michael Elizabeth Chastain
2002-04-08 11:32 Michael Elizabeth Chastain
2002-04-08 11:46 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox