Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Leger2012-09-24 14:45:02 +0000
committerAnton Leherbauer2012-09-24 14:45:02 +0000
commit9b59f7ed4b5292f49c9e244d17365acf601d3c4f (patch)
treeb40ea338961254516fa79418622d9f4f6629580e /python/src/tcf/services/remote/DisassemblyProxy.py
parent40e77cd79e5344d6cab49acdc7808de9434668ed (diff)
downloadorg.eclipse.tcf-9b59f7ed4b5292f49c9e244d17365acf601d3c4f.tar.gz
org.eclipse.tcf-9b59f7ed4b5292f49c9e244d17365acf601d3c4f.tar.xz
org.eclipse.tcf-9b59f7ed4b5292f49c9e244d17365acf601d3c4f.zip
TCF Python: Bug 390178 - Missing APIs/properties in python services
interfaces and proxies
Diffstat (limited to 'python/src/tcf/services/remote/DisassemblyProxy.py')
-rw-r--r--python/src/tcf/services/remote/DisassemblyProxy.py32
1 files changed, 25 insertions, 7 deletions
diff --git a/python/src/tcf/services/remote/DisassemblyProxy.py b/python/src/tcf/services/remote/DisassemblyProxy.py
index 205f28d03..867c19b95 100644
--- a/python/src/tcf/services/remote/DisassemblyProxy.py
+++ b/python/src/tcf/services/remote/DisassemblyProxy.py
@@ -1,5 +1,5 @@
-# *******************************************************************************
-# * Copyright (c) 2011 Wind River Systems, Inc. and others.
+# *****************************************************************************
+# * Copyright (c) 2011, 2012 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
# * which accompanies this distribution, and is available at
@@ -7,21 +7,29 @@
# *
# * Contributors:
# * Wind River Systems - initial API and implementation
-# *******************************************************************************
+# *****************************************************************************
from tcf.services import disassembly
from tcf.channel.Command import Command
+
class DisassemblyProxy(disassembly.DisassemblyService):
+
def __init__(self, channel):
self.channel = channel
def getCapabilities(self, context_id, done):
done = self._makeCallback(done)
service = self
+
class GetCapabilitiesCommand(Command):
+
def __init__(self):
- super(GetCapabilitiesCommand, self).__init__(service.channel, service, "getCapabilities", (context_id,))
+ super(GetCapabilitiesCommand, self).__init__(service.channel,
+ service,
+ "getCapabilities",
+ (context_id,))
+
def done(self, error, args):
arr = None
if not error:
@@ -34,9 +42,16 @@ class DisassemblyProxy(disassembly.DisassemblyService):
def disassemble(self, context_id, addr, size, params, done):
done = self._makeCallback(done)
service = self
+
class DisassembleCommand(Command):
+
def __init__(self):
- super(DisassembleCommand, self).__init__(service.channel, service, "disassemble", (context_id, addr, size, params))
+ super(DisassembleCommand, self).__init__(service.channel,
+ service,
+ "disassemble",
+ (context_id, addr,
+ size, params))
+
def done(self, error, args):
arr = None
if not error:
@@ -48,11 +63,14 @@ class DisassemblyProxy(disassembly.DisassemblyService):
def _toDisassemblyArray(o):
- if o is None: return None
+ if o is None:
+ return None
return map(_toDisassemblyLine, o)
+
def _toDisassemblyLine(m):
addr = m.get("Address")
size = m.get("Size")
instruction = m.get("Instruction")
- return disassembly.DisassemblyLine(addr, size, instruction)
+ opcodeValue = m.get("OpcodeValue")
+ return disassembly.DisassemblyLine(addr, size, instruction, opcodeValue)

Back to the top