diff --git a/Ghidra/Debug/Framework-Debugging/src/main/java/ghidra/dbg/target/schema/TargetObjectSchema.java b/Ghidra/Debug/Framework-Debugging/src/main/java/ghidra/dbg/target/schema/TargetObjectSchema.java
index 1bb65a4cf2..52b26f9eca 100644
--- a/Ghidra/Debug/Framework-Debugging/src/main/java/ghidra/dbg/target/schema/TargetObjectSchema.java
+++ b/Ghidra/Debug/Framework-Debugging/src/main/java/ghidra/dbg/target/schema/TargetObjectSchema.java
@@ -907,7 +907,9 @@ public interface TargetObjectSchema {
return false;
}
AttributeSchema schema = getAttributeSchema(key);
- if (schema == AttributeSchema.DEFAULT_ANY || schema == AttributeSchema.DEFAULT_OBJECT) {
+ if (schema == AttributeSchema.DEFAULT_ANY ||
+ schema == AttributeSchema.DEFAULT_OBJECT ||
+ schema == AttributeSchema.DEFAULT_VOID) {
// FIXME: Remove this hack once we stop depending on this prefix
return key.startsWith(TargetObject.PREFIX_INVISIBLE);
}
diff --git a/Ghidra/Debug/Framework-TraceModeling/src/test/java/ghidra/trace/database/target/DBTraceObjectManagerTest.java b/Ghidra/Debug/Framework-TraceModeling/src/test/java/ghidra/trace/database/target/DBTraceObjectManagerTest.java
index dc47257532..e46af9b1d2 100644
--- a/Ghidra/Debug/Framework-TraceModeling/src/test/java/ghidra/trace/database/target/DBTraceObjectManagerTest.java
+++ b/Ghidra/Debug/Framework-TraceModeling/src/test/java/ghidra/trace/database/target/DBTraceObjectManagerTest.java
@@ -46,6 +46,7 @@ public class DBTraceObjectManagerTest extends AbstractGhidraHeadlessIntegrationT
+
@@ -1063,4 +1064,33 @@ public class DBTraceObjectManagerTest extends AbstractGhidraHeadlessIntegrationT
assertFalse(split.isDeleted()); // Other values not affected
}
}
+
+ @Test
+ public void testAttributeDefaultVisibility() {
+ try (Transaction tx = b.startTransaction()) {
+ TraceObjectValue rootVal =
+ manager.createRootObject(ctx.getSchema(new SchemaName("Session")));
+ root = rootVal.getChild();
+
+ TraceObject object = manager.createObject(TraceObjectKeyPath.parse("OutsideSchema"));
+ object.insert(Lifespan.ALL, ConflictResolution.DENY);
+ assertFalse(object.getCanonicalParent(0).isHidden());
+
+ TraceObject elemOutside =
+ manager.createObject(TraceObjectKeyPath.parse("OutsideSchema[0]"));
+ elemOutside.insert(Lifespan.ALL, ConflictResolution.DENY);
+ assertFalse(elemOutside.getCanonicalParent(0).isHidden());
+
+ TraceObject attrOutside =
+ manager.createObject(TraceObjectKeyPath.parse("OutsideSchema.Attr"));
+ attrOutside.insert(Lifespan.ALL, ConflictResolution.DENY);
+ assertFalse(attrOutside.getCanonicalParent(0).isHidden());
+
+ // TODO: This underscore convention is deprecated, but still in use
+ TraceObject hiddenOutside =
+ manager.createObject(TraceObjectKeyPath.parse("OutsideSchema._Attr"));
+ hiddenOutside.insert(Lifespan.ALL, ConflictResolution.DENY);
+ assertTrue(hiddenOutside.getCanonicalParent(0).isHidden());
+ }
+ }
}