aboutsummaryrefslogtreecommitdiff
path: root/gdb/solist.h
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2015-04-17 09:47:30 +0100
committerGary Benson <gbenson@redhat.com>2015-04-17 09:47:30 +0100
commitaf1900b01b378126d8826591be7b7ec0d18271d7 (patch)
tree63319e6e6ade0db5fbcd70e3ad5582911b5b5d3d /gdb/solist.h
parenta10de6046fbd50e99742af428a815dcd94e2fba8 (diff)
downloadfsf-binutils-gdb-af1900b01b378126d8826591be7b7ec0d18271d7.zip
fsf-binutils-gdb-af1900b01b378126d8826591be7b7ec0d18271d7.tar.gz
fsf-binutils-gdb-af1900b01b378126d8826591be7b7ec0d18271d7.tar.bz2
Introduce exec_file_find
This commit adds a new function, exec_file_find, which computes the full pathname of the main executable in much the same way solib_find does for pathnames of shared libraries. The bulk of the existing solib_find was moved into a new static function solib_find_1, with exec_file_find and solib_find being small wrappers for solib_find_1. gdb/ChangeLog: * solist.h (exec_file_find): New declaration. * solib.c (solib_find_1): New function, factored out from... (solib_find): ...here. (exec_file_find): New function.
Diffstat (limited to 'gdb/solist.h')
-rw-r--r--gdb/solist.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/solist.h b/gdb/solist.h
index 148bec1..7021f5c 100644
--- a/gdb/solist.h
+++ b/gdb/solist.h
@@ -176,6 +176,9 @@ void free_so (struct so_list *so);
/* Return address of first so_list entry in master shared object list. */
struct so_list *master_so_list (void);
+/* Find main executable binary file. */
+extern char *exec_file_find (char *in_pathname, int *fd);
+
/* Find shared library binary file. */
extern char *solib_find (char *in_pathname, int *fd);