Re: [PATCH] Associate dummy_frame with ptid

Pedro Alves
2014-06-26T13:19:54Z

Hi Yao,

Thanks for tackling this.

On 06/26/2014 10:44 AM, Yao Qi wrote:

> +if {[prepare_for_testing $testfile.exp $testfile $srcfile {nowarnings debug}]} {

Any reason for "nowarnings" ? It just sounds like copy/paste, as the test
has no dependencies/includes, even.

> + return -1
> +}
> +
> +# Inferior 1 stops at f1.
> +
> +if ![runto f1] then {
> + fail "Can't run to f1"
> + return 0
> +}
> +
> +gdb_test "add-inferior -exec ${binfile}" \
> + "Added inferior 2.*" \
> + "add inferior 2 with -exec ${executable}"
> +gdb_test "inferior 2" "witching to inferior 2 .*" ""

Lots of tests in this file are silent. Any reason for that?

> +gdb_test "run" "Breakpoint.* f1 .*" "start to f1 inferior 2"
> +gdb_breakpoint f2
> +# Inferior 2 stops at f2.
> +gdb_continue_to_breakpoint f2

Isn't this the same as just "runto f2" ?

> +
> +gdb_breakpoint commonfun
> +
> +# Check the stack bactrace in inferior INF.

This doesn't document MSG, which I'd assume to be the
test message. But, it's actually used as message prefix.
So it seems the parameter is misnamed.

> +
> +proc check_bt { inf msg } {
> + with_test_prefix "$msg" {
> + gdb_test "bt 1" "#0 f$inf .*" "bt in inferior $inf"
> + }
> +}
> +

Otherwise looks good to me.

--
Pedro Alves