Commit f6bf2e97 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

simplify conditions

parent 3e01e573
......@@ -3889,12 +3889,14 @@ void GdbEngine::handleVarListChildrenHelper(const GdbMi &item,
data.setChildrenUnneeded();
data.name = _(exp);
if (isPointerType(parent.type) && data.type == data.name) {
data.exp = _("*(") + parent.exp + _c(')');
data.name = _("*") + parent.name;
} else if (data.type == data.name) {
// A type we derive from? gdb crashes when creating variables here
data.exp = parent.exp;
if (data.type == data.name) {
if (isPointerType(parent.type)) {
data.exp = _("*(") + parent.exp + _c(')');
data.name = _("*") + parent.name;
} else {
// A type we derive from? gdb crashes when creating variables here
data.exp = parent.exp;
}
} else if (exp.startsWith("*")) {
// A pointer
data.exp = _("*(") + parent.exp + _c(')');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment