forked from Imagelibrary/binutils-gdb
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 <tom@tromey.com>
This commit is contained in:
committed by
Simon Marchi
parent
9ad8c5832d
commit
0a70e1a8a9
@@ -285,9 +285,9 @@ get_exec_wrapper ()
|
||||
/* See gdbsupport/common-inferior.h. */
|
||||
|
||||
const char *
|
||||
get_exec_file (int err)
|
||||
get_exec_file ()
|
||||
{
|
||||
if (err && program_path.get () == NULL)
|
||||
if (program_path.get () == NULL)
|
||||
error (_("No executable file specified."));
|
||||
|
||||
return program_path.get ();
|
||||
|
||||
Reference in New Issue
Block a user