+2020-02-06 Shahab Vahedi <shahab@synopsys.com>
+
+ * lib/gdb.exp (gdb_wrapper_init): Reset
+ "gdb_wrapper_initialized" to 0 if "wrapper_file" does
+ not exist.
+
2020-02-20 Tom de Vries <tdevries@suse.de>
PR go/17018
global gdb_wrapper_flags
global gdb_wrapper_target
+ # If the wrapper is initialized but the wrapper file cannot be
+ # found anymore, the wrapper file must be built again.
+ if { $gdb_wrapper_initialized == 1 && \
+ [info exists gdb_wrapper_file] && \
+ ![file exists $gdb_wrapper_file] } {
+ verbose "reinitializing the wrapper"
+ set gdb_wrapper_initialized 0
+ }
+
if { $gdb_wrapper_initialized == 1 } { return; }
if {[target_info exists needs_status_wrapper] && \
[target_info needs_status_wrapper] != "0"} {
- set result [build_wrapper "testglue.o"]
+ set result [build_wrapper [standard_output_file "testglue.o"]]
if { $result != "" } {
set gdb_wrapper_file [lindex $result 0]
set gdb_wrapper_flags [lindex $result 1]
verbose "options are $options"
verbose "source is $source $dest $type $options"
- if { $gdb_wrapper_initialized == 0 } { gdb_wrapper_init }
+ gdb_wrapper_init
if {[target_info exists needs_status_wrapper] && \
[target_info needs_status_wrapper] != "0" && \