gdb: add setter/getter for inferior cwd

Add cwd/set_cwd to the inferior class, remove set_inferior_args.
Keep get_inferior_args, because it is used from fork_inferior, in shared
code.  The cwd could eventually be passed as a parameter eventually,
though, I think that would be cleaner.

Change-Id: Ifb72ea865d7e6f9a491308f0d5c1595579d8427e
This commit is contained in:
Simon Marchi
2021-06-25 21:57:56 -04:00
parent e51695253e
commit 90cc31c9e5
4 changed files with 29 additions and 26 deletions

View File

@ -2558,7 +2558,7 @@ windows_nat_target::create_inferior (const char *exec_file,
if (!exec_file)
error (_("No executable specified, use `target exec'."));
const char *inferior_cwd = get_inferior_cwd ();
const char *inferior_cwd = current_inferior ()->cwd ();
std::string expanded_infcwd;
if (inferior_cwd != NULL)
{