projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
include/elf/
[deliverable/binutils-gdb.git]
/
gdb
/
darwin-nat.c
diff --git
a/gdb/darwin-nat.c
b/gdb/darwin-nat.c
index eac05bafbe4c6d700d75a0bdbabcdd6a2f67aa2c..cabd4e24381c60f73f7155eb6e6217979c38fd8d 100644
(file)
--- a/
gdb/darwin-nat.c
+++ b/
gdb/darwin-nat.c
@@
-86,16
+86,11
@@
extern boolean_t exc_server (mach_msg_header_t *in, mach_msg_header_t *out);
static void darwin_stop (ptid_t);
static void darwin_stop (ptid_t);
-static void darwin_resume (ptid_t ptid, int step,
- enum target_signal signal);
-
-static ptid_t darwin_wait (ptid_t ptid, struct target_waitstatus *status);
-
static void darwin_mourn_inferior (struct target_ops *ops);
static int darwin_lookup_task (char *args, task_t * ptask, int *ppid);
static void darwin_mourn_inferior (struct target_ops *ops);
static int darwin_lookup_task (char *args, task_t * ptask, int *ppid);
-static void darwin_kill_inferior (
void
);
+static void darwin_kill_inferior (
struct target_ops *ops
);
static void darwin_ptrace_me (void);
static void darwin_ptrace_me (void);
@@
-106,10
+101,6
@@
static void darwin_create_inferior (struct target_ops *ops, char *exec_file,
static void darwin_files_info (struct target_ops *ops);
static void darwin_files_info (struct target_ops *ops);
-static char *darwin_pid_to_str (ptid_t tpid);
-
-static int darwin_thread_alive (ptid_t tpid);
-
/* Current inferior. */
darwin_inferior *darwin_inf = NULL;
/* Current inferior. */
darwin_inferior *darwin_inf = NULL;
@@
-346,7
+337,8
@@
darwin_stop (ptid_t t)
}
static void
}
static void
-darwin_resume (ptid_t ptid, int step, enum target_signal signal)
+darwin_resume (struct target_ops *ops,
+ ptid_t ptid, int step, enum target_signal signal)
{
struct target_waitstatus status;
int pid;
{
struct target_waitstatus status;
int pid;
@@
-483,7
+475,8
@@
catch_exception_raise (mach_port_t port,
}
static ptid_t
}
static ptid_t
-darwin_wait (ptid_t ptid, struct target_waitstatus *status)
+darwin_wait (struct target_ops *ops,
+ ptid_t ptid, struct target_waitstatus *status)
{
kern_return_t kret;
mach_msg_header_t *hdr = &msgin.hdr;
{
kern_return_t kret;
mach_msg_header_t *hdr = &msgin.hdr;
@@
-675,7
+668,7
@@
darwin_mourn_inferior (struct target_ops *ops)
}
static void
}
static void
-darwin_stop_inferior (darwin_inferior *inf)
+darwin_stop_inferior (
struct target_ops *ops,
darwin_inferior *inf)
{
struct target_waitstatus wstatus;
ptid_t ptid;
{
struct target_waitstatus wstatus;
ptid_t ptid;
@@
-689,18
+682,18
@@
darwin_stop_inferior (darwin_inferior *inf)
MACH_CHECK_ERROR (kret);
if (msg_state == GOT_MESSAGE)
MACH_CHECK_ERROR (kret);
if (msg_state == GOT_MESSAGE)
- darwin_resume (inferior_ptid, 0, 0);
+ darwin_resume (
darwin_ops,
inferior_ptid, 0, 0);
res = kill (inf->pid, SIGSTOP);
if (res != 0)
warning (_("cannot kill: %s\n"), strerror (errno));
res = kill (inf->pid, SIGSTOP);
if (res != 0)
warning (_("cannot kill: %s\n"), strerror (errno));
- ptid = darwin_wait (inferior_ptid, &wstatus);
+ ptid = darwin_wait (
ops,
inferior_ptid, &wstatus);
gdb_assert (wstatus.kind = TARGET_WAITKIND_STOPPED);
}
static void
gdb_assert (wstatus.kind = TARGET_WAITKIND_STOPPED);
}
static void
-darwin_kill_inferior (
void
)
+darwin_kill_inferior (
struct target_ops *ops
)
{
struct target_waitstatus wstatus;
ptid_t ptid;
{
struct target_waitstatus wstatus;
ptid_t ptid;
@@
-713,7
+706,7
@@
darwin_kill_inferior (void)
if (ptid_equal (inferior_ptid, null_ptid))
return;
if (ptid_equal (inferior_ptid, null_ptid))
return;
- darwin_stop_inferior (darwin_inf);
+ darwin_stop_inferior (
ops,
darwin_inf);
res = PTRACE (PT_KILL, darwin_inf->pid, 0, 0);
gdb_assert (res == 0);
res = PTRACE (PT_KILL, darwin_inf->pid, 0, 0);
gdb_assert (res == 0);
@@
-721,13
+714,13
@@
darwin_kill_inferior (void)
if (msg_state == GOT_MESSAGE)
{
exc_msg.ex_type = 0;
if (msg_state == GOT_MESSAGE)
{
exc_msg.ex_type = 0;
- darwin_resume (inferior_ptid, 0, 0);
+ darwin_resume (
ops,
inferior_ptid, 0, 0);
}
kret = task_resume (darwin_inf->task);
MACH_CHECK_ERROR (kret);
}
kret = task_resume (darwin_inf->task);
MACH_CHECK_ERROR (kret);
- ptid = darwin_wait (inferior_ptid, &wstatus);
+ ptid = darwin_wait (
ops,
inferior_ptid, &wstatus);
/* This double wait seems required... */
res = waitpid (darwin_inf->pid, &status, 0);
/* This double wait seems required... */
res = waitpid (darwin_inf->pid, &status, 0);
@@
-1018,7
+1011,7
@@
darwin_detach (struct target_ops *ops, char *args, int from_tty)
gdb_flush (gdb_stdout);
}
gdb_flush (gdb_stdout);
}
- darwin_stop_inferior (darwin_inf);
+ darwin_stop_inferior (
ops,
darwin_inf);
kret = darwin_restore_exception_ports (darwin_inf);
MACH_CHECK_ERROR (kret);
kret = darwin_restore_exception_ports (darwin_inf);
MACH_CHECK_ERROR (kret);
@@
-1026,7
+1019,7
@@
darwin_detach (struct target_ops *ops, char *args, int from_tty)
if (msg_state == GOT_MESSAGE)
{
exc_msg.ex_type = 0;
if (msg_state == GOT_MESSAGE)
{
exc_msg.ex_type = 0;
- darwin_resume (inferior_ptid, 0, 0);
+ darwin_resume (
ops,
inferior_ptid, 0, 0);
}
kret = task_resume (darwin_inf->task);
}
kret = task_resume (darwin_inf->task);
@@
-1049,7
+1042,7
@@
darwin_files_info (struct target_ops *ops)
}
static char *
}
static char *
-darwin_pid_to_str (ptid_t ptid)
+darwin_pid_to_str (
struct target_ops *ops,
ptid_t ptid)
{
static char buf[128];
{
static char buf[128];
@@
-1061,7
+1054,7
@@
darwin_pid_to_str (ptid_t ptid)
}
static int
}
static int
-darwin_thread_alive (ptid_t ptid)
+darwin_thread_alive (
struct target_ops *ops,
ptid_t ptid)
{
return 1;
}
{
return 1;
}
This page took
0.025309 seconds
and
4
git commands to generate.