From ee77d21b0079e1b9fae83f8764703ac9cf301ac2 Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 24 Jun 2013 13:16:42 +0200 Subject: [PATCH] Debugger: Make use of {S,G}etCondition optional with LLDB Some older versions don't have it. Change-Id: Ie6e73e0bd13e7aa5a1cae8f6d1647d4695a315a8 Reviewed-by: Christian Stenger --- share/qtcreator/dumper/lbridge.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/share/qtcreator/dumper/lbridge.py b/share/qtcreator/dumper/lbridge.py index ebabb810575..86acafac7b3 100644 --- a/share/qtcreator/dumper/lbridge.py +++ b/share/qtcreator/dumper/lbridge.py @@ -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"]))