forked from qt-creator/qt-creator
		
	debugger: fix expanding pointers inside anonymous namepaces
This commit is contained in:
		@@ -1197,7 +1197,9 @@ class Dumper:
 | 
				
			|||||||
                # UCS-4:
 | 
					                # UCS-4:
 | 
				
			||||||
                self.putValue(encodeChar4Array(value, 100), Hex8EncodedBigEndian)
 | 
					                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.
 | 
					                # A function pointer.
 | 
				
			||||||
                self.putValue(str(item.value))
 | 
					                self.putValue(str(item.value))
 | 
				
			||||||
                self.putAddress(value.address)
 | 
					                self.putAddress(value.address)
 | 
				
			||||||
@@ -1274,7 +1276,7 @@ class Dumper:
 | 
				
			|||||||
            #warn("INAMES: %s " % self.expandedINames)
 | 
					            #warn("INAMES: %s " % self.expandedINames)
 | 
				
			||||||
            #warn("EXPANDED: %s " % (item.iname in 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.fields()
 | 
				
			||||||
            fields = value.type.strip_typedefs().fields()
 | 
					            fields = value.type.strip_typedefs().fields()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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()
 | 
					void testAnonymous()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    TestAnonymous a;
 | 
					    TestAnonymous a;
 | 
				
			||||||
    a.i = 1;
 | 
					    a.i = 1;
 | 
				
			||||||
    a.i = 2;
 | 
					    a.i = 2;
 | 
				
			||||||
    a.i = 3;
 | 
					    a.i = 3;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    Something s;
 | 
				
			||||||
 | 
					    s.foo();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void testFunctionPointer()
 | 
					void testFunctionPointer()
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user