Make "show remote exec-file" inferior-aware
authorPedro Alves <palves@redhat.com>
Fri, 10 Jan 2020 20:05:42 +0000 (20:05 +0000)
committerPedro Alves <palves@redhat.com>
Fri, 10 Jan 2020 20:05:42 +0000 (20:05 +0000)
commitacdf84a65400f416c60a0c9c14953ba5a73fb0cd
treedd3479b1bcc98cbd01a9ffa73900cb905622308c
parentec506636cc0c56d4229b00d5e439c0610970f84d
Make "show remote exec-file" inferior-aware

The "set remote exec-file" setting is per-inferior, but the "show
remote exec-file" command always shows the last set exec-file,
irrespective of the current inferior.  E.g.:

 # Set inferior 1's exec-file:
 (gdb) set remote exec-file prog1

 # Add inferior 2, switch to it, and set its exec-file:
 (gdb) add-inferior
 Added inferior 2
 (gdb) inferior 2
 (gdb) set remote exec-file prog2

 # Switch back to inferior 1, and show its exec-file:
 (gdb) inferior 1
 (gdb) show remote exec-file
 prog2
 ^^^^^ should show "prog1" instead here.

gdb/ChangeLog:
2020-01-10  Pedro Alves  <palves@redhat.com>

* remote.c (show_remote_exec_file): Show the current inferior's
exec-file instead of the command variable's value.

gdb/testsuite/ChangeLog:
2020-01-10  Pedro Alves  <palves@redhat.com>

* gdb.base/remote-exec-file.exp: New file.
gdb/ChangeLog
gdb/remote.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/remote-exec-file.exp [new file with mode: 0644]
This page took 0.024622 seconds and 4 git commands to generate.