[PATCH v3] guile: stop procedures on invalid breakpoints

Simon Marchi simon.marchi@polymtl.ca
Thu Aug 26 01:38:39 GMT 2021


> diff --git a/gdb/testsuite/gdb.guile/scm-breakpoint.exp b/gdb/testsuite/gdb.guile/scm-breakpoint.exp
> index be898cacaa7..6964066dd34 100644
> --- a/gdb/testsuite/gdb.guile/scm-breakpoint.exp
> +++ b/gdb/testsuite/gdb.guile/scm-breakpoint.exp
> @@ -383,10 +383,45 @@ proc_with_prefix test_bkpt_eval_funcs { } {
>  	"= 4" \
>  	"check non firing same-location breakpoint eval function was also called at each stop 2"
>  
> +    # Check that stop funcs can be manipulated on invalid Scheme-created
> +    # breakpoints.
> +
> +    delete_breakpoints
> +    gdb_test "guile (print (breakpoint-valid? eval-bp1))" "= #f" \
> +	"check Scheme-created breakpoint is invalid"
> +    gdb_scm_test_silent_cmd "guile (set-breakpoint-stop! eval-bp1 (const 'test!))" \
> +	"check setting stop procedure on invalid Scheme-created breakpoint"
> +    gdb_test "guile (print ((breakpoint-stop eval-bp1)))" "= test!" \
> +	"check stop procedure on invalid Scheme-created breakpoint was successfully set"
> +
> +    # Check that stop funcs can be manipulated on breakpoint wrappers.
> +
> +    gdb_breakpoint "main"
> +    gdb_scm_test_silent_cmd "guile (define bp-wrapper (car (breakpoints)))" \
> +	"get breakpoint wrapper"
> +    gdb_test "guile (print (breakpoint-valid? bp-wrapper))" "= #t" \
> +	"check breakpoint wrapper is valid"
> +    gdb_scm_test_silent_cmd "guile (set-breakpoint-stop! bp-wrapper (const 'test!))" \
> +	"check setting stop procedure on breakpoit wrapper"

breakpoit -> breakpoint

Ok to push with that fixed, thanks.

Simon


More information about the Gdb-patches mailing list