Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSanimir Agovic2017-11-10 15:43:46 -0500
committerSanimir Agovic2017-11-10 18:04:28 -0500
commit3dbf379ca4ace3eeab00a4852364578f69dcdd50 (patch)
tree51b4ff579f0428bc71153c7f5e3e823e15ee57e8 /agent/system/Darwin
parent7a7ef0ec3801af4dd7a5f5895a9642c731e22574 (diff)
downloadorg.eclipse.tcf.agent-3dbf379ca4ace3eeab00a4852364578f69dcdd50.tar.gz
org.eclipse.tcf.agent-3dbf379ca4ace3eeab00a4852364578f69dcdd50.tar.xz
org.eclipse.tcf.agent-3dbf379ca4ace3eeab00a4852364578f69dcdd50.zip
darwin: fix compile errors and warnings
Change-Id: I2af3bffd781823b88324a17448ae446655945317 Signed-off-by: Sanimir Agovic <sanimir@subpath.org>
Diffstat (limited to 'agent/system/Darwin')
-rw-r--r--agent/system/Darwin/tcf/context-darwin.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/agent/system/Darwin/tcf/context-darwin.c b/agent/system/Darwin/tcf/context-darwin.c
index 271e89dc..6d791523 100644
--- a/agent/system/Darwin/tcf/context-darwin.c
+++ b/agent/system/Darwin/tcf/context-darwin.c
@@ -99,9 +99,9 @@ int context_attach(pid_t pid, ContextAttachCallBack * done, void * data, int mod
assert(done != NULL);
trace(LOG_CONTEXT, "context: attaching pid %d", pid);
- if ((mode & CONTEXT_ATTACH_SELF) == 0 && ptrace(PT_ATTACH, pid, 0, 0) < 0) {
+ if ((mode & CONTEXT_ATTACH_SELF) == 0 && ptrace(PT_ATTACHEXC, pid, 0, 0) < 0) {
int err = errno;
- trace(LOG_ALWAYS, "error: ptrace(PT_ATTACH) failed: pid %d, error %d %s",
+ trace(LOG_ALWAYS, "error: ptrace(PT_ATTACHEXC) failed: pid %d, error %d %s",
pid, err, errno_to_str(err));
errno = err;
return -1;
@@ -558,9 +558,7 @@ static void event_pid_exited(pid_t pid, int status, int signal) {
static void event_pid_stopped(pid_t pid, int signal, int event, int syscall) {
int stopped_by_exception = 0;
- unsigned long msg = 0;
Context * ctx = NULL;
- Context * ctx2 = NULL;
trace(LOG_EVENTS, "event: pid %d stopped, signal %d", pid, signal);
@@ -609,7 +607,6 @@ static void event_pid_stopped(pid_t pid, int signal, int event, int syscall) {
send_context_changed_event(ctx);
}
else {
- thread_state_t state;
unsigned int state_count;
ContextAddress pc0 = 0;
ContextAddress pc1 = 0;

Back to the top