Commit Graph

5 Commits

Author SHA1 Message Date
Mark Kettenis 4b8a1a2882 * gdb_ptrace.h (PT_TRACE_ME): Define to zero if not already
defined.
* inf-ptrace.c: Tweak comments.
(inf_ptrace_me): Use PT_TRACE_ME instead of hardcoded zero.
(inf_ptrace_mourn_inferior): Call waitpid.
(inf_ptrace_attach): Use pid_t, Remove unnecessary cast.
(inf_ptrace_detach): Use pid_t.  Use ptid_get_pid instead of
PIDGET.
(inf_ptrace_kill): Rename from inf_ptrace_kill_inferior.  Use
pid_t.  Use ptid_get_pid instead of PIDGET.
(inf_ptrace_kill): Call waitpid instead of wait.
(inf_ptrace_resume): Use pid_t.  Use ptid_get_pid instead of
PIDGET.
(inf_ptrace_wait): Use waitpid instead wait.  Use pid_t.  Don't
call target_has_exited or target_thread_alive.  Properly ignore
terminated detached child processes.
(inf_ptrace_has_exited): Remove function.
(inf_ptrace_xfer_partial): Use pid_t.  Use ptid_get_pid instead of
PIDGET.  Use gdb_byte instead of `unsigned char'.
(inf_ptrace_thread_alive): Use ptid_get_pid instead of PIDGET.
(inf_ptrace_pid_to_str): Remove function.
(inf_ptrace_target): Use inf_ptrace_kill instead of
inf_ptrace_kill_inferior.  Use normal_pid_to_str instead of
inf_ptrace_pid_to_str.  Don't set to_has_exited.
(inf_ptrace_fetch_register, inf_ptrace_store_register): Reformat
long lines.
2005-07-25 20:42:29 +00:00
Andreas Schwab 4247cafddf * gdb_ptrace.h: Fix typos when checking for PT_ATTACH. Reported
by Chad Harrington <harrington.chad@gmail.com>.
2005-06-23 09:21:45 +00:00
Mark Kettenis f1bc22da72 * gdb_ptrace.h [PTRACE_TYPE_ARG5] (ptrace): New macro.
* infptrace.c (call_ptrace): Simply call ptrace with four
arguments.
2004-11-20 16:52:22 +00:00
Mark Kettenis 277215a6d4 * gdb_ptrace.h: GNU/Linux. 2004-08-22 15:41:47 +00:00
Mark Kettenis 11003ae340 * gdb_ptrace.h: New file.
* infptrace.c: Include "gdb_ptrace.h" instead of <ptrace.h> or
<sys/ptrace.h>.
(PT_READ_I, PT_READ_D, PT_READ_U, PT_WRITE_I, PT_WRITE_D)
(PT_WRITE_U, PT_CONTINUE, PT_STEP, PT_KILL): Remove defines.
(attach): Don't define PT_ATTACH.
(detach): Don't define PT_DETACH.
* Makefile.in (gdb_ptrace_h): New variable.
(infptrace.o): Update dependencies.
2004-08-21 08:56:38 +00:00