Introduce exec_file_find
authorGary Benson <gbenson@redhat.com>
Fri, 17 Apr 2015 08:47:30 +0000 (09:47 +0100)
committerGary Benson <gbenson@redhat.com>
Fri, 17 Apr 2015 08:47:30 +0000 (09:47 +0100)
commitaf1900b01b378126d8826591be7b7ec0d18271d7
tree63319e6e6ade0db5fbcd70e3ad5582911b5b5d3d
parenta10de6046fbd50e99742af428a815dcd94e2fba8
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/ChangeLog
gdb/solib.c
gdb/solist.h