Skip to content
Commit 6227a661 authored by Pedro Alves's avatar Pedro Alves
Browse files

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:
yyyy-mm-dd  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:
yyyy-mm-dd  Pedro Alves  <palves@redhat.com>

	* gdb.base/remote-exec-file.exp: New file.
parent 1e81a82c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment