debugger: do not offer expansion for inaccessible items

Change-Id: Ib8607377e36dbf51aa38b32a18491ec3437a2387
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
hjk
2012-05-31 12:11:02 +02:00
committed by hjk
parent fa41d2faad
commit 0576fa01fa

View File

@@ -365,8 +365,11 @@ class SubItem:
def __exit__(self, exType, exValue, exTraceBack): def __exit__(self, exType, exValue, exTraceBack):
#warn(" CURRENT VALUE: %s %s %s" % (self.d.currentValue, #warn(" CURRENT VALUE: %s %s %s" % (self.d.currentValue,
# self.d.currentValueEncoding, self.d.currentValuePriority)) # self.d.currentValueEncoding, self.d.currentValuePriority))
if self.d.passExceptions and not exType is None: if not exType is None:
if self.d.passExceptions:
showException("SUBITEM", exType, exValue, exTraceBack) showException("SUBITEM", exType, exValue, exTraceBack)
self.d.putNumChild(0)
self.d.putValue("<not accessible>")
try: try:
#warn("TYPE VALUE: %s" % self.d.currentValue) #warn("TYPE VALUE: %s" % self.d.currentValue)
typeName = stripClassTag(self.d.currentType) typeName = stripClassTag(self.d.currentType)
@@ -451,8 +454,11 @@ class Children:
self.d.put("children=[") self.d.put("children=[")
def __exit__(self, exType, exValue, exTraceBack): def __exit__(self, exType, exValue, exTraceBack):
if self.d.passExceptions and not exType is None: if not exType is None:
if self.d.passExceptions:
showException("CHILDREN", exType, exValue, exTraceBack) showException("CHILDREN", exType, exValue, exTraceBack)
self.d.putNumChild(0)
self.d.putValue("<not accessible>")
if not self.d.currentMaxNumChild is None: if not self.d.currentMaxNumChild is None:
if self.d.currentMaxNumChild < self.d.currentNumChild: if self.d.currentMaxNumChild < self.d.currentNumChild:
self.d.put('{name="<incomplete>",value="",type="",numchild="0"},') self.d.put('{name="<incomplete>",value="",type="",numchild="0"},')