aboutsummaryrefslogtreecommitdiff
path: root/binutils/dwarf.c
diff options
context:
space:
mode:
authorTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2020-10-29 15:33:39 +0100
committerTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2020-10-29 15:33:39 +0100
commitcfaa8f76928803afda1e1862bcd0ab5f7febd647 (patch)
treeb57f35792d6f47559304da193f7069c6d7622214 /binutils/dwarf.c
parent00c19b8e7879b5e256e7852bdac667466d7a42c2 (diff)
downloadgdb-cfaa8f76928803afda1e1862bcd0ab5f7febd647.zip
gdb-cfaa8f76928803afda1e1862bcd0ab5f7febd647.tar.gz
gdb-cfaa8f76928803afda1e1862bcd0ab5f7febd647.tar.bz2
gdb: restore thread after detaching or killing an inferior
The "detach inferiors N" command causes the current inferior to switch. E.g.: $ gdb a.out Reading symbols from a.out... (gdb) start ... (gdb) add-inferior [New inferior 2] Added inferior 2 on connection 1 (native) (gdb) inferior 2 [Switching to inferior 2 [<null>] (<noexec>)] (gdb) info inferiors Num Description Connection Executable 1 process 18242 1 (native) /path/to/a.out * 2 <null> 1 (native) (gdb) detach inferiors 1 Detaching from program: /path/to/a.out, process 18242 [Inferior 1 (process 18242) detached] (gdb) info inferiors Num Description Connection Executable * 1 <null> /path/to/a.out 2 <null> 1 (native) (gdb) The same switch happens with the "kill inferiors N" command. Prevent it by restoring the current thread. gdb/ChangeLog: 2020-10-29 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> PR gdb/19318 * inferior.c (detach_inferior_command): Restore the current thread. (kill_inferior_command): Ditto. gdb/testsuite/ChangeLog: 2020-10-29 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> * gdb.base/kill-detach-inferiors-cmd.exp: Check that 'kill inferiors' and 'detach inferiors' do not change the current inferior.
Diffstat (limited to 'binutils/dwarf.c')
0 files changed, 0 insertions, 0 deletions