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: PATCH: error reading variable: value has been optimized out


On 14/09/2012 8:02 PM, Tom Tromey wrote:
"Andrew" == Andrew Burgess <aburgess@broadcom.com> writes:

Tom> If it is just a theoretical problem I think we can just declare it Tom> unsupported; and, if we do see it, try reporting it as a compiler bug Tom> first. After all, the compiler could just emit an empty piece instead.

Andrew> I'm happy to mark these tests as unsupported.  As the tests (#2
Andrew> -> #4) are pretty much zero cost given that I'm adding test #1
Andrew> anyway I'd like to leave them in.  I've created a new patch, the
Andrew> only change is that test #3 and #4 now report unsupported (with
Andrew> comment), and test #2 reports pass, with a comment to explain
Andrew> the reasoning.

Andrew> +	# If we ever fix gdb so this passes we should delete the
Andrew> +	# unsupported case below.
Andrew> +	xpass $test

Andrew> + unsupported $test

I think these tests should 'pass' if they generate the correct output,
and 'kfail' otherwise.

But if they kfail then they need a defect ID, it seems rather pointless to raise a defect for unsupported behaviour we have no intention to fix.


Surely xpass is the right choice. If the test ever does pass I hope the unexpected pass result will draw attention to the test so the "unsupported" (or kfail) can be removed. If it was just a pass then there's a chance the test could be fixed then regress and we'd never notice as the unsupported (or kfail) would never have been removed.

Cheers,
Andrew


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