aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Wyse2012-02-24 08:32:15 (EST)
committerAnton Leherbauer2012-02-24 08:32:15 (EST)
commitf9c2ee85fab54573ae5afc83580eb47c2baa238d (patch)
treef5646ac4c6d373bb7d7d05a7aed34542137a1ebd
parent3ca5f9dd3e39ec5d839c2a8cbfc9d3faddc313f4 (diff)
downloadorg.eclipse.tcf-f9c2ee85fab54573ae5afc83580eb47c2baa238d.zip
org.eclipse.tcf-f9c2ee85fab54573ae5afc83580eb47c2baa238d.tar.gz
org.eclipse.tcf-f9c2ee85fab54573ae5afc83580eb47c2baa238d.tar.bz2
TCF Python: Bug 372472 - Memory error handling & attached property
issues
-rw-r--r--python/src/tcf/services/processes.py4
-rw-r--r--python/src/tcf/services/remote/MemoryProxy.py6
2 files changed, 5 insertions, 5 deletions
diff --git a/python/src/tcf/services/processes.py b/python/src/tcf/services/processes.py
index e7addb3..8670fe2 100644
--- a/python/src/tcf/services/processes.py
+++ b/python/src/tcf/services/processes.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
@@ -223,7 +223,7 @@ class ProcessContext(object):
Services like IRunControl, IMemory, IBreakpoints work only with attached processes.
@return value of PROP_ATTACHED.
"""
- return self._props.get(PROP_ATTACHED)
+ return bool(self._props.get(PROP_ATTACHED))
def canTerminate(self):
"""
diff --git a/python/src/tcf/services/remote/MemoryProxy.py b/python/src/tcf/services/remote/MemoryProxy.py
index 4c6b394..07e0137 100644
--- a/python/src/tcf/services/remote/MemoryProxy.py
+++ b/python/src/tcf/services/remote/MemoryProxy.py
@@ -128,7 +128,7 @@ class MemContext(memory.MemoryContext):
class SetCommand(MemoryCommand):
def __init__(self):
super(SetCommand, self).__init__(service,
- "set", (id, addr, word_size, size, mode, bytearray(buf[offs:offs:size])))
+ "set", (id, addr, word_size, size, mode, bytearray(buf[offs:offs+size])))
def done(self, error, args):
e = None
if error:
@@ -194,9 +194,9 @@ class MemoryCommand(Command):
cmd = self.getCommandString()
if len(cmd) > 72: cmd = cmd[0:72] + "..."
e = MemoryErrorReport(
- "TCF command exception:\nCommand: %s\nException: %s\nError code: " % (
+ "TCF command exception:\nCommand: %s\nException: %s\nError code: %d" % (
cmd, self.toErrorString(data), code),
- map, addr, ranges)
+ data, addr, ranges)
caused_by = data.get(errors.ERROR_CAUSED_BY)
if caused_by is not None: e.caused_by = self.toError(caused_by, False)
return e