Add target_ops argument to to_pid_to_exec_file

2014-02-19  Tom Tromey  <tromey@redhat.com>

	* windows-nat.c (windows_pid_to_exec_file): Add 'self' argument.
	* target.h (struct target_ops) <to_pid_to_exec_file>: Add
	argument.
	(target_pid_to_exec_file): Add argument.
	* target.c (debug_to_pid_to_exec_file): Add argument.
	(update_current_target): Update.
	* nbsd-nat.h (nbsd_pid_to_exec_file): Add 'self' argument.
	* nbsd-nat.c (nbsd_pid_to_exec_file): Add 'self' argument.
	* linux-nat.c (linux_child_pid_to_exec_file): Add 'self' argument.
	(linux_handle_extended_wait): Update.
	* inf-child.c (inf_child_pid_to_exec_file): Add 'self' argument.
	* fbsd-nat.h (fbsd_pid_to_exec_file): Add 'self' argument.
	* fbsd-nat.c (fbsd_pid_to_exec_file): Add 'self' argument.
	* darwin-nat.c (darwin_pid_to_exec_file): Add 'self' argument.
This commit is contained in:
Tom Tromey 2013-12-17 21:35:01 -07:00
parent 1aac633be6
commit 8dd27370eb
11 changed files with 32 additions and 15 deletions

View file

@ -844,7 +844,7 @@ linux_nat_pass_signals (struct target_ops *self,
/* Prototypes for local functions. */
static int stop_wait_callback (struct lwp_info *lp, void *data);
static int linux_thread_alive (ptid_t ptid);
static char *linux_child_pid_to_exec_file (int pid);
static char *linux_child_pid_to_exec_file (struct target_ops *self, int pid);
/* Convert wait status STATUS to a string. Used for printing debug
@ -2193,7 +2193,7 @@ linux_handle_extended_wait (struct lwp_info *lp, int status,
ourstatus->kind = TARGET_WAITKIND_EXECD;
ourstatus->value.execd_pathname
= xstrdup (linux_child_pid_to_exec_file (pid));
= xstrdup (linux_child_pid_to_exec_file (NULL, pid));
return 0;
}
@ -4033,7 +4033,7 @@ linux_nat_thread_name (struct target_ops *self, struct thread_info *thr)
can be opened to get the symbols for the child process. */
static char *
linux_child_pid_to_exec_file (int pid)
linux_child_pid_to_exec_file (struct target_ops *self, int pid)
{
char *name1, *name2;