diff options
author | Gary Benson <gbenson@redhat.com> | 2015-04-17 09:47:30 +0100 |
---|---|---|
committer | Gary Benson <gbenson@redhat.com> | 2015-04-17 09:47:30 +0100 |
commit | e0d86d2cbd168e083f3d077b8cfe67c3d03c1e5f (patch) | |
tree | 2d3fa30cfed6900fa8fd5069ed619c6e71992a5b /gdb/nat/linux-procfs.h | |
parent | a9a5a3d1d27fc443934ed4919f69b34144288cf0 (diff) | |
download | gdb-e0d86d2cbd168e083f3d077b8cfe67c3d03c1e5f.zip gdb-e0d86d2cbd168e083f3d077b8cfe67c3d03c1e5f.tar.gz gdb-e0d86d2cbd168e083f3d077b8cfe67c3d03c1e5f.tar.bz2 |
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.
Diffstat (limited to 'gdb/nat/linux-procfs.h')
-rw-r--r-- | gdb/nat/linux-procfs.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/nat/linux-procfs.h b/gdb/nat/linux-procfs.h index c4f5788..fdbf383 100644 --- a/gdb/nat/linux-procfs.h +++ b/gdb/nat/linux-procfs.h @@ -73,4 +73,10 @@ extern void linux_proc_attach_tgid_threads (pid_t pid, /* Return true if the /proc/PID/task/ directory exists. */ extern int linux_proc_task_list_dir_exists (pid_t pid); +/* Return the full absolute name of the executable file that was run + to create the process PID. The returned value persists until this + function is next called. */ + +extern char *linux_proc_pid_to_exec_file (int pid); + #endif /* COMMON_LINUX_PROCFS_H */ |