mirror of
https://github.com/NationalSecurityAgency/ghidra
synced 2024-08-27 21:10:26 +00:00
GP-0: Add Features SystemEmulation to javadocs.
This commit is contained in:
parent
3903a92829
commit
d0a0bce226
|
@ -17,6 +17,7 @@ apply from: "${rootProject.projectDir}/gradle/javaProject.gradle"
|
|||
apply from: "${rootProject.projectDir}/gradle/jacocoProject.gradle"
|
||||
apply from: "${rootProject.projectDir}/gradle/javaTestProject.gradle"
|
||||
apply from: "${rootProject.projectDir}/gradle/distributableGhidraModule.gradle"
|
||||
apply from: "${rootProject.projectDir}/gradle/javadoc.gradle"
|
||||
|
||||
apply plugin: 'eclipse'
|
||||
eclipse.project.name = 'Features SystemEmulation'
|
||||
|
|
|
@ -37,12 +37,13 @@ import ghidra.program.model.symbol.*;
|
|||
*
|
||||
* <p>
|
||||
* A system call library is a collection of p-code executable routines, invoked by a system call
|
||||
* dispatcher. That dispatcher is represented by {@link #syscall(PcodeExecutor)}, and is exported as
|
||||
* a sleigh userop. If this interface is "mixed in" with {@link AnnotatedPcodeUseropLibrary}, that
|
||||
* userop is automatically included in the userop library. The simplest means of implementing a
|
||||
* syscall library is probably via {@link AnnotatedEmuSyscallUseropLibrary}. It implements this
|
||||
* interface and extends {@link AnnotatedPcodeUseropLibrary}. In addition, it provides its own
|
||||
* annotation system for exporting userops as system calls.
|
||||
* dispatcher. That dispatcher is represented by
|
||||
* {@link #syscall(PcodeExecutor, PcodeUseropLibrary)}, and is exported as a sleigh userop. If this
|
||||
* interface is "mixed in" with {@link AnnotatedPcodeUseropLibrary}, that userop is automatically
|
||||
* included in the userop library. The simplest means of implementing a syscall library is probably
|
||||
* via {@link AnnotatedEmuSyscallUseropLibrary}. It implements this interface and extends
|
||||
* {@link AnnotatedPcodeUseropLibrary}. In addition, it provides its own annotation system for
|
||||
* exporting userops as system calls.
|
||||
*
|
||||
* @param <T> the type of data processed by the system calls, typically {@code byte[]}
|
||||
*/
|
||||
|
@ -141,7 +142,8 @@ public interface EmuSyscallLibrary<T> extends PcodeUseropLibrary<T> {
|
|||
}
|
||||
|
||||
/**
|
||||
* The {@link EmuSyscallLibrary#syscall(PcodeExecutor)} method wrapped as a userop definition
|
||||
* The {@link EmuSyscallLibrary#syscall(PcodeExecutor, PcodeUseropLibrary)} method wrapped as a
|
||||
* userop definition
|
||||
*
|
||||
* @param <T> the type of data processed by the userop, typically {@code byte[]}
|
||||
*/
|
||||
|
@ -207,8 +209,8 @@ public interface EmuSyscallLibrary<T> extends PcodeUseropLibrary<T> {
|
|||
* database. Until then, we require system-specific implementations.
|
||||
*
|
||||
* @param state the executor's state
|
||||
* @param the reason for reading state, probably {@link Reason#EXECUTE}, but should be taken
|
||||
* from the executor
|
||||
* @param reason the reason for reading state, probably {@link Reason#EXECUTE_READ}, but should
|
||||
* be taken from the executor
|
||||
* @return the system call number
|
||||
*/
|
||||
long readSyscallNumber(PcodeExecutorState<T> state, Reason reason);
|
||||
|
@ -233,7 +235,7 @@ public interface EmuSyscallLibrary<T> extends PcodeUseropLibrary<T> {
|
|||
* <p>
|
||||
* The executor's state must already be prepared according to the relevant system calling
|
||||
* conventions. This will determine the system call number, according to
|
||||
* {@link #readSyscallNumber(PcodeExecutorStatePiece)}, retrieve the relevant system call
|
||||
* {@link #readSyscallNumber(PcodeExecutorState, Reason)}, retrieve the relevant system call
|
||||
* definition, and invoke it.
|
||||
*
|
||||
* @param executor the executor
|
||||
|
|
|
@ -42,7 +42,7 @@ public abstract class AbstractEmuUnixFile<T> implements EmuUnixFile<T> {
|
|||
* TODO: Technically, a file can be hardlinked to several pathnames, but for simplicity, or for
|
||||
* diagnostics, we let the file know its own original name.
|
||||
*
|
||||
* @see AbstractEmuUnixFileSystem#newFile(String)
|
||||
* @see AbstractEmuUnixFileSystem#newFile(String, int)
|
||||
* @param pathname the pathname of the file
|
||||
* @param mode the mode of the file
|
||||
*/
|
||||
|
|
|
@ -347,7 +347,6 @@ public abstract class AbstractEmuUnixSyscallUseropLibrary<T>
|
|||
* This just throws an exception, which the overall simulator or script should catch.
|
||||
*
|
||||
* @param status the status code
|
||||
* @return never
|
||||
* @throws EmuProcessExitedException always
|
||||
*/
|
||||
@PcodeUserop
|
||||
|
|
|
@ -35,7 +35,7 @@ public abstract class AbstractStreamEmuUnixFileHandle<T> implements EmuUnixFileD
|
|||
/**
|
||||
* Construct a new handle
|
||||
*
|
||||
* @see AbstractEmuUnixSyscallUseropLibrary#createHandle(int, EmuUnixFile, int)
|
||||
* @see AbstractEmuUnixSyscallUseropLibrary#createHandle(EmuUnixFile, int)
|
||||
* @param machine the machine emulating the hardware
|
||||
* @param cSpec the ABI of the target platform
|
||||
*/
|
||||
|
|
|
@ -43,7 +43,7 @@ public class DefaultEmuUnixFileHandle<T> implements EmuUnixFileDescriptor<T> {
|
|||
/**
|
||||
* Construct a new handle on the given file
|
||||
*
|
||||
* @see AbstractEmuUnixSyscallUseropLibrary#createHandle(int, EmuUnixFile, int)
|
||||
* @see AbstractEmuUnixSyscallUseropLibrary#createHandle(EmuUnixFile, int)
|
||||
* @param machine the machine emulating the hardware
|
||||
* @param cSpec the ABI of the target platform
|
||||
* @param file the file opened by this handle
|
||||
|
|
|
@ -90,7 +90,7 @@ public interface EmuUnixFileSystem<T> {
|
|||
* A factory for constructing a new file (without adding it to the file system)
|
||||
*
|
||||
* @param pathname the path of the file
|
||||
* @param the mode of the new file
|
||||
* @param mode the mode of the new file
|
||||
* @return the new file
|
||||
* @throws EmuIOException if the file cannot be constructed
|
||||
*/
|
||||
|
|
|
@ -76,7 +76,6 @@ public class IOStreamEmuUnixFileHandle extends AbstractStreamEmuUnixFileHandle<b
|
|||
* @param cSpec the ABI of the target platform
|
||||
* @param input the stream representing the input side of the descriptor, if applicable
|
||||
* @param output the stream representing the output side of the descriptor, if applicable
|
||||
* @return the proxy's handle
|
||||
*/
|
||||
public IOStreamEmuUnixFileHandle(PcodeMachine<byte[]> machine, CompilerSpec cSpec,
|
||||
InputStream input, OutputStream output) {
|
||||
|
|
|
@ -1574,7 +1574,7 @@ public class StructuredSleigh {
|
|||
*
|
||||
* <pre>
|
||||
* Var arr = lang("r0", "/int *");
|
||||
* for (int i = 1; i < 16; i++) {
|
||||
* for (int i = 1; i < 16; i++) {
|
||||
* arr.index(i).deref().set(arr.index(0).deref());
|
||||
* }
|
||||
* </pre>
|
||||
|
@ -1904,8 +1904,7 @@ public class StructuredSleigh {
|
|||
*
|
||||
* <p>
|
||||
* The default is to log a warning and continue. If permitted to continue, the resulting type
|
||||
* will be {@code void}, likely resulting in more issues. See
|
||||
* {@link #computeDerefType(DataType)}.
|
||||
* will be {@code void}, likely resulting in more issues. See {@link #computeDerefType(RVal)}.
|
||||
*
|
||||
* @param addr the value being dereferenced
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue