[PATCH] Fix PR16508

Pedro Alves palves@redhat.com
Wed Mar 5 20:33:00 GMT 2014


On 03/05/2014 08:03 PM, Tom Tromey wrote:

> Yao> +if [prepare_for_testing $expfile $executable $srcfile \
> Yao> +	[list debug]] {
> Yao> +    untested "failed to prepare for trace tests"
> 
> prepare calls untested for you, so no need to do it again.

Note that the first argument to prepare_for_testing is
what is passed to untested (and really only used for that),
so a better alternative even is to do:

if [prepare_for_testing "failed to prepare for trace tests" \
	$executable $srcfile [list debug]] {

Although we do that all over the place, passing $expfile
to untested is useless, as that information will be
in the gdb.sum before UNTESTED anyway.

I'd support us starting to use this pattern more.

-- 
Pedro Alves



More information about the Gdb-patches mailing list