Merge remote-tracking branch 'origin/Ghidra_11.1'

This commit is contained in:
Ryan Kurtz 2024-05-24 08:11:23 -04:00
commit 973bbfc9d3
16 changed files with 27 additions and 35 deletions

View file

@ -200,9 +200,6 @@ public class DWARFImporter {
/** /**
* Imports DWARF information according to the {@link DWARFImportOptions} set. * Imports DWARF information according to the {@link DWARFImportOptions} set.
* <p>
* {@link DWARFProgram#checkPreconditions(TaskMonitor)} must be called before this.
* <p>
* @return * @return
* @throws IOException * @throws IOException
* @throws DWARFException * @throws DWARFException

View file

@ -36,7 +36,6 @@ public class DWARFStringOffsetTableHeader extends DWARFIndirectTableHeader {
/** /**
* Reads a string offset table header (found in the .debug_str_offsets section) * Reads a string offset table header (found in the .debug_str_offsets section)
* *
* @param dprog {@link DWARFProgram}
* @param reader {@link BinaryReader} * @param reader {@link BinaryReader}
* @return new {@link DWARFStringOffsetTableHeader} instance * @return new {@link DWARFStringOffsetTableHeader} instance
* @throws IOException if error reading * @throws IOException if error reading

View file

@ -166,8 +166,9 @@ public class FillOutStructureHelper {
} }
/** /**
* Retrieve the component map that was generated when structure was created using decomiler info. * Retrieve the component map that was generated when structure was created using decompiler
* Results are not valid until {@link #processStructure(HighVariable, Function, boolean)} is invoked. * info. Results are not valid until
* {@link #processStructure(HighVariable, Function, boolean, boolean)} is invoked.
* @return componentMap * @return componentMap
*/ */
public NoisyStructureBuilder getComponentMap() { public NoisyStructureBuilder getComponentMap() {
@ -177,7 +178,8 @@ public class FillOutStructureHelper {
/** /**
* Retrieve the offset/pcodeOp pairs that are used to store data into the variable * Retrieve the offset/pcodeOp pairs that are used to store data into the variable
* used to fill-out structure. * used to fill-out structure.
* Results are not valid until {@link #processStructure(HighVariable, Function, boolean)} is invoked. * Results are not valid until
* {@link #processStructure(HighVariable, Function, boolean, boolean)} is invoked.
* @return the pcodeOps doing the storing to the associated variable * @return the pcodeOps doing the storing to the associated variable
*/ */
public List<OffsetPcodeOpPair> getStorePcodeOps() { public List<OffsetPcodeOpPair> getStorePcodeOps() {
@ -187,7 +189,8 @@ public class FillOutStructureHelper {
/** /**
* Retrieve the offset/pcodeOp pairs that are used to load data from the variable * Retrieve the offset/pcodeOp pairs that are used to load data from the variable
* used to fill-out structure. * used to fill-out structure.
* Results are not valid until {@link #processStructure(HighVariable, Function, boolean)} is invoked. * Results are not valid until
* {@link #processStructure(HighVariable, Function, boolean, boolean)} is invoked.
* @return the pcodeOps doing the loading from the associated variable * @return the pcodeOps doing the loading from the associated variable
*/ */
public List<OffsetPcodeOpPair> getLoadPcodeOps() { public List<OffsetPcodeOpPair> getLoadPcodeOps() {

View file

@ -116,8 +116,9 @@ public class MenuData {
} }
/** /**
* Returns the menu path as a string. This method filters accelerator chars('&') from the path. * Returns the menu path as a string. This method filters accelerator chars('&amp;') from the
* @return the menu path as a string without unescaped '&' chars * path.
* @return the menu path as a string without unescaped '&amp;' chars
*/ */
public String getMenuPathDisplayString() { public String getMenuPathDisplayString() {
if (menuPath == null || menuPath.length == 0) { if (menuPath == null || menuPath.length == 0) {

View file

@ -1082,7 +1082,7 @@ public interface Span<N, S extends Span<N, S>> extends Comparable<S> {
} }
/** /**
* Provides a default {@link #toString} implementation * Provides a default {@link Object#toString} implementation
* *
* @return the string * @return the string
*/ */

View file

@ -92,7 +92,7 @@ import utility.function.Callback;
* *
* or if you also need the event (to get the domainObject that is the event source) * or if you also need the event (to get the domainObject that is the event source)
* *
* <PRE * <PRE>
* new DomainObjectListenerBuilder() * new DomainObjectListenerBuilder()
* .each(DomainObjectEvent.PROPERTY_CHANGED).call((e, r) -> processPropertyChanged(e, r)) * .each(DomainObjectEvent.PROPERTY_CHANGED).call((e, r) -> processPropertyChanged(e, r))
* .withRecord(ProgramChangeRecord.class) * .withRecord(ProgramChangeRecord.class)

View file

@ -39,8 +39,10 @@ public abstract class AbstractAssemblyResolution implements AssemblyResolution {
/** /**
* Construct a resolution * Construct a resolution
* *
* @param factory the factory
* @param description a textual description used as part of {@link #toString()} * @param description a textual description used as part of {@link #toString()}
* @param children for record keeping, any children used in constructing this resolution * @param children for record keeping, any children used in constructing this resolution
* @param right the right sibling
*/ */
protected AbstractAssemblyResolution(AbstractAssemblyResolutionFactory<?, ?> factory, protected AbstractAssemblyResolution(AbstractAssemblyResolutionFactory<?, ?> factory,
String description, List<? extends AssemblyResolution> children, 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 * Get this same resolution, but with the given right sibling
* *
* @param right the right sibling
* @return the resolution * @return the resolution
*/ */
public abstract AssemblyResolution withRight(AssemblyResolution right); public abstract AssemblyResolution withRight(AssemblyResolution right);

View file

@ -19,8 +19,6 @@ import java.util.*;
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;
import ghidra.app.plugin.assembler.sleigh.expr.*; 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.Constructor;
import ghidra.app.plugin.processors.sleigh.expression.PatternExpression; import ghidra.app.plugin.processors.sleigh.expression.PatternExpression;
import ghidra.app.plugin.processors.sleigh.pattern.DisjointPattern; 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 * 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 * @return the new resolution set
*/ */
protected AssemblyResolutionResults singleton(AssemblyResolution one) { 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 * a special case, if {@code bits == 0}, the goal is considered fully-defined (as if
* {@code bits == 64}). * {@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, protected AssemblyResolution solveOrBackfill(PatternExpression exp, long goal, int bits,
Map<String, Long> vals, AssemblyResolvedPatterns cur, String description) { Map<String, Long> vals, AssemblyResolvedPatterns cur, String description) {

View file

@ -41,7 +41,6 @@ public interface AssemblyResolution extends Comparable<AssemblyResolution> {
* include in {@link #toString()}, it must override this method to return true when such * include in {@link #toString()}, it must override this method to return true when such
* children are present. * children are present.
* *
* @see #childrenToString(String)
* @return true if this record has children * @return true if this record has children
*/ */
boolean hasChildren(); boolean hasChildren();

View file

@ -17,6 +17,7 @@ package ghidra.app.plugin.assembler.sleigh.sem;
import java.util.Map; import java.util.Map;
import ghidra.app.plugin.assembler.sleigh.expr.NeedsBackfillException;
import ghidra.app.plugin.assembler.sleigh.expr.RecursiveDescentSolver; import ghidra.app.plugin.assembler.sleigh.expr.RecursiveDescentSolver;
public interface AssemblyResolvedBackfill extends AssemblyResolution { public interface AssemblyResolvedBackfill extends AssemblyResolution {

View file

@ -90,8 +90,8 @@ public interface AssemblyResolvedPatterns extends AssemblyResolution {
/** /**
* Decode a portion of the instruction block * Decode a portion of the instruction block
* *
* @param start the first byte to decode * @param byteStart the first byte to decode
* @param len the number of bytes to decode * @param size the number of bytes to decode
* @return the read masked value * @return the read masked value
* @see AssemblyPatternBlock#readBytes(int, int) * @see AssemblyPatternBlock#readBytes(int, int)
*/ */
@ -126,7 +126,8 @@ public interface AssemblyResolvedPatterns extends AssemblyResolution {
* Check if this and another resolution have equal encodings * Check if this and another resolution have equal encodings
* *
* <p> * <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 * @param that the other resolution
* @return true if both have equal encodings * @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 * Create a copy of this resolution with a new description
* *
* @param desc the new description * @param description the new description
* @return the copy * @return the copy
*/ */
AssemblyResolvedPatterns withDescription(String description); AssemblyResolvedPatterns withDescription(String description);
@ -177,7 +178,7 @@ public interface AssemblyResolvedPatterns extends AssemblyResolution {
* This combines corresponding pattern blocks (assuming they agree), collects backfill records, * This combines corresponding pattern blocks (assuming they agree), collects backfill records,
* and collects forbidden patterns. * and collects forbidden patterns.
* *
* @param that the other resolution * @param pat the other resolution
* @return the result if successful, or null * @return the result if successful, or null
*/ */
AssemblyResolvedPatterns combine(AssemblyResolvedPatterns pat); 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 * <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. * 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 * @return the result
*/ */
AssemblyResolvedPatterns truncate(int shamt); AssemblyResolvedPatterns truncate(int shamt);

View file

@ -49,9 +49,6 @@ public class DefaultAssemblyResolvedError extends AbstractAssemblyResolution
return true; return true;
} }
/**
* @see AssemblyResolution#error(String, String, List)
*/
protected DefaultAssemblyResolvedError(AbstractAssemblyResolutionFactory<?, ?> factory, protected DefaultAssemblyResolvedError(AbstractAssemblyResolutionFactory<?, ?> factory,
String description, List<? extends AssemblyResolution> children, String description, List<? extends AssemblyResolution> children,
AssemblyResolution right, String error) { AssemblyResolution right, String error) {

View file

@ -62,10 +62,6 @@ public class DefaultAssemblyResolvedPatterns extends AbstractAssemblyResolution
protected final Set<AssemblyResolvedBackfill> backfills; protected final Set<AssemblyResolvedBackfill> backfills;
protected final Set<AssemblyResolvedPatterns> forbids; protected final Set<AssemblyResolvedPatterns> forbids;
/**
* @see AssemblyResolution#resolved(AssemblyPatternBlock, AssemblyPatternBlock, String,
* Constructor, List, AssemblyResolution)
*/
protected DefaultAssemblyResolvedPatterns(AbstractAssemblyResolutionFactory<?, ?> factory, protected DefaultAssemblyResolvedPatterns(AbstractAssemblyResolutionFactory<?, ?> factory,
String description, Constructor cons, List<? extends AssemblyResolution> children, String description, Constructor cons, List<? extends AssemblyResolution> children,
AssemblyResolution right, AssemblyPatternBlock ins, AssemblyPatternBlock ctx, AssemblyResolution right, AssemblyPatternBlock ins, AssemblyPatternBlock ctx,

View file

@ -273,13 +273,11 @@ public class ReDisassembler {
/** /**
* Parse the next instructions, including delay-slotted ones * 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 * @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 parsed. Without delay slots, the first instruction is the last
* instruction. * instruction.
* @throws CancelledException * @throws CancelledException
* @throws AddressOverflowException if an instruction would run past the end of the address
* space
*/ */
protected Flow nextInstructionsWithDelays(Flow flow) throws CancelledException { protected Flow nextInstructionsWithDelays(Flow flow) throws CancelledException {
Instruction instruction = nextInstruction(flow, false); Instruction instruction = nextInstruction(flow, false);

View file

@ -84,7 +84,6 @@ public class StringRenderBuilder {
* escape sequences, depending on the RENDER_ENUM setting. * escape sequences, depending on the RENDER_ENUM setting.
* *
* @param bb {@link ByteBuffer} containing bytes of a string * @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 renderSetting {@link RENDER_ENUM}
* @param trimTrailingNulls boolean flag, if true trailing null bytes will not be included * @param trimTrailingNulls boolean flag, if true trailing null bytes will not be included
* in the rendered output * in the rendered output

View file

@ -84,7 +84,7 @@ public class HighFunctionDBUtil {
COMMIT, 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. * unless it is {@link VoidDataType} in which case keep existing function return parameter.
*/ */
COMMIT_NO_VOID; COMMIT_NO_VOID;