GP-787: Refactored Regions,Modules/Sections,Mappings,Threads to use RowWrapped...

This commit is contained in:
Dan 2021-05-04 15:10:34 -04:00
parent 84c77bb90c
commit 085daeb39b
17 changed files with 159 additions and 149 deletions

View file

@ -0,0 +1,27 @@
/* ###
* 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.trace.model;
import ghidra.util.database.ObjectKey;
public interface TraceObject {
/**
* Get an opaque unique id for this object, whose hash is immutable
*
* @return the opaque object id
*/
ObjectKey getObjectKey();
}

View file

@ -23,29 +23,22 @@ import com.google.common.collect.Range;
import ghidra.program.model.address.Address;
import ghidra.program.model.address.AddressRange;
import ghidra.trace.model.Trace;
import ghidra.trace.model.TraceObject;
import ghidra.trace.model.thread.TraceThread;
import ghidra.util.database.ObjectKey;
import ghidra.util.exception.DuplicateNameException;
/**
* A breakpoint in a trace
*/
public interface TraceBreakpoint {
public interface TraceBreakpoint extends TraceObject {
/**
* Get the trace containning this breakpoint
* Get the trace containing this breakpoint
*
* @return the trace
*/
Trace getTrace();
/**
* Get an opaque unique id for this object, whose hash is immutable
*
* @return the opaque object id
*/
ObjectKey getObjectKey();
/**
* Get the "full name" of this breakpoint
*

View file

@ -21,12 +21,13 @@ import com.google.common.collect.Range;
import ghidra.program.model.address.*;
import ghidra.trace.model.Trace;
import ghidra.trace.model.TraceObject;
import ghidra.util.exception.DuplicateNameException;
/**
* A region of mapped target memory in a trace
*/
public interface TraceMemoryRegion {
public interface TraceMemoryRegion extends TraceObject {
/**
* Get the trace containing this region
@ -105,7 +106,8 @@ public interface TraceMemoryRegion {
/**
* @see #setLifespan(Range)
*
* @param destructionSnap the destruction snap, or {@link Long#MAX_VALUE} for "to the end of time"
* @param destructionSnap the destruction snap, or {@link Long#MAX_VALUE} for "to the end of
* time"
*/
void setDestructionSnap(long destructionSnap)
throws DuplicateNameException, TraceOverlappedRegionException;

View file

@ -21,6 +21,7 @@ import com.google.common.collect.Range;
import ghidra.program.model.address.*;
import ghidra.trace.model.Trace;
import ghidra.trace.model.TraceObject;
import ghidra.util.exception.DuplicateNameException;
/**
@ -29,7 +30,7 @@ import ghidra.util.exception.DuplicateNameException;
* <p>
* This also serves as a namespace for storing the module's sections.
*/
public interface TraceModule {
public interface TraceModule extends TraceObject {
/**
* Get the trace containing this module

View file

@ -18,12 +18,13 @@ package ghidra.trace.model.modules;
import ghidra.program.model.address.Address;
import ghidra.program.model.address.AddressRange;
import ghidra.trace.model.Trace;
import ghidra.trace.model.TraceObject;
import ghidra.util.exception.DuplicateNameException;
/**
* A section of a module in a trace
*/
public interface TraceSection {
public interface TraceSection extends TraceObject {
/**
* Get the trace containing this section

View file

@ -23,11 +23,12 @@ import ghidra.program.model.address.Address;
import ghidra.program.model.address.AddressRange;
import ghidra.program.model.listing.Program;
import ghidra.trace.model.Trace;
import ghidra.trace.model.TraceObject;
/**
* A mapped range from this trace to a Ghidra {@link Program}
*/
public interface TraceStaticMapping {
public interface TraceStaticMapping extends TraceObject {
/**
* Get the "from" trace, i.e., the trace containing this mapping

View file

@ -21,12 +21,13 @@ import com.google.common.collect.Range;
import ghidra.program.model.lang.Register;
import ghidra.trace.model.Trace;
import ghidra.trace.model.TraceObject;
import ghidra.util.exception.DuplicateNameException;
/**
* A thread in a trace
*/
public interface TraceThread {
public interface TraceThread extends TraceObject {
/**
* Get the trace containing this thread