Commit e94c87f1 authored by hjk's avatar hjk

Debugger: More quote cosmetics

That's a follow-up to 88e79e16a6a91

Change-Id: I19725bca1c547bd961094f2d00e85e170b2be33e
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent 2fe0d85b
......@@ -733,7 +733,7 @@ class Dumper(DumperBase):
print(',time="%d"' % int(1000 * (tt - time.time())))
def parseAndEvaluate(self, exp):
#warn('EVALUATE '%s'' % exp)
#warn('EVALUATE "%s"' % exp)
try:
val = gdb.parse_and_eval(exp)
except RuntimeError as error:
......@@ -765,7 +765,7 @@ class Dumper(DumperBase):
addr = self.pokeValue(value)
#warn('PTR: %s -> %s(%s)' % (value, function, addr))
exp = '((%s*)0x%x)->%s(%s)' % (typeName, addr, function, arg)
#warn("CALL: %s" % exp)
#warn('CALL: %s' % exp)
result = gdb.parse_and_eval(exp)
#warn(' -> %s' % result)
res = self.fromNativeValue(result)
......@@ -795,8 +795,8 @@ class Dumper(DumperBase):
size = value.type.size()
data = value.data()
h = self.hexencode(data)
#warn("DATA: %s" % h
string = ''.join("\\x" + h[2*i:2*i+2] for i in range(size))
#warn('DATA: %s' % h)
string = ''.join('\\x' + h[2*i:2*i+2] for i in range(size))
exp = '(%s*)memcpy(calloc(%d, 1), "%s", %d)' \
% (value.type.name, size, string, size)
#warn('EXP: %s' % exp)
......@@ -982,7 +982,7 @@ class Dumper(DumperBase):
#oldthread = gdb.selected_thread()
#if oldthread:
# try:
# objectPrivateType = gdb.lookup_type(ns + "QObjectPrivate").pointer()
# objectPrivateType = gdb.lookup_type(ns + 'QObjectPrivate').pointer()
# inferior = self.selectedInferior()
# for thread in inferior.threads():
# thread.switch()
......
......@@ -168,7 +168,7 @@ def effective(file, line, frame):
#__all__ = ["Dumper"]
#__all__ = ['Dumper']
def find_function(funcname, filename):
cre = re.compile(r'def\s+%s\s*[(]' % re.escape(funcname))
......@@ -797,7 +797,7 @@ class Dumper:
Returns True if the normal interaction function must be called,
False otherwise."""
# self.currentbp is set in break_here if a breakpoint was hit
if getattr(self, "currentbp", False) and self.currentbp in self.commands:
if getattr(self, 'currentbp', False) and self.currentbp in self.commands:
currentbp = self.currentbp
self.currentbp = 0
lastcmd_back = self.lastcmd
......@@ -914,7 +914,7 @@ class Dumper:
"""
if not arg:
if self.breaks: # There's at least one
self.message("Num Type Disp Enb Where")
self.message('Num Type Disp Enb Where')
for bp in Breakpoint.bpbynumber:
if bp:
self.message(bp.bpformat())
......@@ -1670,7 +1670,7 @@ class Dumper:
value = args['value']
cmd = '%s=%s' % (exp, exp, value)
eval(cmd, {})
self.put('CMD: '%s'' % cmd)
self.put('CMD: "%s"' % cmd)
self.flushOutput()
def stackListFrames(self, args):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment