Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2013-02-08 00:28:58 +0000
committerEugene Tarassov2013-02-08 00:28:58 +0000
commit5f3f9858652e3933900fc60eb703e230348826dc (patch)
tree6727f226e6393eef77828ed61d084665e8f4a52d /agent/system/Darwin
parent6502e502ad220bf518e308be10d2bd290fff3ab5 (diff)
downloadorg.eclipse.tcf.agent-5f3f9858652e3933900fc60eb703e230348826dc.tar.gz
org.eclipse.tcf.agent-5f3f9858652e3933900fc60eb703e230348826dc.tar.xz
org.eclipse.tcf.agent-5f3f9858652e3933900fc60eb703e230348826dc.zip
TCF Agent: initial implementation of the Disassembly service
Diffstat (limited to 'agent/system/Darwin')
-rw-r--r--agent/system/Darwin/tcf/context-darwin.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/agent/system/Darwin/tcf/context-darwin.c b/agent/system/Darwin/tcf/context-darwin.c
index 0f5c2620..b3b13cf0 100644
--- a/agent/system/Darwin/tcf/context-darwin.c
+++ b/agent/system/Darwin/tcf/context-darwin.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Wind River Systems, Inc. and others.
+ * Copyright (c) 2007, 2013 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v1.0 which accompany this distribution.
@@ -38,6 +38,7 @@
#include <tcf/framework/myalloc.h>
#include <tcf/framework/waitpid.h>
#include <tcf/framework/signames.h>
+#include <tcf/services/symbols.h>
#include <tcf/services/breakpoints.h>
#include <system/Darwin/tcf/regset.h>
@@ -463,6 +464,23 @@ int context_get_memory_map(Context * ctx, MemoryMap * map) {
return 0;
}
+#if ENABLE_ContextISA
+int context_get_isa(Context * ctx, ContextAddress addr, ContextISA * isa) {
+ memset(isa, 0, sizeof(ContextISA));
+#if defined(__i386__)
+ isa->def = "386";
+#elif defined(__x86_64__)
+ isa->def = "X86_64";
+#else
+ isa->def = NULL;
+#endif
+#if SERVICE_Symbols
+ if (get_context_isa(ctx, addr, &isa->isa, &isa->addr, &isa->size) < 0) return -1;
+#endif
+ return 0;
+}
+#endif
+
static Context * find_pending(pid_t pid) {
LINK * l = pending_list.next;
while (l != &pending_list) {

Back to the top