Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Khouzam2014-06-02 13:41:32 +0000
committerMarc Khouzam2014-06-02 14:50:48 +0000
commite377d6d0700360ba91e946810b44e80e3535c857 (patch)
tree6d981c1e85d972325112cbb8b594ce52d8143c21
parent86c289bd836f1ac6a3d6d522f21e347f9a45b381 (diff)
downloadorg.eclipse.cdt-e377d6d0700360ba91e946810b44e80e3535c857.tar.gz
org.eclipse.cdt-e377d6d0700360ba91e946810b44e80e3535c857.tar.xz
org.eclipse.cdt-e377d6d0700360ba91e946810b44e80e3535c857.zip
Bug 436349 - Local variables incorrectly show as "returned" in variables
view Change-Id: I916ed600f31da1c1f7da0215bac02c58ebfefb0a Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com> Reviewed-on: https://git.eclipse.org/r/27721 (cherry picked from commit 93fe0e78c34a036466a5d69bf658aebc2a8207dc) Reviewed-on: https://git.eclipse.org/r/27732
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIExpressions.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIStack.java4
2 files changed, 6 insertions, 2 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIExpressions.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIExpressions.java
index 7b66008ffac..fa9c0e3b3d3 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIExpressions.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIExpressions.java
@@ -1661,7 +1661,9 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
// When getting an MIFunctionFinishedEvent we must set
// a proper alias for the convenience variable
String resultVar = ((MIFunctionFinishedEvent)miEvent).getGDBResultVar();
- fReturnValueAliases.createAlias(stoppedEventThread, resultVar);
+ if (resultVar != null && !resultVar.isEmpty()) {
+ fReturnValueAliases.createAlias(stoppedEventThread, resultVar);
+ }
}
// Keep track of the latest method the thread is stopped in.
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIStack.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIStack.java
index 71644f5e1e2..0f88bbe7f8d 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIStack.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIStack.java
@@ -1047,7 +1047,9 @@ public class MIStack extends AbstractDsfService
String name = ((MIFunctionFinishedEvent)miEvent).getGDBResultVar();
String value = ((MIFunctionFinishedEvent)miEvent).getReturnValue();
- fThreadToReturnVariable.put(finishedEventThread, new VariableData(new MIArg(name, value)));
+ if (name != null && !name.isEmpty() && value != null && !value.isEmpty()) {
+ fThreadToReturnVariable.put(finishedEventThread, new VariableData(new MIArg(name, value)));
+ }
}
}
}

Back to the top