7cfd74cfc6
The new exec-file-mismatch feature reveals that when running gdb.multi/multi-re-run.exp against --target_board=native-gdbserver, we've been starting gdbserver with the wrong program: (gdb) spawn /home/pedro/brno/pedro/gdb/binutils-gdb/build/gdb/testsuite/../../gdbserver/gdbserver --once localhost:2347 /home/pedro/brno/pedro/gdb/binutils-gdb/build/gdb/te stsuite/outputs/gdb.multi/multi-re-run/multi-re-run-2 Process /home/pedro/brno/pedro/gdb/binutils-gdb/build/gdb/testsuite/outputs/gdb.multi/multi-re-run/multi-re-run-2 created; pid = 6280 Listening on port 2347 target remote localhost:2347 Remote debugging using localhost:2347 warning: Mismatch between current exec-file /home/pedro/brno/pedro/gdb/binutils-gdb/build/gdb/testsuite/outputs/gdb.multi/multi-re-run/multi-re-run-1 and automatically determined exec-file /home/pedro/brno/pedro/gdb/binutils-gdb/build/gdb/testsuite/outputs/gdb.multi/multi-re-run/multi-re-run-2 exec-file-mismatch handling is currently "ask" Load new symbol table from "/home/pedro/brno/pedro/gdb/binutils-gdb/build/gdb/testsuite/outputs/gdb.multi/multi-re-run/multi-re-run-2"? (y or n) Quit (gdb) FAIL: gdb.multi/multi-re-run.exp: re_run_inf=1: iter=1: running to all_started in runto The problem is that gdb_reload uses the last loaded file as binary to spawn, but we load the program for inferior 2 and then switch to inferior 1 and run it, so the last loaded file is the program for inferior 2. Fix this by tweaking last_loaded_file. gdb/testsuite/ChangeLog: 2020-05-16 Pedro Alves <palves@redhat.com> * gdb.multi/multi-re-run.exp (test_re_run): Switch LAST_LOADED_FILE accordingly. |
||
---|---|---|
.. | ||
base.exp | ||
bkpt-multi-exec.c | ||
bkpt-multi-exec.exp | ||
crashme.c | ||
dummy-frame-restore.c | ||
dummy-frame-restore.exp | ||
goodbye.c | ||
hangout.c | ||
hello.c | ||
info-threads.exp | ||
multi-arch-exec.c | ||
multi-arch-exec.exp | ||
multi-arch.exp | ||
multi-attach.c | ||
multi-attach.exp | ||
multi-exit.c | ||
multi-exit.exp | ||
multi-kill.c | ||
multi-kill.exp | ||
multi-re-run-1.c | ||
multi-re-run-2.c | ||
multi-re-run.exp | ||
multi-target.c | ||
multi-target.exp | ||
multi-term-settings.c | ||
multi-term-settings.exp | ||
remove-inferiors.c | ||
remove-inferiors.exp | ||
run-only-second-inf.c | ||
run-only-second-inf.exp | ||
stop-all-on-exit.c | ||
stop-all-on-exit.exp | ||
tids-gid-reset.c | ||
tids-gid-reset.exp | ||
tids.c | ||
tids.exp | ||
watchpoint-multi-exit.c | ||
watchpoint-multi-exit.exp | ||
watchpoint-multi.c | ||
watchpoint-multi.exp |