Some quick and dirty fix for debugger/breakpoint in python3

This commit is contained in:
hakril
2020-03-29 21:41:48 +02:00
parent c691d8eb84
commit f63f7f308a
2 changed files with 12 additions and 6 deletions
+11 -5
View File
@@ -108,11 +108,17 @@ class FunctionParamDumpBPAbstract(object):
t = rt(value, cproc)
else:
t = rt(value)
if not hasattr(t, "contents"):
try:
t = t.value
except AttributeError:
pass
# Will fail in py3..
content = None
try:
content = t.contents
except Exception as e:
# contents will fail on basic type
# Not really an expected behavior
# But it works for now.. (and since a while)
pass
if content is None:
t = t.value
res[name[1]] = t
return res
+1 -1
View File
@@ -924,7 +924,7 @@ class Debugger(object):
self.add_pending_breakpoint(bp, None)
elif target is not None:
# Check that targets are accepted
if target not in self.processes.values() + self.threads.values():
if target not in list(self.processes.values()) + list(self.threads.values()):
# if target == self.target: # Original target (that have not been lauched yet)
return self.add_pending_breakpoint(bp, target)
# else: