From 6ac8bd0c1b51caf4fb09839ddbd4dc3700da4eb1 Mon Sep 17 00:00:00 2001
From: hjk <qtc-committer@nokia.com>
Date: Thu, 27 May 2010 17:27:35 +0200
Subject: [PATCH] debugger: std::basic_string's refcount can be -1.

Reviewed-By: Oswald Buddenhagen
---
 share/qtcreator/gdbmacros/gdbmacros.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/share/qtcreator/gdbmacros/gdbmacros.py b/share/qtcreator/gdbmacros/gdbmacros.py
index 112a0176f0d..cdf16c66ab6 100644
--- a/share/qtcreator/gdbmacros/gdbmacros.py
+++ b/share/qtcreator/gdbmacros/gdbmacros.py
@@ -1816,7 +1816,7 @@ def qdump__std__string(d, item):
     rep = (data.cast(repType) - 1).dereference()
     size = rep['_M_length']
     alloc = rep['_M_capacity']
-    check(rep['_M_refcount'] >= 0)
+    check(rep['_M_refcount'] >= -1) # Can be -1 accoring to docs.
     check(0 <= size and size <= alloc and alloc <= 100*1000*1000)
     p = gdb.Value(data.cast(charType.pointer()))
     s = ""
-- 
GitLab