Ghidra is a software reverse engineering (SRE) framework
GP-6940 - Fixed a bug in function editor namespace combo box when tabbing from signature
dragonmacher31ff8bd60087
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/editor/FunctionDataView.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/editor/FunctionDataView.javaindex 065f85bf95..4e4d00cc63 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/editor/FunctionDataView.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/editor/FunctionDataView.java@@ -17,6 +17,7 @@ package ghidra.app.plugin.core.function.editor;import java.util.*;+import generic.json.Json;import ghidra.program.model.data.VoidDataType;import ghidra.program.model.lang.PrototypeModel;import ghidra.program.model.listing.*;@@ -80,6 +81,11 @@ class FunctionDataView {callFixupName = otherFunctionData.callFixupName;}+ @Override+ public String toString() {+ return Json.toString(this);+ }+@Overridepublic boolean equals(Object obj) {if (!(obj instanceof FunctionDataView otherFunctionData)) {diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/editor/FunctionEditorModel.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/editor/FunctionEditorModel.javaindex f683704386..00aae64f51 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/editor/FunctionEditorModel.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/editor/FunctionEditorModel.java@@ -1050,8 +1050,16 @@ public class FunctionEditorModel {// ignore}- Namespace ns = createNamespace(result.namespace());+ // We allow the user to omit the namespace when parsing the signature. If the value is+ // null, then don't change the current value. Assume any non-null value is a valid choice.+ Namespace ns = functionData.getNamespace();+ SymbolPath nsPath = result.namespace();+ if (nsPath != null) {+ ns = createNamespace(result.namespace());+ }+setFunctionData(ns, f);+isInParsingMode = false;}