forked from qt-creator/qt-creator
Debugger: More quote cosmetics
That's a follow-up to 88e79e16a6a91 Change-Id: I19725bca1c547bd961094f2d00e85e170b2be33e Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -733,7 +733,7 @@ class Dumper(DumperBase):
|
|||||||
print(',time="%d"' % int(1000 * (tt - time.time())))
|
print(',time="%d"' % int(1000 * (tt - time.time())))
|
||||||
|
|
||||||
def parseAndEvaluate(self, exp):
|
def parseAndEvaluate(self, exp):
|
||||||
#warn('EVALUATE '%s'' % exp)
|
#warn('EVALUATE "%s"' % exp)
|
||||||
try:
|
try:
|
||||||
val = gdb.parse_and_eval(exp)
|
val = gdb.parse_and_eval(exp)
|
||||||
except RuntimeError as error:
|
except RuntimeError as error:
|
||||||
@@ -765,7 +765,7 @@ class Dumper(DumperBase):
|
|||||||
addr = self.pokeValue(value)
|
addr = self.pokeValue(value)
|
||||||
#warn('PTR: %s -> %s(%s)' % (value, function, addr))
|
#warn('PTR: %s -> %s(%s)' % (value, function, addr))
|
||||||
exp = '((%s*)0x%x)->%s(%s)' % (typeName, addr, function, arg)
|
exp = '((%s*)0x%x)->%s(%s)' % (typeName, addr, function, arg)
|
||||||
#warn("CALL: %s" % exp)
|
#warn('CALL: %s' % exp)
|
||||||
result = gdb.parse_and_eval(exp)
|
result = gdb.parse_and_eval(exp)
|
||||||
#warn(' -> %s' % result)
|
#warn(' -> %s' % result)
|
||||||
res = self.fromNativeValue(result)
|
res = self.fromNativeValue(result)
|
||||||
@@ -795,8 +795,8 @@ class Dumper(DumperBase):
|
|||||||
size = value.type.size()
|
size = value.type.size()
|
||||||
data = value.data()
|
data = value.data()
|
||||||
h = self.hexencode(data)
|
h = self.hexencode(data)
|
||||||
#warn("DATA: %s" % h
|
#warn('DATA: %s' % h)
|
||||||
string = ''.join("\\x" + h[2*i:2*i+2] for i in range(size))
|
string = ''.join('\\x' + h[2*i:2*i+2] for i in range(size))
|
||||||
exp = '(%s*)memcpy(calloc(%d, 1), "%s", %d)' \
|
exp = '(%s*)memcpy(calloc(%d, 1), "%s", %d)' \
|
||||||
% (value.type.name, size, string, size)
|
% (value.type.name, size, string, size)
|
||||||
#warn('EXP: %s' % exp)
|
#warn('EXP: %s' % exp)
|
||||||
@@ -982,7 +982,7 @@ class Dumper(DumperBase):
|
|||||||
#oldthread = gdb.selected_thread()
|
#oldthread = gdb.selected_thread()
|
||||||
#if oldthread:
|
#if oldthread:
|
||||||
# try:
|
# try:
|
||||||
# objectPrivateType = gdb.lookup_type(ns + "QObjectPrivate").pointer()
|
# objectPrivateType = gdb.lookup_type(ns + 'QObjectPrivate').pointer()
|
||||||
# inferior = self.selectedInferior()
|
# inferior = self.selectedInferior()
|
||||||
# for thread in inferior.threads():
|
# for thread in inferior.threads():
|
||||||
# thread.switch()
|
# thread.switch()
|
||||||
|
@@ -168,7 +168,7 @@ def effective(file, line, frame):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#__all__ = ["Dumper"]
|
#__all__ = ['Dumper']
|
||||||
|
|
||||||
def find_function(funcname, filename):
|
def find_function(funcname, filename):
|
||||||
cre = re.compile(r'def\s+%s\s*[(]' % re.escape(funcname))
|
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,
|
Returns True if the normal interaction function must be called,
|
||||||
False otherwise."""
|
False otherwise."""
|
||||||
# self.currentbp is set in break_here if a breakpoint was hit
|
# 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
|
currentbp = self.currentbp
|
||||||
self.currentbp = 0
|
self.currentbp = 0
|
||||||
lastcmd_back = self.lastcmd
|
lastcmd_back = self.lastcmd
|
||||||
@@ -914,7 +914,7 @@ class Dumper:
|
|||||||
"""
|
"""
|
||||||
if not arg:
|
if not arg:
|
||||||
if self.breaks: # There's at least one
|
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:
|
for bp in Breakpoint.bpbynumber:
|
||||||
if bp:
|
if bp:
|
||||||
self.message(bp.bpformat())
|
self.message(bp.bpformat())
|
||||||
@@ -1670,7 +1670,7 @@ class Dumper:
|
|||||||
value = args['value']
|
value = args['value']
|
||||||
cmd = '%s=%s' % (exp, exp, value)
|
cmd = '%s=%s' % (exp, exp, value)
|
||||||
eval(cmd, {})
|
eval(cmd, {})
|
||||||
self.put('CMD: '%s'' % cmd)
|
self.put('CMD: "%s"' % cmd)
|
||||||
self.flushOutput()
|
self.flushOutput()
|
||||||
|
|
||||||
def stackListFrames(self, args):
|
def stackListFrames(self, args):
|
||||||
|
Reference in New Issue
Block a user