From af1900b01b378126d8826591be7b7ec0d18271d7 Mon Sep 17 00:00:00 2001 From: Gary Benson Date: Fri, 17 Apr 2015 09:47:30 +0100 Subject: 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. --- gdb/solist.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gdb/solist.h') 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); -- cgit v1.1