Commit 5e5a7ca8 authored by hjk's avatar hjk
Browse files

Debugger: Work on older LLDB.



Breakpoint setting and some data examination give now
results with 167.2. Communication is not working, only
one event is handled.

Change-Id: Ice40e568ee0e9bbe0d45cde20563929b7370695d
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 848a725e
......@@ -274,6 +274,7 @@ class Dumper(DumperBase):
# self.debugger.GetCategoryAtIndex(i).SetEnabled(False)
self.isLldb = True
self.isGoodLldb = hasattr(lldb.SBValue, "SetPreferDynamicValue")
self.process = None
self.target = None
self.eventState = lldb.eStateInvalid
......@@ -319,6 +320,7 @@ class Dumper(DumperBase):
if isinstance(item.name, lldb.SBValue):
# Avoid $$__synth__ suffix on Mac.
value = item.name
if self.isGoodLldb:
value.SetPreferSyntheticValue(False)
item.name = value.GetName()
if item.name is None:
......@@ -866,6 +868,8 @@ class Dumper(DumperBase):
return result
def extractStaticMetaObject(self, typeobj):
if not self.isGoodLldb:
return 0
result = self.extractStaticMetaObjectHelper(typeobj)
if result:
return result
......@@ -903,12 +907,16 @@ class Dumper(DumperBase):
if self.currentPrintsAddress and not addr is None:
self.put('addr="0x%x",' % int(addr))
def isFunctionType(self, type):
return type.IsFunctionType()
def isFunctionType(self, typeobj):
if self.isGoodLldb:
return typeobj.IsFunctionType()
#warn("TYPE: %s" % typeobj)
return False
def putItem(self, value, tryDynamic=True):
#value = value.GetDynamicValue(lldb.eDynamicCanRunTarget)
typeName = value.GetType().GetUnqualifiedType().GetName()
if self.isGoodLldb:
value.SetPreferDynamicValue(tryDynamic)
typeClass = value.GetType().GetTypeClass()
......@@ -921,6 +929,7 @@ class Dumper(DumperBase):
summary = value.GetTypeSummary()
if summary.IsValid():
warn("DATA: %s" % summary.GetData())
if self.isGoodLldb:
value.SetPreferSyntheticValue(False)
provider = value.GetTypeSynthetic()
data = provider.GetData()
......@@ -956,6 +965,7 @@ class Dumper(DumperBase):
return
# Our turf now.
if self.isGoodLldb:
value.SetPreferSyntheticValue(False)
# Arrays
......
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