Skip to content
Snippets Groups Projects
Commit ef44cb24 authored by hjk's avatar hjk
Browse files

debugger: fix expanding pointers inside anonymous namepaces

parent 63d4115d
No related branches found
No related tags found
No related merge requests found
...@@ -1197,7 +1197,9 @@ class Dumper: ...@@ -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: ...@@ -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() ...@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment