From 0a70e1a8a94b29d9fe461d0a401f7c2d02f8c441 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Thu, 30 May 2024 14:53:54 -0400 Subject: gdb: replace `get_exec_file (0)` calls with `current_program_space->exec_filename ()` Calls of `get_exec_file (0)` are equivalent to just getting the exec filename from the current program space. I'm looking to remove `get_exec_file`, so replace these uses with `current_program_space->exec_filename ()`. Remove the `err` parameter of `get_exec_wrapper` since all the calls that remain pass 1, meaning to error out if no executable is specified. Change-Id: I7729ea4c7f03dbb046211cc5aa3858ab3a551965 Approved-By: Tom Tromey --- gdb/nat/fork-inferior.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/nat') diff --git a/gdb/nat/fork-inferior.c b/gdb/nat/fork-inferior.c index c1082eb..172eef0 100644 --- a/gdb/nat/fork-inferior.c +++ b/gdb/nat/fork-inferior.c @@ -282,7 +282,7 @@ fork_inferior (const char *exec_file_arg, const std::string &allargs, /* If no exec file handed to us, get it from the exec-file command -- with a good, common error message if none is specified. */ if (exec_file_arg == NULL) - exec_file = get_exec_file (1); + exec_file = get_exec_file (); else exec_file = exec_file_arg; -- cgit v1.1