mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 10:19:23 +02:00
Merge remote-tracking branch 'origin/Ghidra_11.1'
This commit is contained in:
commit
973bbfc9d3
16 changed files with 27 additions and 35 deletions
|
@ -39,8 +39,10 @@ public abstract class AbstractAssemblyResolution implements AssemblyResolution {
|
|||
/**
|
||||
* Construct a resolution
|
||||
*
|
||||
* @param factory the factory
|
||||
* @param description a textual description used as part of {@link #toString()}
|
||||
* @param children for record keeping, any children used in constructing this resolution
|
||||
* @param right the right sibling
|
||||
*/
|
||||
protected AbstractAssemblyResolution(AbstractAssemblyResolutionFactory<?, ?> factory,
|
||||
String description, List<? extends AssemblyResolution> children,
|
||||
|
@ -149,6 +151,7 @@ public abstract class AbstractAssemblyResolution implements AssemblyResolution {
|
|||
/**
|
||||
* Get this same resolution, but with the given right sibling
|
||||
*
|
||||
* @param right the right sibling
|
||||
* @return the resolution
|
||||
*/
|
||||
public abstract AssemblyResolution withRight(AssemblyResolution right);
|
||||
|
|
|
@ -19,8 +19,6 @@ import java.util.*;
|
|||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
import ghidra.app.plugin.assembler.sleigh.expr.*;
|
||||
import ghidra.app.plugin.assembler.sleigh.sem.AbstractAssemblyResolutionFactory.AbstractAssemblyResolvedBackfillBuilder;
|
||||
import ghidra.app.plugin.assembler.sleigh.sem.AbstractAssemblyResolutionFactory.AbstractAssemblyResolvedPatternsBuilder;
|
||||
import ghidra.app.plugin.processors.sleigh.Constructor;
|
||||
import ghidra.app.plugin.processors.sleigh.expression.PatternExpression;
|
||||
import ghidra.app.plugin.processors.sleigh.pattern.DisjointPattern;
|
||||
|
@ -142,7 +140,7 @@ public abstract class AbstractAssemblyResolutionFactory< //
|
|||
/**
|
||||
* Construct an immutable single-entry result set consisting of the one given resolution
|
||||
*
|
||||
* @param rp the single resolution entry
|
||||
* @param one the single resolution entry
|
||||
* @return the new resolution set
|
||||
*/
|
||||
protected AssemblyResolutionResults singleton(AssemblyResolution one) {
|
||||
|
@ -185,7 +183,7 @@ public abstract class AbstractAssemblyResolutionFactory< //
|
|||
* a special case, if {@code bits == 0}, the goal is considered fully-defined (as if
|
||||
* {@code bits == 64}).
|
||||
*
|
||||
* @see #solveOrBackfill(PatternExpression, MaskedLong, AssemblyResolvedPatterns, String)
|
||||
* @see #solveOrBackfill(PatternExpression, MaskedLong, Map, AssemblyResolvedPatterns, String)
|
||||
*/
|
||||
protected AssemblyResolution solveOrBackfill(PatternExpression exp, long goal, int bits,
|
||||
Map<String, Long> vals, AssemblyResolvedPatterns cur, String description) {
|
||||
|
|
|
@ -41,7 +41,6 @@ public interface AssemblyResolution extends Comparable<AssemblyResolution> {
|
|||
* include in {@link #toString()}, it must override this method to return true when such
|
||||
* children are present.
|
||||
*
|
||||
* @see #childrenToString(String)
|
||||
* @return true if this record has children
|
||||
*/
|
||||
boolean hasChildren();
|
||||
|
|
|
@ -17,6 +17,7 @@ package ghidra.app.plugin.assembler.sleigh.sem;
|
|||
|
||||
import java.util.Map;
|
||||
|
||||
import ghidra.app.plugin.assembler.sleigh.expr.NeedsBackfillException;
|
||||
import ghidra.app.plugin.assembler.sleigh.expr.RecursiveDescentSolver;
|
||||
|
||||
public interface AssemblyResolvedBackfill extends AssemblyResolution {
|
||||
|
|
|
@ -90,8 +90,8 @@ public interface AssemblyResolvedPatterns extends AssemblyResolution {
|
|||
/**
|
||||
* Decode a portion of the instruction block
|
||||
*
|
||||
* @param start the first byte to decode
|
||||
* @param len the number of bytes to decode
|
||||
* @param byteStart the first byte to decode
|
||||
* @param size the number of bytes to decode
|
||||
* @return the read masked value
|
||||
* @see AssemblyPatternBlock#readBytes(int, int)
|
||||
*/
|
||||
|
@ -126,7 +126,8 @@ public interface AssemblyResolvedPatterns extends AssemblyResolution {
|
|||
* Check if this and another resolution have equal encodings
|
||||
*
|
||||
* <p>
|
||||
* This is like {@link #equals(Object)}, but it ignores backfill records and forbidden patterns.
|
||||
* This is like {@link Object#equals(Object)}, but it ignores backfill records and forbidden
|
||||
* patterns.
|
||||
*
|
||||
* @param that the other resolution
|
||||
* @return true if both have equal encodings
|
||||
|
@ -145,7 +146,7 @@ public interface AssemblyResolvedPatterns extends AssemblyResolution {
|
|||
/**
|
||||
* Create a copy of this resolution with a new description
|
||||
*
|
||||
* @param desc the new description
|
||||
* @param description the new description
|
||||
* @return the copy
|
||||
*/
|
||||
AssemblyResolvedPatterns withDescription(String description);
|
||||
|
@ -177,7 +178,7 @@ public interface AssemblyResolvedPatterns extends AssemblyResolution {
|
|||
* This combines corresponding pattern blocks (assuming they agree), collects backfill records,
|
||||
* and collects forbidden patterns.
|
||||
*
|
||||
* @param that the other resolution
|
||||
* @param pat the other resolution
|
||||
* @return the result if successful, or null
|
||||
*/
|
||||
AssemblyResolvedPatterns combine(AssemblyResolvedPatterns pat);
|
||||
|
@ -312,7 +313,7 @@ public interface AssemblyResolvedPatterns extends AssemblyResolution {
|
|||
* <b>NOTE:</b> This drops all backfill and forbidden pattern records, since this method is
|
||||
* typically used to read token fields rather than passed around for resolution.
|
||||
*
|
||||
* @param amt the number of bytes to remove from the left
|
||||
* @param shamt the number of bytes to remove from the left
|
||||
* @return the result
|
||||
*/
|
||||
AssemblyResolvedPatterns truncate(int shamt);
|
||||
|
|
|
@ -49,9 +49,6 @@ public class DefaultAssemblyResolvedError extends AbstractAssemblyResolution
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see AssemblyResolution#error(String, String, List)
|
||||
*/
|
||||
protected DefaultAssemblyResolvedError(AbstractAssemblyResolutionFactory<?, ?> factory,
|
||||
String description, List<? extends AssemblyResolution> children,
|
||||
AssemblyResolution right, String error) {
|
||||
|
|
|
@ -62,10 +62,6 @@ public class DefaultAssemblyResolvedPatterns extends AbstractAssemblyResolution
|
|||
protected final Set<AssemblyResolvedBackfill> backfills;
|
||||
protected final Set<AssemblyResolvedPatterns> forbids;
|
||||
|
||||
/**
|
||||
* @see AssemblyResolution#resolved(AssemblyPatternBlock, AssemblyPatternBlock, String,
|
||||
* Constructor, List, AssemblyResolution)
|
||||
*/
|
||||
protected DefaultAssemblyResolvedPatterns(AbstractAssemblyResolutionFactory<?, ?> factory,
|
||||
String description, Constructor cons, List<? extends AssemblyResolution> children,
|
||||
AssemblyResolution right, AssemblyPatternBlock ins, AssemblyPatternBlock ctx,
|
||||
|
|
|
@ -273,13 +273,11 @@ public class ReDisassembler {
|
|||
/**
|
||||
* Parse the next instructions, including delay-slotted ones
|
||||
*
|
||||
* @param address the starting address
|
||||
* @param flow the {@link Flow}
|
||||
* @return the if the first instruction has fall-through, the flow out from the last
|
||||
* instruction parsed. Without delay slots, the first instruction is the last
|
||||
* instruction.
|
||||
* @throws CancelledException
|
||||
* @throws AddressOverflowException if an instruction would run past the end of the address
|
||||
* space
|
||||
*/
|
||||
protected Flow nextInstructionsWithDelays(Flow flow) throws CancelledException {
|
||||
Instruction instruction = nextInstruction(flow, false);
|
||||
|
|
|
@ -84,7 +84,6 @@ public class StringRenderBuilder {
|
|||
* escape sequences, depending on the RENDER_ENUM setting.
|
||||
*
|
||||
* @param bb {@link ByteBuffer} containing bytes of a string
|
||||
* @param cs {@link Charset} that should be used to decode the bytes
|
||||
* @param renderSetting {@link RENDER_ENUM}
|
||||
* @param trimTrailingNulls boolean flag, if true trailing null bytes will not be included
|
||||
* in the rendered output
|
||||
|
|
|
@ -84,7 +84,7 @@ public class HighFunctionDBUtil {
|
|||
COMMIT,
|
||||
|
||||
/**
|
||||
* {@value #COMMIT_NO_VOID} - commit return parameter as defined by {@link HighFunction}
|
||||
* {@link #COMMIT_NO_VOID} - commit return parameter as defined by {@link HighFunction}
|
||||
* unless it is {@link VoidDataType} in which case keep existing function return parameter.
|
||||
*/
|
||||
COMMIT_NO_VOID;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue