aboutsummaryrefslogtreecommitdiff
path: root/gdbsupport
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2024-05-30 14:53:54 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2024-06-07 23:09:03 -0400
commit0a70e1a8a94b29d9fe461d0a401f7c2d02f8c441 (patch)
tree5ae3a4d8a02f58e11b6fc168e2451a12ee7f65af /gdbsupport
parent9ad8c5832d0092e1c02069b1189ec0ff59089957 (diff)
downloadbinutils-0a70e1a8a94b29d9fe461d0a401f7c2d02f8c441.zip
binutils-0a70e1a8a94b29d9fe461d0a401f7c2d02f8c441.tar.gz
binutils-0a70e1a8a94b29d9fe461d0a401f7c2d02f8c441.tar.bz2
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>
Diffstat (limited to 'gdbsupport')
-rw-r--r--gdbsupport/common-inferior.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdbsupport/common-inferior.h b/gdbsupport/common-inferior.h
index bc6afd6..9c19e9d 100644
--- a/gdbsupport/common-inferior.h
+++ b/gdbsupport/common-inferior.h
@@ -28,9 +28,9 @@
extern const char *get_exec_wrapper ();
/* Return the name of the executable file as a string.
- ERR nonzero means get error if there is none specified;
- otherwise return 0 in that case. */
-extern const char *get_exec_file (int err);
+
+ Error out if no executable is specified. */
+extern const char *get_exec_file ();
/* Return the inferior's current working directory.