diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/util/OldLanguage.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/util/OldLanguage.java
index 7c3fee1822..1d2459058e 100644
--- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/util/OldLanguage.java
+++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/util/OldLanguage.java
@@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -478,7 +478,16 @@ class OldLanguage implements Language {
}
if ("segmented_space".equals(elementName)) {
- space = new SegmentedAddressSpace(name, unique);
+ String segmentType = childElement.getAttributeValue("type");
+ if (segmentType == null) {
+ throw new SAXException("Missing required segmented_space 'type' attribute");
+ }
+ if (segmentType.equals("protected")) {
+ space = new ProtectedAddressSpace(name, unique);
+ }
+ else {
+ space = new SegmentedAddressSpace(name, unique);
+ }
}
else {
String typeStr = childElement.getAttributeValue("type");
diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/util/OldLanguageFactory.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/util/OldLanguageFactory.java
index 43604345ce..c7f9112395 100644
--- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/util/OldLanguageFactory.java
+++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/util/OldLanguageFactory.java
@@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -323,6 +323,12 @@ public class OldLanguageFactory {
Element element;
if (space instanceof SegmentedAddressSpace) {
element = new Element("segmented_space");
+ if (space instanceof ProtectedAddressSpace) {
+ element.setAttribute("type", "protected");
+ }
+ else {
+ element.setAttribute("type", "real");
+ }
element.setAttribute("name", space.getName());
}
else {
diff --git a/Ghidra/Processors/x86/data/languages/old/x86RealV1.lang b/Ghidra/Processors/x86/data/languages/old/x86RealV1.lang
index 532523794a..9640b13997 100644
--- a/Ghidra/Processors/x86/data/languages/old/x86RealV1.lang
+++ b/Ghidra/Processors/x86/data/languages/old/x86RealV1.lang
@@ -6,7 +6,7 @@
-
+
diff --git a/Ghidra/Processors/x86/data/languages/old/x86RealV2.lang b/Ghidra/Processors/x86/data/languages/old/x86RealV2.lang
index dddcc38d9f..3f5362fe5d 100644
--- a/Ghidra/Processors/x86/data/languages/old/x86RealV2.lang
+++ b/Ghidra/Processors/x86/data/languages/old/x86RealV2.lang
@@ -8,7 +8,7 @@
-
+
diff --git a/Ghidra/Processors/x86/data/languages/old/x86RealV3.lang b/Ghidra/Processors/x86/data/languages/old/x86RealV3.lang
index bf92e72e6e..5ca93809cb 100644
--- a/Ghidra/Processors/x86/data/languages/old/x86RealV3.lang
+++ b/Ghidra/Processors/x86/data/languages/old/x86RealV3.lang
@@ -8,7 +8,7 @@
-
+
diff --git a/Ghidra/Processors/x86/data/languages/old/x86_ProtV2.lang b/Ghidra/Processors/x86/data/languages/old/x86_ProtV2.lang
index 20b7be0d7e..cac7ab1199 100644
--- a/Ghidra/Processors/x86/data/languages/old/x86_ProtV2.lang
+++ b/Ghidra/Processors/x86/data/languages/old/x86_ProtV2.lang
@@ -8,7 +8,7 @@
-
+
diff --git a/Ghidra/Processors/x86/data/languages/old/x86_ProtV3.lang b/Ghidra/Processors/x86/data/languages/old/x86_ProtV3.lang
index 36ede108a3..1d3d5e70c3 100644
--- a/Ghidra/Processors/x86/data/languages/old/x86_ProtV3.lang
+++ b/Ghidra/Processors/x86/data/languages/old/x86_ProtV3.lang
@@ -8,7 +8,7 @@
-
+
diff --git a/Ghidra/Processors/x86/data/languages/old/x86smmV1.lang b/Ghidra/Processors/x86/data/languages/old/x86smmV1.lang
index ac64bb671a..6d37decbb5 100644
--- a/Ghidra/Processors/x86/data/languages/old/x86smmV1.lang
+++ b/Ghidra/Processors/x86/data/languages/old/x86smmV1.lang
@@ -6,7 +6,8 @@
-
+
+
diff --git a/Ghidra/Processors/x86/data/languages/old/x86smmV2.lang b/Ghidra/Processors/x86/data/languages/old/x86smmV2.lang
index 4f712ac711..0cbeed25dc 100644
--- a/Ghidra/Processors/x86/data/languages/old/x86smmV2.lang
+++ b/Ghidra/Processors/x86/data/languages/old/x86smmV2.lang
@@ -8,7 +8,7 @@
-
+
diff --git a/Ghidra/Processors/x86/data/languages/old/x86smmV3.lang b/Ghidra/Processors/x86/data/languages/old/x86smmV3.lang
index ce5e5bd7ca..99a208197c 100644
--- a/Ghidra/Processors/x86/data/languages/old/x86smmV3.lang
+++ b/Ghidra/Processors/x86/data/languages/old/x86smmV3.lang
@@ -8,7 +8,7 @@
-
+