]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: replace `get_exec_file (0)` calls with `current_program_space->exec_filename ()`
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 30 May 2024 18:53:54 +0000 (14:53 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Sat, 8 Jun 2024 03:09:03 +0000 (23:09 -0400)
commit0a70e1a8a94b29d9fe461d0a401f7c2d02f8c441
tree5ae3a4d8a02f58e11b6fc168e2451a12ee7f65af
parent9ad8c5832d0092e1c02069b1189ec0ff59089957
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>
15 files changed:
gdb/bsd-kvm.c
gdb/corefile.c
gdb/elf-none-tdep.c
gdb/exec.c
gdb/fbsd-tdep.c
gdb/go32-nat.c
gdb/infcmd.c
gdb/nat/fork-inferior.c
gdb/nto-procfs.c
gdb/procfs.c
gdb/remote.c
gdb/symfile.c
gdb/target.c
gdbserver/server.cc
gdbsupport/common-inferior.h