GP-0: Add Features SystemEmulation to javadocs.

This commit is contained in:
Dan 2023-12-11 13:44:28 -05:00
parent 3903a92829
commit d0a0bce226
9 changed files with 19 additions and 19 deletions

View file

@ -17,6 +17,7 @@ apply from: "${rootProject.projectDir}/gradle/javaProject.gradle"
apply from: "${rootProject.projectDir}/gradle/jacocoProject.gradle" apply from: "${rootProject.projectDir}/gradle/jacocoProject.gradle"
apply from: "${rootProject.projectDir}/gradle/javaTestProject.gradle" apply from: "${rootProject.projectDir}/gradle/javaTestProject.gradle"
apply from: "${rootProject.projectDir}/gradle/distributableGhidraModule.gradle" apply from: "${rootProject.projectDir}/gradle/distributableGhidraModule.gradle"
apply from: "${rootProject.projectDir}/gradle/javadoc.gradle"
apply plugin: 'eclipse' apply plugin: 'eclipse'
eclipse.project.name = 'Features SystemEmulation' eclipse.project.name = 'Features SystemEmulation'

View file

@ -37,12 +37,13 @@ import ghidra.program.model.symbol.*;
* *
* <p> * <p>
* A system call library is a collection of p-code executable routines, invoked by a system call * 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 * dispatcher. That dispatcher is represented by
* a sleigh userop. If this interface is "mixed in" with {@link AnnotatedPcodeUseropLibrary}, that * {@link #syscall(PcodeExecutor, PcodeUseropLibrary)}, and is exported as a sleigh userop. If this
* userop is automatically included in the userop library. The simplest means of implementing a * interface is "mixed in" with {@link AnnotatedPcodeUseropLibrary}, that userop is automatically
* syscall library is probably via {@link AnnotatedEmuSyscallUseropLibrary}. It implements this * included in the userop library. The simplest means of implementing a syscall library is probably
* interface and extends {@link AnnotatedPcodeUseropLibrary}. In addition, it provides its own * via {@link AnnotatedEmuSyscallUseropLibrary}. It implements this interface and extends
* annotation system for exporting userops as system calls. * {@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[]} * @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[]} * @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. * database. Until then, we require system-specific implementations.
* *
* @param state the executor's state * @param state the executor's state
* @param the reason for reading state, probably {@link Reason#EXECUTE}, but should be taken * @param reason the reason for reading state, probably {@link Reason#EXECUTE_READ}, but should
* from the executor * be taken from the executor
* @return the system call number * @return the system call number
*/ */
long readSyscallNumber(PcodeExecutorState<T> state, Reason reason); long readSyscallNumber(PcodeExecutorState<T> state, Reason reason);
@ -233,7 +235,7 @@ public interface EmuSyscallLibrary<T> extends PcodeUseropLibrary<T> {
* <p> * <p>
* The executor's state must already be prepared according to the relevant system calling * The executor's state must already be prepared according to the relevant system calling
* conventions. This will determine the system call number, according to * 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. * definition, and invoke it.
* *
* @param executor the executor * @param executor the executor

View file

@ -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 * 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. * 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 pathname the pathname of the file
* @param mode the mode of the file * @param mode the mode of the file
*/ */

View file

@ -347,7 +347,6 @@ public abstract class AbstractEmuUnixSyscallUseropLibrary<T>
* This just throws an exception, which the overall simulator or script should catch. * This just throws an exception, which the overall simulator or script should catch.
* *
* @param status the status code * @param status the status code
* @return never
* @throws EmuProcessExitedException always * @throws EmuProcessExitedException always
*/ */
@PcodeUserop @PcodeUserop

View file

@ -35,7 +35,7 @@ public abstract class AbstractStreamEmuUnixFileHandle<T> implements EmuUnixFileD
/** /**
* Construct a new handle * Construct a new handle
* *
* @see AbstractEmuUnixSyscallUseropLibrary#createHandle(int, EmuUnixFile, int) * @see AbstractEmuUnixSyscallUseropLibrary#createHandle(EmuUnixFile, int)
* @param machine the machine emulating the hardware * @param machine the machine emulating the hardware
* @param cSpec the ABI of the target platform * @param cSpec the ABI of the target platform
*/ */

View file

@ -43,7 +43,7 @@ public class DefaultEmuUnixFileHandle<T> implements EmuUnixFileDescriptor<T> {
/** /**
* Construct a new handle on the given file * 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 machine the machine emulating the hardware
* @param cSpec the ABI of the target platform * @param cSpec the ABI of the target platform
* @param file the file opened by this handle * @param file the file opened by this handle

View file

@ -90,7 +90,7 @@ public interface EmuUnixFileSystem<T> {
* A factory for constructing a new file (without adding it to the file system) * A factory for constructing a new file (without adding it to the file system)
* *
* @param pathname the path of the file * @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 * @return the new file
* @throws EmuIOException if the file cannot be constructed * @throws EmuIOException if the file cannot be constructed
*/ */

View file

@ -76,7 +76,6 @@ public class IOStreamEmuUnixFileHandle extends AbstractStreamEmuUnixFileHandle<b
* @param cSpec the ABI of the target platform * @param cSpec the ABI of the target platform
* @param input the stream representing the input side of the descriptor, if applicable * @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 * @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, public IOStreamEmuUnixFileHandle(PcodeMachine<byte[]> machine, CompilerSpec cSpec,
InputStream input, OutputStream output) { InputStream input, OutputStream output) {

View file

@ -1574,7 +1574,7 @@ public class StructuredSleigh {
* *
* <pre> * <pre>
* Var arr = lang("r0", "/int *"); * Var arr = lang("r0", "/int *");
* for (int i = 1; i < 16; i++) { * for (int i = 1; i &lt; 16; i++) {
* arr.index(i).deref().set(arr.index(0).deref()); * arr.index(i).deref().set(arr.index(0).deref());
* } * }
* </pre> * </pre>
@ -1904,8 +1904,7 @@ public class StructuredSleigh {
* *
* <p> * <p>
* The default is to log a warning and continue. If permitted to continue, the resulting type * 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 * will be {@code void}, likely resulting in more issues. See {@link #computeDerefType(RVal)}.
* {@link #computeDerefType(DataType)}.
* *
* @param addr the value being dereferenced * @param addr the value being dereferenced
*/ */