[PATCH v8 6/6] gdb/infrun: handle already-exited threads when attempting to stop
Pedro Alves
palves@redhat.com
Fri May 15 15:46:09 GMT 2020
On 5/15/20 3:16 PM, Tom de Vries wrote:
> With attached patch, we have:
> ...
> Running src/gdb/testsuite/gdb.ada/info_auto_lang.exp ...
> WARNING: info_auto_lang.exp defined global array type_in_c
> WARNING: info_auto_lang.exp defined global array rbreak_func_in_ada
> WARNING: info_auto_lang.exp defined global array var_in_c
> WARNING: info_auto_lang.exp defined global array func_in_c
> WARNING: info_auto_lang.exp defined global array func_in_ada
> WARNING: info_auto_lang.exp defined global array type_in_ada
> WARNING: info_auto_lang.exp defined global array var_in_ada
> WARNING: info_auto_lang.exp defined global array rbreak_func_in_c
> ...
Seems like a good thing to have to me.
>
> +# Returns 1 if __VAR is a global array.
> +
> +proc global_array_exists { __var } {
...
> +proc global_unset { __var } {
Curious -- is there a reason for the underscores?
> +proc check_global_vars { } {
> + global gdb_global_vars
> + set vars [info globals]
> + set skip [list "expect_out" "spawn_out"]
> + foreach var $vars {
> + set found [lsearch -exact $gdb_global_vars $var]
> + if { $found != -1 } {
> + # Already present
Missing period.
> + continue
> + }
> + set found [lsearch -exact $skip $var]
> + if { $found != -1 } {
> + continue
> + }
> + if { ![global_array_exists $var] } {
> + continue
> + }
> +
> + global gdb_test_file_name
> + warning "$gdb_test_file_name.exp defined global array $var"
Tabs vs spaces.
Thanks,
Pedro Alves
More information about the Gdb-patches
mailing list