| Summary: | Incorrect handling of namespaces in debugger | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Martin Jakl <martin.jakl> |
| Component: | cdt-debug-dsf-gdb | Assignee: | Project Inbox <cdt-debug-dsf-gdb-inbox> |
| Status: | RESOLVED DUPLICATE | QA Contact: | Marc Khouzam <marc.khouzam> |
| Severity: | critical | ||
| Priority: | P3 | CC: | aegges, pawel.1.piech, stuart.i.campbell |
| Version: | 7.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
Can you add a snippet of code to reproduce the problem? Just create new C++ project and add this code:
#include <string>
namespace test {
class testbase {
public:
testbase() : str("test") {}
private:
std::string str;
};
class test : public testbase {
};
}
int main(void)
{
test::test t;
return 0;
}
Now debug it and make one step. Go to variables windows and expand t and test::testbase and click on str. You get error message "Failed to execute MI command:
-data-evaluate-expression "((((test::testbase) t)).str)"
Error message from debugger back end:
A syntax error in expression, near `t)).str)'."
When you right click str and select watch and then edit the expression to be: (((('test::testbase') t)).str), than you'll get the value.
Looks like a duplicate of bug #308678 Thanks Axel, it does indeed look like a duplicate. *** This bug has been marked as a duplicate of bug 308678 *** |
CDT asks gdb incorrectly for member variables in base classes when namespace is defined. When I click on such variable in Variables window I get error: Failed to execute MI command: -data-evaluate-expression "(((*(palo::Commitable*) ((server).px))).comm_name)" Error message from debugger back end: A syntax error in expression, near `) ((server).px))).comm_name)'. That's because gdb requires quotation marks aroud type with namespace like: (((*('palo::Commitable'*) ((server).px))).comm_name) -- Configuration Details -- Product: Eclipse 1.3.0.20100617-0520 (org.eclipse.epp.package.linuxtools.product) Installed Features: org.eclipse.platform 3.6.0.v20100602-9gF78GpqFt6trOGhL60z0oEx3fz-JKNwxPY