forked from qt-creator/qt-creator
Debugger: Relax reference counter sanity check
With C++11 we use std::atomic in the ref counter, giving yet another possibility of structure member names. Instead of trying to keep up with that, access the binary data directly. Change-Id: Iabea831689f58f83150287218bb015c824e888ca Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
@@ -804,14 +804,9 @@ class DumperBase:
|
||||
raise RuntimeError("Check failed")
|
||||
|
||||
def checkRef(self, ref):
|
||||
try:
|
||||
count = int(ref["atomic"]["_q_value"]) # Qt 5.
|
||||
minimum = -1
|
||||
except:
|
||||
count = int(ref["_q_value"]) # Qt 4.
|
||||
minimum = 0
|
||||
count = self.extractInt(ref.address)
|
||||
# Assume there aren't a million references to any object.
|
||||
self.check(count >= minimum)
|
||||
self.check(count >= -1)
|
||||
self.check(count < 1000000)
|
||||
|
||||
def readToFirstZero(self, p, tsize, maximum):
|
||||
|
||||
Reference in New Issue
Block a user