mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-12-19 01:19:41 +08:00
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
@@ -108,7 +108,6 @@ static void
|
||||
bsd_kvm_target_open (const char *arg, int from_tty)
|
||||
{
|
||||
char errbuf[_POSIX2_LINE_MAX];
|
||||
const char *execfile = NULL;
|
||||
kvm_t *temp_kd;
|
||||
std::string filename;
|
||||
|
||||
@@ -121,7 +120,7 @@ bsd_kvm_target_open (const char *arg, int from_tty)
|
||||
filename = gdb_abspath (filename.c_str ());
|
||||
}
|
||||
|
||||
execfile = get_exec_file (0);
|
||||
const char *execfile = current_program_space->exec_filename ();
|
||||
temp_kd = kvm_openfiles (execfile, filename.c_str (), NULL,
|
||||
write_files ? O_RDWR : O_RDONLY, errbuf);
|
||||
if (temp_kd == NULL)
|
||||
|
||||
Reference in New Issue
Block a user