diff --git a/share/qtcreator/gdbmacros/dumper.py b/share/qtcreator/gdbmacros/dumper.py
index 83b28ac89c03b8ef645642672b89772676c2b7ff..1a766383b71befc2f4f74bb506052571540b73d1 100644
--- a/share/qtcreator/gdbmacros/dumper.py
+++ b/share/qtcreator/gdbmacros/dumper.py
@@ -1197,7 +1197,9 @@ class Dumper:
                 # UCS-4:
                 self.putValue(encodeChar4Array(value, 100), Hex8EncodedBigEndian)
 
-            if (not isHandled) and str(type.strip_typedefs()).find("(") != -1:
+            strippedType = str(type.strip_typedefs()) \
+                .replace("(anonymous namespace)", "")
+            if (not isHandled) and strippedType.find("(") != -1:
                 # A function pointer.
                 self.putValue(str(item.value))
                 self.putAddress(value.address)
@@ -1274,7 +1276,7 @@ class Dumper:
             #warn("INAMES: %s " % self.expandedINames)
             #warn("EXPANDED: %s " % (item.iname in self.expandedINames))
 
-            # insufficient, see http://sourceware.org/bugzilla/show_bug.cgi?id=10953
+            # Insufficient, see http://sourceware.org/bugzilla/show_bug.cgi?id=10953
             #fields = value.type.fields()
             fields = value.type.strip_typedefs().fields()
 
diff --git a/tests/manual/gdbdebugger/simple/app.cpp b/tests/manual/gdbdebugger/simple/app.cpp
index de48922e251a0cf865ccfd3682257630b05b41a9..d43f037a14ff6a1db37d4dc501accc5b941696cf 100644
--- a/tests/manual/gdbdebugger/simple/app.cpp
+++ b/tests/manual/gdbdebugger/simple/app.cpp
@@ -265,12 +265,32 @@ void testPeekAndPoke3()
 
 }
 
+namespace { // anon
+
+struct Something
+{
+    Something() { a = b = 1; }
+
+    void foo()
+    {
+        a = 42;
+        b = 43;
+    }
+
+    int a, b;
+};
+
+} // anon
+
 void testAnonymous()
 {
     TestAnonymous a;
     a.i = 1;
     a.i = 2;
     a.i = 3;
+
+    Something s;
+    s.foo();
 }
 
 void testFunctionPointer()