From 501f4bba34267c09076745a9c3307228308bb804 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 19 Apr 2011 11:28:02 +0200 Subject: [PATCH] debugger: prevent endless loop in resolution of some types Reviewed-by: Friedemann Kleint --- share/qtcreator/gdbmacros/dumper.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/share/qtcreator/gdbmacros/dumper.py b/share/qtcreator/gdbmacros/dumper.py index 0a953c270f6..b0bfcc37a61 100644 --- a/share/qtcreator/gdbmacros/dumper.py +++ b/share/qtcreator/gdbmacros/dumper.py @@ -120,10 +120,14 @@ def lookupType(typestring): ts = ts[9:] elif ts.startswith("enum "): ts = ts[5:] - elif ts.endswith("const"): - ts = ts[-5:] - elif ts.endswith("volatile"): - ts = ts[-8:] + elif ts.endswith(" const"): + ts = ts[:-6] + elif ts.endswith(" volatile"): + ts = ts[:-9] + elif ts.endswith("*const"): + ts = ts[:-5] + elif ts.endswith("*volatile"): + ts = ts[:-8] else: break try: