Introduce linux_proc_pid_to_exec_file
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)
commite0d86d2cbd168e083f3d077b8cfe67c3d03c1e5f
tree2d3fa30cfed6900fa8fd5069ed619c6e71992a5b
parenta9a5a3d1d27fc443934ed4919f69b34144288cf0
Introduce linux_proc_pid_to_exec_file

This commit introduces a new function linux_proc_pid_to_exec_file
that shared Linux code can use to discover the filename of the
executable that was run to create a process on the system.

gdb/ChangeLog:

* nat/linux-procfs.h (linux_proc_pid_to_exec_file):
New declaration.
* nat/linux-procfs.c (linux_proc_pid_to_exec_file):
New function, factored out from...
* linux-nat.c (linux_child_pid_to_exec_file): ...here.
gdb/ChangeLog
gdb/linux-nat.c
gdb/nat/linux-procfs.c
gdb/nat/linux-procfs.h