mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 19:42:36 +02:00
GP-1678: Create experimental object-based recorder and opinion
This commit is contained in:
parent
20706efea3
commit
032ae36005
109 changed files with 3184 additions and 481 deletions
|
@ -69,7 +69,17 @@ public abstract class AbstractDebuggerObjectModel implements SpiDebuggerObjectMo
|
|||
}
|
||||
|
||||
protected void objectInvalidated(TargetObject object) {
|
||||
creationLog.remove(object.getPath());
|
||||
synchronized (lock) {
|
||||
creationLog.remove(object.getPath());
|
||||
CompletableFuture.runAsync(() -> {
|
||||
synchronized (cbLock) {
|
||||
cbCreationLog.remove(object.getPath());
|
||||
}
|
||||
}, clientExecutor).exceptionally(ex -> {
|
||||
Msg.error(this, "Error updated objectInvalidated before callback");
|
||||
return null;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
protected void addModelRoot(SpiTargetObject root) {
|
||||
|
|
|
@ -45,6 +45,10 @@ import ghidra.dbg.target.schema.TargetAttributeType;
|
|||
@DebuggerTargetObjectIface("BreakpointSpec")
|
||||
public interface TargetBreakpointSpec extends TargetObject, /*@Transitional*/ TargetTogglable {
|
||||
|
||||
/**
|
||||
* The kinds of breakpoints understood by Ghidra. Note these must match with those in
|
||||
* {@code TraceBreakpointKind}.
|
||||
*/
|
||||
public enum TargetBreakpointKind {
|
||||
/**
|
||||
* A read breakpoint, likely implemented in hardware
|
||||
|
|
|
@ -194,6 +194,12 @@ public interface TargetMethod extends TargetObject {
|
|||
public static TargetParameterMap copyOf(Map<String, ParameterDescription<?>> map) {
|
||||
return new ImmutableTargetParameterMap(map);
|
||||
}
|
||||
|
||||
@SafeVarargs
|
||||
public static TargetParameterMap ofEntries(
|
||||
Entry<String, ParameterDescription<?>>... entries) {
|
||||
return new ImmutableTargetParameterMap(Map.ofEntries(entries));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -17,6 +17,7 @@ package ghidra.dbg.util;
|
|||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.stream.*;
|
||||
|
||||
import ghidra.async.AsyncFence;
|
||||
import ghidra.dbg.target.TargetObject;
|
||||
|
@ -278,24 +279,36 @@ public interface PathPredicates {
|
|||
}
|
||||
|
||||
/**
|
||||
* Substitute wildcards from left to right for the given list of indices
|
||||
* Substitute wildcards from left to right for the given list of keys
|
||||
*
|
||||
* <p>
|
||||
* Takes each pattern and substitutes its wildcards for the given indices, starting from the
|
||||
* left and working right. This object is unmodified, and the result is returned.
|
||||
*
|
||||
* <p>
|
||||
* If there are fewer wildcards in a pattern than given, only the left-most indices are taken.
|
||||
* If there are fewer indices than wildcards in a pattern, then the right-most wildcards are
|
||||
* left in the resulting pattern. Note while rare, attribute wildcards are substituted, too.
|
||||
* If there are fewer wildcards in a pattern than given, only the left-most keys are taken. If
|
||||
* there are fewer keys than wildcards in a pattern, then the right-most wildcards are left in
|
||||
* the resulting pattern.
|
||||
*
|
||||
* @param indices the indices to substitute
|
||||
* @param keys the keys to substitute
|
||||
* @return the pattern or matcher with the applied substitutions
|
||||
*/
|
||||
PathPredicates applyKeys(List<String> indices);
|
||||
PathPredicates applyKeys(List<String> keys);
|
||||
|
||||
default PathPredicates applyIndices(String... indices) {
|
||||
return applyKeys(List.of(indices));
|
||||
default PathPredicates applyKeys(Stream<String> keys) {
|
||||
return applyKeys(keys.collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
default PathPredicates applyKeys(String... keys) {
|
||||
return applyKeys(List.of(keys));
|
||||
}
|
||||
|
||||
default PathPredicates applyIntKeys(int radix, List<Integer> keys) {
|
||||
return applyKeys(keys.stream().map(k -> Integer.toString(k, radix)));
|
||||
}
|
||||
|
||||
default PathPredicates applyIntKeys(int... keys) {
|
||||
return applyKeys(IntStream.of(keys).mapToObj(k -> Integer.toString(k)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -20,8 +20,11 @@ import ghidra.dbg.agent.SpiTargetObject;
|
|||
import ghidra.program.model.address.*;
|
||||
|
||||
public class EmptyDebuggerObjectModel extends AbstractDebuggerObjectModel {
|
||||
protected final AddressSpace ram = new GenericAddressSpace("ram", 64, AddressSpace.TYPE_RAM, 0);
|
||||
protected final AddressFactory factory = new DefaultAddressFactory(new AddressSpace[] { ram });
|
||||
public final AddressSpace ram = new GenericAddressSpace("ram", 64, AddressSpace.TYPE_RAM, 0);
|
||||
public final AddressSpace ram3 =
|
||||
new GenericAddressSpace("ram3", 64, AddressSpace.TYPE_RAM, 0);
|
||||
protected final AddressFactory factory =
|
||||
new DefaultAddressFactory(new AddressSpace[] { ram, ram3 });
|
||||
|
||||
@Override
|
||||
public AddressFactory getAddressFactory() {
|
||||
|
|
|
@ -73,7 +73,7 @@ public class TestDebuggerModelBuilder {
|
|||
testThread1 = testProcess1.addThread(1);
|
||||
testThread2 = testProcess1.addThread(2);
|
||||
|
||||
testProcess3 = testModel.addProcess(3);
|
||||
testProcess3 = testModel.addProcess(3, testModel.ram3);
|
||||
testThread3 = testProcess3.addThread(3);
|
||||
testThread4 = testProcess3.addThread(4);
|
||||
}
|
||||
|
|
|
@ -20,9 +20,11 @@ import java.util.concurrent.*;
|
|||
|
||||
import org.jdom.JDOMException;
|
||||
|
||||
import ghidra.dbg.DebuggerModelListener;
|
||||
import ghidra.dbg.target.TargetObject;
|
||||
import ghidra.dbg.target.schema.TargetObjectSchema;
|
||||
import ghidra.dbg.target.schema.XmlSchemaContext;
|
||||
import ghidra.program.model.address.AddressSpace;
|
||||
|
||||
// TODO: Refactor with other Fake and Test model stuff.
|
||||
public class TestDebuggerObjectModel extends EmptyDebuggerObjectModel {
|
||||
|
@ -89,7 +91,15 @@ public class TestDebuggerObjectModel extends EmptyDebuggerObjectModel {
|
|||
}
|
||||
|
||||
public TestTargetProcess addProcess(int pid) {
|
||||
return session.addProcess(pid);
|
||||
return addProcess(pid, ram);
|
||||
}
|
||||
|
||||
public TestTargetProcess addProcess(int pid, AddressSpace space) {
|
||||
return session.addProcess(pid, space);
|
||||
}
|
||||
|
||||
public void removeProcess(TestTargetProcess process) {
|
||||
session.removeProcess(process);
|
||||
}
|
||||
|
||||
public <T> CompletableFuture<T> future(T t) {
|
||||
|
@ -110,4 +120,8 @@ public class TestDebuggerObjectModel extends EmptyDebuggerObjectModel {
|
|||
invalidateCachesCount = 0;
|
||||
return result;
|
||||
}
|
||||
|
||||
public DebuggerModelListener fire() {
|
||||
return listeners.fire;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,16 +32,24 @@ public class TestMimickJavaLauncher
|
|||
public TestMimickJavaLauncher(TestTargetObject parent) {
|
||||
super(parent, "Java Launcher", "Launcher");
|
||||
|
||||
setAttributes(List.of(), Map.of(TargetMethod.PARAMETERS_ATTRIBUTE_NAME, Map.of("Suspend",
|
||||
ParameterDescription.create(Boolean.class, "Suspend", false, true, "Suspend", ""),
|
||||
"Quote", ParameterDescription.create(String.class, "Quote", false, "\"", "Quote", ""),
|
||||
"Launcher",
|
||||
ParameterDescription.create(String.class, "Launcher", false, "java", "Launcher", ""),
|
||||
"Options",
|
||||
ParameterDescription.create(String.class, "Options", false, "", "Options", ""), "Main",
|
||||
ParameterDescription.create(String.class, "Main", false, "hw.HelloWorld", "Main", ""),
|
||||
"Home", ParameterDescription.create(String.class, "Home", false,
|
||||
"/opt/java-11-amazon-corretto", "Home", ""))),
|
||||
setAttributes(
|
||||
List.of(), Map.of(TargetMethod.PARAMETERS_ATTRIBUTE_NAME, TargetParameterMap.ofEntries(
|
||||
Map.entry("Suspend",
|
||||
ParameterDescription.create(Boolean.class, "Suspend", false, true, "Suspend",
|
||||
"")),
|
||||
Map.entry("Quote",
|
||||
ParameterDescription.create(String.class, "Quote", false, "\"", "Quote", "")),
|
||||
Map.entry("Launcher",
|
||||
ParameterDescription.create(String.class, "Launcher", false, "java", "Launcher",
|
||||
"")),
|
||||
Map.entry("Options",
|
||||
ParameterDescription.create(String.class, "Options", false, "", "Options", "")),
|
||||
Map.entry("Main",
|
||||
ParameterDescription.create(String.class, "Main", false, "hw.HelloWorld",
|
||||
"Main", "")),
|
||||
Map.entry("Home",
|
||||
ParameterDescription.create(String.class, "Home", false,
|
||||
"/opt/java-11-amazon-corretto", "Home", "")))),
|
||||
"Initialized");
|
||||
}
|
||||
|
||||
|
@ -52,6 +60,6 @@ public class TestMimickJavaLauncher
|
|||
|
||||
@Override
|
||||
public CompletableFuture<Void> launch(Map<String, ?> args) {
|
||||
return AsyncUtils.NIL; // TODO: Queue and allow to test complete it?
|
||||
return AsyncUtils.NIL; // TODO: Queue and allow test to complete it?
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,8 +25,8 @@ import ghidra.dbg.target.TargetBreakpointSpecContainer;
|
|||
import ghidra.program.model.address.AddressRange;
|
||||
|
||||
// TODO: Test some other breakpoint conventions:
|
||||
// A1) 1-1 spec-effective, where spec is effective is breakpoint (DONE)
|
||||
// A2) 1-n spec-effective, where effective are children of spec
|
||||
// A1) 1-1 spec-loc, where spec is loc is breakpoint (DONE)
|
||||
// A2) 1-n spec-loc, where locs are children of spec
|
||||
// B1) container per process (DONE)
|
||||
// B2) container per session
|
||||
|
||||
|
|
|
@ -24,24 +24,25 @@ import java.util.concurrent.CompletableFuture;
|
|||
import ghidra.dbg.target.TargetAccessConditioned;
|
||||
import ghidra.dbg.target.TargetMemory;
|
||||
import ghidra.generic.util.datastruct.SemisparseByteArray;
|
||||
import ghidra.program.model.address.Address;
|
||||
import ghidra.program.model.address.AddressRange;
|
||||
import ghidra.program.model.address.*;
|
||||
|
||||
public class TestTargetMemory
|
||||
extends DefaultTestTargetObject<TestTargetMemoryRegion, TestTargetProcess>
|
||||
implements TargetMemory, TargetAccessConditioned {
|
||||
|
||||
protected final SemisparseByteArray memory = new SemisparseByteArray();
|
||||
protected final AddressSpace space;
|
||||
|
||||
public TestTargetMemory(TestTargetProcess parent) {
|
||||
public TestTargetMemory(TestTargetProcess parent, AddressSpace space) {
|
||||
super(parent, "Memory", "Memory");
|
||||
this.space = space;
|
||||
changeAttributes(List.of(), Map.of(
|
||||
ACCESSIBLE_ATTRIBUTE_NAME, true //
|
||||
), "Initialized");
|
||||
}
|
||||
|
||||
public void getMemory(Address address, byte[] data) {
|
||||
assertEquals(getModel().ram, address.getAddressSpace());
|
||||
assertEquals(space, address.getAddressSpace());
|
||||
memory.getData(address.getOffset(), data);
|
||||
}
|
||||
|
||||
|
@ -57,7 +58,7 @@ public class TestTargetMemory
|
|||
}
|
||||
|
||||
public void setMemory(Address address, byte[] data) {
|
||||
assertEquals(getModel().ram, address.getAddressSpace());
|
||||
assertEquals(space, address.getAddressSpace());
|
||||
memory.putData(address.getOffset(), data);
|
||||
}
|
||||
|
||||
|
@ -77,6 +78,11 @@ public class TestTargetMemory
|
|||
return region;
|
||||
}
|
||||
|
||||
public void removeRegion(TestTargetMemoryRegion region) {
|
||||
changeElements(List.of(region.getIndex()), List.of(),
|
||||
"Remove test region: " + region.getRange());
|
||||
}
|
||||
|
||||
public boolean setAccessible(boolean accessible) {
|
||||
boolean old = isAccessible();
|
||||
changeAttributes(List.of(), Map.ofEntries(
|
||||
|
|
|
@ -22,6 +22,7 @@ import ghidra.dbg.target.TargetAggregate;
|
|||
import ghidra.dbg.target.TargetProcess;
|
||||
import ghidra.dbg.util.PathUtils;
|
||||
import ghidra.program.model.address.AddressRange;
|
||||
import ghidra.program.model.address.AddressSpace;
|
||||
|
||||
public class TestTargetProcess extends
|
||||
DefaultTestTargetObject<TestTargetProcessContainer, TestTargetObject>
|
||||
|
@ -32,10 +33,10 @@ public class TestTargetProcess extends
|
|||
public final TestTargetRegisterContainer regs;
|
||||
public final TestTargetThreadContainer threads;
|
||||
|
||||
public TestTargetProcess(DefaultTestTargetObject<?, ?> parent, int pid) {
|
||||
public TestTargetProcess(DefaultTestTargetObject<?, ?> parent, int pid, AddressSpace space) {
|
||||
super(parent, PathUtils.makeKey(PathUtils.makeIndex(pid)), "Process");
|
||||
breaks = new TestTargetBreakpointContainer(this);
|
||||
memory = new TestTargetMemory(this);
|
||||
memory = new TestTargetMemory(this, space);
|
||||
modules = new TestTargetModuleContainer(this);
|
||||
regs = new TestTargetRegisterContainer(this);
|
||||
threads = new TestTargetThreadContainer(this);
|
||||
|
|
|
@ -18,15 +18,22 @@ package ghidra.dbg.model;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import ghidra.program.model.address.AddressSpace;
|
||||
|
||||
public class TestTargetProcessContainer
|
||||
extends DefaultTestTargetObject<TestTargetProcess, TestTargetSession> {
|
||||
public TestTargetProcessContainer(TestTargetSession parent) {
|
||||
super(parent, "Processes", "Processes");
|
||||
}
|
||||
|
||||
public TestTargetProcess addProcess(int pid) {
|
||||
TestTargetProcess proc = new TestTargetProcess(this, pid);
|
||||
public TestTargetProcess addProcess(int pid, AddressSpace space) {
|
||||
TestTargetProcess proc = new TestTargetProcess(this, pid, space);
|
||||
changeElements(List.of(), List.of(proc), Map.of(), "Test Process Added");
|
||||
return proc;
|
||||
}
|
||||
|
||||
public void removeProcess(TestTargetProcess process) {
|
||||
changeElements(List.of(process.getIndex()), List.of(),
|
||||
"Test Process Removed: " + process.getPid());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
*
|
||||
* 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.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package ghidra.dbg.model;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import ghidra.dbg.target.TargetRegister;
|
||||
import ghidra.dbg.util.PathUtils;
|
||||
import ghidra.pcode.utils.Utils;
|
||||
import ghidra.program.model.lang.Register;
|
||||
import ghidra.program.model.lang.RegisterValue;
|
||||
|
||||
public class TestTargetRegisterValue
|
||||
extends DefaultTestTargetObject<TestTargetObject, AbstractTestTargetRegisterBank<?>>
|
||||
implements TargetRegister {
|
||||
|
||||
public static TestTargetRegisterValue fromRegisterValue(
|
||||
AbstractTestTargetRegisterBank<?> parent, RegisterValue rv) {
|
||||
Register register = rv.getRegister();
|
||||
return new TestTargetRegisterValue(parent, PathUtils.makeKey(register.getName()),
|
||||
register.isProgramCounter(), rv.getUnsignedValue(), register.getBitLength() + 7 / 8);
|
||||
}
|
||||
|
||||
protected final int byteLength;
|
||||
protected final boolean isPC;
|
||||
|
||||
public TestTargetRegisterValue(AbstractTestTargetRegisterBank<?> parent, String name,
|
||||
boolean isPC, BigInteger value, int byteLength) {
|
||||
this(parent, name, isPC, Utils.bigIntegerToBytes(value, byteLength, true));
|
||||
}
|
||||
|
||||
public TestTargetRegisterValue(AbstractTestTargetRegisterBank<?> parent, String name,
|
||||
boolean isPC, byte[] value) {
|
||||
super(parent, name, "Register");
|
||||
this.byteLength = value.length;
|
||||
this.isPC = isPC;
|
||||
|
||||
changeAttributes(List.of(), Map.of(
|
||||
CONTAINER_ATTRIBUTE_NAME, parent,
|
||||
LENGTH_ATTRIBUTE_NAME, byteLength,
|
||||
VALUE_ATTRIBUTE_NAME, value //
|
||||
), "Initialized");
|
||||
}
|
||||
|
||||
public void setValue(BigInteger value) {
|
||||
changeAttributes(List.of(), Map.of(
|
||||
VALUE_ATTRIBUTE_NAME, Utils.bigIntegerToBytes(value, byteLength, true) //
|
||||
), "Set value");
|
||||
}
|
||||
}
|
|
@ -17,10 +17,12 @@ package ghidra.dbg.model;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import ghidra.dbg.target.TargetSectionContainer;
|
||||
import ghidra.program.model.address.AddressRange;
|
||||
|
||||
public class TestTargetSectionContainer
|
||||
extends DefaultTestTargetObject<TestTargetSection, TestTargetModule> {
|
||||
extends DefaultTestTargetObject<TestTargetSection, TestTargetModule>
|
||||
implements TargetSectionContainer {
|
||||
|
||||
public TestTargetSectionContainer(TestTargetModule parent) {
|
||||
super(parent, "Sections", "SectionContainer");
|
||||
|
|
|
@ -25,6 +25,7 @@ import ghidra.dbg.target.*;
|
|||
import ghidra.dbg.target.TargetExecutionStateful.TargetExecutionState;
|
||||
import ghidra.dbg.target.schema.EnumerableTargetObjectSchema;
|
||||
import ghidra.dbg.target.schema.TargetObjectSchema;
|
||||
import ghidra.program.model.address.AddressSpace;
|
||||
|
||||
public class TestTargetSession extends DefaultTargetModelRoot
|
||||
implements TestTargetObject, TargetFocusScope, TargetEventScope, TargetLauncher {
|
||||
|
@ -51,8 +52,12 @@ public class TestTargetSession extends DefaultTargetModelRoot
|
|||
"Initialized");
|
||||
}
|
||||
|
||||
public TestTargetProcess addProcess(int pid) {
|
||||
return processes.addProcess(pid);
|
||||
public TestTargetProcess addProcess(int pid, AddressSpace space) {
|
||||
return processes.addProcess(pid, space);
|
||||
}
|
||||
|
||||
public void removeProcess(TestTargetProcess process) {
|
||||
processes.removeProcess(process);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -38,6 +38,10 @@ public class TestTargetStack extends DefaultTestTargetObject<TestTargetStackFram
|
|||
return frame;
|
||||
}
|
||||
|
||||
public TestTargetStackFrameNoRegisterBank pushFrameNoBank(Address pc) {
|
||||
return pushFrame(new TestTargetStackFrameNoRegisterBank(this, elements.size(), pc));
|
||||
}
|
||||
|
||||
/**
|
||||
* Push a new frame onto the stack where the register bank is a child attribute
|
||||
*
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
*
|
||||
* 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.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package ghidra.dbg.model;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import ghidra.dbg.util.PathUtils;
|
||||
import ghidra.program.model.address.Address;
|
||||
|
||||
public class TestTargetStackFrameNoRegisterBank extends
|
||||
DefaultTestTargetObject<TestTargetObject, TestTargetStack> implements TestTargetStackFrame {
|
||||
protected Address pc;
|
||||
|
||||
public TestTargetStackFrameNoRegisterBank(TestTargetStack parent, int level, Address pc) {
|
||||
super(parent, PathUtils.makeKey(PathUtils.makeIndex(level)), "Frame");
|
||||
|
||||
changeAttributes(List.of(), Map.of(
|
||||
PC_ATTRIBUTE_NAME, this.pc = pc //
|
||||
), "Initialized");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFromFrame(TestTargetStackFrame frame) {
|
||||
TestTargetStackFrameNoRegisterBank that = (TestTargetStackFrameNoRegisterBank) frame;
|
||||
this.pc = that.pc;
|
||||
changeAttributes(List.of(), Map.of(
|
||||
PC_ATTRIBUTE_NAME, this.pc //
|
||||
), "Copied frame");
|
||||
}
|
||||
|
||||
public void setPC(Address pc) {
|
||||
this.pc = pc;
|
||||
changeAttributes(List.of(), Map.of(
|
||||
PC_ATTRIBUTE_NAME, this.pc //
|
||||
), "PC Updated");
|
||||
}
|
||||
}
|
|
@ -34,7 +34,7 @@ public class TestTargetThreadContainer
|
|||
return thread;
|
||||
}
|
||||
|
||||
public void removeThreads(TestTargetThread[] threads) {
|
||||
public void removeThreads(TestTargetThread... threads) {
|
||||
List<String> indices =
|
||||
Stream.of(threads).map(TargetObject::getIndex).collect(Collectors.toList());
|
||||
changeElements(indices, List.of(), Map.of(), "Test Threads Removed");
|
||||
|
|
|
@ -211,7 +211,7 @@ public abstract class AbstractModelHost implements ModelHost, DebuggerModelTestU
|
|||
PathPredicates matcher = model.getRootSchema()
|
||||
.getSuccessorSchema(seedPath)
|
||||
.searchFor(cls, seedPath, true)
|
||||
.applyIndices(index);
|
||||
.applyKeys(index);
|
||||
if (matcher.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -10,17 +10,16 @@
|
|||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
||||
<attribute name="_update_mode" schema="UPDATE_MODE" hidden="yes" />
|
||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_value" schema="ANY" hidden="yes" />
|
||||
<attribute name="_type" schema="STRING" hidden="yes" />
|
||||
<attribute name="_order" schema="INT" hidden="yes" />
|
||||
<attribute name="_state" schema="EXECUTION_STATE" required="yes" hidden="yes" />
|
||||
<attribute name="_prompt" schema="STRING" required="yes" hidden="yes" />
|
||||
<attribute name="Environment" schema="Environment" />
|
||||
<attribute name="Processes" schema="ProcessContainer" required="yes" fixed="yes" />
|
||||
<attribute name="Interpreter" schema="Interpreter" />
|
||||
<attribute name="JavaMimic" schema="Launcher" />
|
||||
<attribute name="Environment" schema="Environment" />
|
||||
<attribute name="Processes" schema="ProcessContainer" required="yes" fixed="yes" />
|
||||
<attribute name="Interpreter" schema="Interpreter" />
|
||||
<attribute name="JavaMimic" schema="Launcher" />
|
||||
<attribute schema="ANY" />
|
||||
</schema>
|
||||
<schema name="Environment" elementResync="NEVER" attributeResync="NEVER">
|
||||
|
@ -29,7 +28,6 @@
|
|||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
||||
<attribute name="_update_mode" schema="UPDATE_MODE" hidden="yes" />
|
||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_value" schema="ANY" hidden="yes" />
|
||||
<attribute name="_type" schema="STRING" hidden="yes" />
|
||||
|
@ -46,7 +44,6 @@
|
|||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
||||
<attribute name="_update_mode" schema="UPDATE_MODE" hidden="yes" />
|
||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_value" schema="ANY" hidden="yes" />
|
||||
<attribute name="_type" schema="STRING" hidden="yes" />
|
||||
|
@ -60,7 +57,6 @@
|
|||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
||||
<attribute name="_update_mode" schema="UPDATE_MODE" hidden="yes" />
|
||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_value" schema="ANY" hidden="yes" />
|
||||
<attribute name="_type" schema="STRING" hidden="yes" />
|
||||
|
@ -77,7 +73,6 @@
|
|||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
||||
<attribute name="_update_mode" schema="UPDATE_MODE" hidden="yes" />
|
||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_value" schema="ANY" hidden="yes" />
|
||||
<attribute name="_type" schema="STRING" hidden="yes" />
|
||||
|
@ -92,7 +87,6 @@
|
|||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
||||
<attribute name="_update_mode" schema="UPDATE_MODE" hidden="yes" />
|
||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_value" schema="ANY" hidden="yes" />
|
||||
<attribute name="_type" schema="STRING" hidden="yes" />
|
||||
|
@ -102,12 +96,12 @@
|
|||
<attribute name="Modules" schema="ModuleContainer" required="yes" fixed="yes" />
|
||||
<attribute name="Registers" schema="RegisterContainer" required="yes" fixed="yes" />
|
||||
<attribute name="Threads" schema="ThreadContainer" required="yes" fixed="yes" />
|
||||
<attribute name="Devices" schema="OBJECT" />
|
||||
<attribute name="Environment" schema="OBJECT" />
|
||||
<attribute name="Handle" schema="OBJECT" />
|
||||
<attribute name="Id" schema="OBJECT" />
|
||||
<attribute name="Io" schema="OBJECT" />
|
||||
<attribute name="Name" schema="OBJECT" />
|
||||
<attribute name="Devices" schema="OBJECT" />
|
||||
<attribute name="Environment" schema="OBJECT" />
|
||||
<attribute name="Handle" schema="OBJECT" />
|
||||
<attribute name="Id" schema="OBJECT" />
|
||||
<attribute name="Io" schema="OBJECT" />
|
||||
<attribute name="Name" schema="OBJECT" />
|
||||
<attribute schema="ANY" />
|
||||
</schema>
|
||||
<schema name="Memory" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||
|
@ -116,7 +110,6 @@
|
|||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
||||
<attribute name="_update_mode" schema="UPDATE_MODE" hidden="yes" />
|
||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_value" schema="ANY" hidden="yes" />
|
||||
<attribute name="_type" schema="STRING" hidden="yes" />
|
||||
|
@ -132,7 +125,6 @@
|
|||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
||||
<attribute name="_update_mode" schema="UPDATE_MODE" hidden="yes" />
|
||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_value" schema="ANY" hidden="yes" />
|
||||
<attribute name="_type" schema="STRING" hidden="yes" />
|
||||
|
@ -146,7 +138,6 @@
|
|||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
||||
<attribute name="_update_mode" schema="UPDATE_MODE" hidden="yes" />
|
||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_value" schema="ANY" hidden="yes" />
|
||||
<attribute name="_type" schema="STRING" hidden="yes" />
|
||||
|
@ -164,7 +155,6 @@
|
|||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
||||
<attribute name="_update_mode" schema="UPDATE_MODE" hidden="yes" />
|
||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_value" schema="ANY" hidden="yes" />
|
||||
<attribute name="_type" schema="STRING" hidden="yes" />
|
||||
|
@ -188,7 +178,6 @@
|
|||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
||||
<attribute name="_update_mode" schema="UPDATE_MODE" hidden="yes" />
|
||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_value" schema="ANY" hidden="yes" />
|
||||
<attribute name="_type" schema="STRING" hidden="yes" />
|
||||
|
@ -198,9 +187,9 @@
|
|||
<attribute name="_supported_step_kinds" schema="SET_STEP_KIND" required="yes" fixed="yes" hidden="yes" />
|
||||
<attribute name="Stack" schema="Stack" required="yes" fixed="yes" />
|
||||
<attribute name="RegisterBank" schema="RegisterBank" fixed="yes" />
|
||||
<attribute name="Environment" schema="OBJECT" />
|
||||
<attribute name="Id" schema="OBJECT" />
|
||||
<attribute name="Name" schema="OBJECT" />
|
||||
<attribute name="Environment" schema="OBJECT" />
|
||||
<attribute name="Id" schema="OBJECT" />
|
||||
<attribute name="Name" schema="OBJECT" />
|
||||
<attribute name="_arch" schema="STRING" />
|
||||
<attribute schema="ANY" />
|
||||
</schema>
|
||||
|
@ -212,7 +201,6 @@
|
|||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
||||
<attribute name="_update_mode" schema="UPDATE_MODE" hidden="yes" />
|
||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_value" schema="ANY" hidden="yes" />
|
||||
<attribute name="_type" schema="STRING" hidden="yes" />
|
||||
|
@ -223,6 +211,33 @@
|
|||
<attribute name="Len" schema="OBJECT" />
|
||||
<attribute name="Name" schema="OBJECT" />
|
||||
<attribute name="Size" schema="OBJECT" />
|
||||
<attribute name="Sections" schema="SectionContainer" />
|
||||
<attribute schema="ANY" />
|
||||
</schema>
|
||||
<schema name="SectionContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||
<interface name="SectionContainer" />
|
||||
<element schema="Section" />
|
||||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_value" schema="ANY" hidden="yes" />
|
||||
<attribute name="_type" schema="STRING" hidden="yes" />
|
||||
<attribute name="_order" schema="INT" hidden="yes" />
|
||||
<attribute schema="ANY" />
|
||||
</schema>
|
||||
<schema name="Section" elementResync="NEVER" attributeResync="NEVER">
|
||||
<interface name="Section" />
|
||||
<element schema="VOID" />
|
||||
<attribute name="_module" schema="Module" hidden="yes" />
|
||||
<attribute name="_range" schema="RANGE" hidden="yes" />
|
||||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_value" schema="ANY" hidden="yes" />
|
||||
<attribute name="_type" schema="STRING" hidden="yes" />
|
||||
<attribute name="_order" schema="INT" hidden="yes" />
|
||||
<attribute schema="ANY" />
|
||||
</schema>
|
||||
<schema name="BreakpointContainer" canonical="yes" elementResync="NEVER" attributeResync="NEVER">
|
||||
|
@ -233,7 +248,6 @@
|
|||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
||||
<attribute name="_update_mode" schema="UPDATE_MODE" hidden="yes" />
|
||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_value" schema="ANY" hidden="yes" />
|
||||
<attribute name="_type" schema="STRING" hidden="yes" />
|
||||
|
@ -246,7 +260,6 @@
|
|||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
||||
<attribute name="_update_mode" schema="UPDATE_MODE" hidden="yes" />
|
||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_value" schema="ANY" hidden="yes" />
|
||||
<attribute name="_type" schema="STRING" hidden="yes" />
|
||||
|
@ -260,7 +273,6 @@
|
|||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
||||
<attribute name="_update_mode" schema="UPDATE_MODE" hidden="yes" />
|
||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_value" schema="ANY" hidden="yes" />
|
||||
<attribute name="_type" schema="STRING" hidden="yes" />
|
||||
|
@ -275,7 +287,6 @@
|
|||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
||||
<attribute name="_update_mode" schema="UPDATE_MODE" hidden="yes" />
|
||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_value" schema="ANY" hidden="yes" />
|
||||
<attribute name="_type" schema="STRING" hidden="yes" />
|
||||
|
@ -287,7 +298,6 @@
|
|||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
||||
<attribute name="_update_mode" schema="UPDATE_MODE" hidden="yes" />
|
||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_value" schema="ANY" hidden="yes" />
|
||||
<attribute name="_type" schema="STRING" hidden="yes" />
|
||||
|
@ -310,7 +320,6 @@
|
|||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
||||
<attribute name="_update_mode" schema="UPDATE_MODE" hidden="yes" />
|
||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_value" schema="ANY" hidden="yes" />
|
||||
<attribute name="_type" schema="STRING" hidden="yes" />
|
||||
|
@ -328,7 +337,6 @@
|
|||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
||||
<attribute name="_update_mode" schema="UPDATE_MODE" hidden="yes" />
|
||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_value" schema="ANY" hidden="yes" />
|
||||
<attribute name="_type" schema="STRING" hidden="yes" />
|
||||
|
@ -342,18 +350,17 @@
|
|||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
||||
<attribute name="_update_mode" schema="UPDATE_MODE" hidden="yes" />
|
||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_value" schema="ANY" hidden="yes" />
|
||||
<attribute name="_type" schema="STRING" hidden="yes" />
|
||||
<attribute name="_order" schema="INT" hidden="yes" />
|
||||
<attribute name="FrameNumber" schema="OBJECT" />
|
||||
<attribute name="FrameOffset" schema="OBJECT" />
|
||||
<attribute name="FuncTableEntry" schema="OBJECT" />
|
||||
<attribute name="InstructionOffset" schema="OBJECT" />
|
||||
<attribute name="ReturnOffset" schema="OBJECT" />
|
||||
<attribute name="StackOffset" schema="OBJECT" />
|
||||
<attribute name="Virtual" schema="OBJECT" />
|
||||
<attribute name="FrameNumber" schema="OBJECT" />
|
||||
<attribute name="FrameOffset" schema="OBJECT" />
|
||||
<attribute name="FuncTableEntry" schema="OBJECT" />
|
||||
<attribute name="InstructionOffset" schema="OBJECT" />
|
||||
<attribute name="ReturnOffset" schema="OBJECT" />
|
||||
<attribute name="StackOffset" schema="OBJECT" />
|
||||
<attribute name="Virtual" schema="OBJECT" />
|
||||
<attribute schema="ANY" />
|
||||
</schema>
|
||||
<schema name="Symbol" elementResync="NEVER" attributeResync="NEVER">
|
||||
|
@ -365,7 +372,6 @@
|
|||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
||||
<attribute name="_update_mode" schema="UPDATE_MODE" hidden="yes" />
|
||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_value" schema="ADDRESS" hidden="yes" />
|
||||
<attribute name="_type" schema="STRING" hidden="yes" />
|
||||
|
@ -380,13 +386,10 @@
|
|||
<attribute name="_modified" schema="BOOL" hidden="yes" />
|
||||
<attribute name="_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_kind" schema="STRING" fixed="yes" hidden="yes" />
|
||||
<attribute name="_update_mode" schema="UPDATE_MODE" hidden="yes" />
|
||||
<attribute name="_short_display" schema="STRING" hidden="yes" />
|
||||
<attribute name="_value" schema="ANY" required="yes" hidden="yes" />
|
||||
<attribute name="_type" schema="STRING" hidden="yes" />
|
||||
<attribute name="_order" schema="INT" hidden="yes" />
|
||||
<attribute schema="VOID" />
|
||||
</schema>
|
||||
<schema name="UPDATE_MODE" elementResync="NEVER" attributeResync="NEVER">
|
||||
</schema>
|
||||
</context>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue