Commit ee77d21b authored by hjk's avatar hjk

Debugger: Make use of {S,G}etCondition optional with LLDB

Some older versions don't have it.

Change-Id: Ie6e73e0bd13e7aa5a1cae8f6d1647d4695a315a8
Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
parent 749eec19
......@@ -1228,10 +1228,11 @@ class Dumper:
result += ',threadid="%s"' % bp.GetThreadID()
if hasattr(bp, 'IsOneShot'):
result += ',oneshot="%s"' % (1 if bp.IsOneShot() else 0)
cond = bp.GetCondition()
if hasattr(bp, 'GetCondition'):
cond = bp.GetCondition()
result += ',condition="%s"' % binascii.hexlify("" if cond is None else cond)
result += ',enabled="%s"' % (1 if bp.IsEnabled() else 0)
result += ',valid="%s"' % (1 if bp.IsValid() else 0)
result += ',condition="%s"' % binascii.hexlify("" if cond is None else cond)
result += ',ignorecount="%s"' % bp.GetIgnoreCount()
result += ',locations=['
if hasattr(bp, 'GetNumLocations'):
......@@ -1285,7 +1286,8 @@ class Dumper:
warn("UNKNOWN BREAKPOINT TYPE: %s" % bpType)
return
bpNew.SetIgnoreCount(int(args["ignorecount"]))
bpNew.SetCondition(binascii.unhexlify(args["condition"]))
if hasattr(bpNew, 'SetCondition'):
bpNew.SetCondition(binascii.unhexlify(args["condition"]))
bpNew.SetEnabled(int(args["enabled"]))
if hasattr(bpNew, 'SetOneShot'):
bpNew.SetOneShot(int(args["oneshot"]))
......
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