GP-5891: Include Debugger javadocs in the build.

This commit is contained in:
Dan
2025-08-11 13:12:28 +00:00
parent 483cd9a799
commit ce96f8551d
51 changed files with 223 additions and 222 deletions
+5 -4
View File
@@ -13,10 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
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/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 = 'Debug TaintAnalysis'
@@ -4,9 +4,9 @@
* 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.
@@ -51,12 +51,13 @@ import ghidra.taint.model.TaintVec;
* <li>P-code Arithmetic: {@link TaintPcodeArithmetic}</li>
* <li>Userop Library: {@link TaintPcodeUseropLibrary}</li>
* <li>P-code Executor: {@link TaintPcodeThreadExecutor}</li>
* <li>Machine State</li>
* <li>Machine State
* <ul>
* <li>Stand alone: {@link TaintPcodeExecutorState}</li>
* <li>Trace integrated: {@link TaintTracePcodeExecutorState}</li>
* <li>Debugger integrated: {@link TaintTracePcodeExecutorState} (same as Trace integrated)</li>
* </ul>
* </li>
* </ul>
*
* <p>
@@ -4,9 +4,9 @@
* 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.
@@ -19,8 +19,8 @@ import org.apache.commons.lang3.tuple.Pair;
import ghidra.pcode.emu.DefaultPcodeThread;
import ghidra.pcode.emu.DefaultPcodeThread.PcodeThreadExecutor;
import ghidra.pcode.exec.PcodeExecutor;
import ghidra.pcode.exec.PcodeFrame;
import ghidra.pcode.exec.*;
import ghidra.pcode.exec.PcodeArithmetic.Purpose;
import ghidra.program.model.pcode.PcodeOp;
import ghidra.taint.model.TaintVec;
import ghidra.util.Msg;
@@ -52,9 +52,8 @@ public class TaintPcodeThreadExecutor extends PcodeThreadExecutor<Pair<byte[], T
* This is invoked on every {@link PcodeOp#CBRANCH}, allowing us a decent place to instrument
* the emulator and add some diagnostics. Refer to
* {@link PcodeExecutor#executeConditionalBranch(PcodeOp, PcodeFrame)} to see the operations
* inputs. Alternatively, we could override
* {@link TaintPcodeArithmetic#isTrue(TaintVec, Purpose)}; however, we'd have access to less
* contextual information at that position.
* inputs. Alternatively, we could override {@link PcodeArithmetic#isTrue(Object, Purpose)};
* however, we'd have access to less contextual information at that position.
*/
@Override
public void executeConditionalBranch(PcodeOp op, PcodeFrame frame) {
@@ -42,8 +42,7 @@ public class TaintDebuggerPcodeEmulator extends AuxDebuggerPcodeEmulator<TaintVe
* Here, we just return the singleton parts factory. This appears simple because all the
* complexity is encapsulated in the factory. See {@link TaintPartsFactory} to see everything
* the implementation actually entails. Notice that this is the same parts factory used by
* {@link TaintPcodeEmulator}. The {@link AuxDebugggerPcodeEmulator} knows to use the more
* capable state parts.
* {@link TaintPcodeEmulator}.
*/
@Override
protected AuxDebuggerEmulatorPartsFactory<TaintVec> getPartsFactory() {
@@ -4,9 +4,9 @@
* 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.
@@ -39,8 +39,8 @@ import ghidra.program.model.lang.Language;
* want to implement {@link TracePcodeExecutorState} directly, take the concrete piece provided, and
* wrap it as you see fit. You may still benefit by referring to the implementation of
* {@link PairedPcodeExecutorState}. When implementing your flavor of
* {@link PairedPcodeExecutorState#getVar(AddressSpace, Pair, int, boolean)}, still consider that
* you could benefit from the concrete element of the offset pair passed in.
* {@link PairedPcodeExecutorState#getVar(AddressSpace, Pair, int, boolean, Reason)}, still consider
* that you could benefit from the concrete element of the offset pair passed in.
*/
public class TaintPcodeExecutorStatePiece extends AbstractTaintPcodeExecutorStatePiece<TaintSpace> {
/**
@@ -4,9 +4,9 @@
* 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.
@@ -29,7 +29,7 @@ import ghidra.trace.model.property.TracePropertyMapSpace;
* The trace-integrated state piece for holding taint marks
*
* <p>
* See {@link AbstractTaintTracePcodeExecutorStatePiece} for framing. We'll store taint sets in the
* See {@link AbstractTaintPcodeExecutorStatePiece} for framing. We'll store taint sets in the
* trace's address property map, which is the recommended scheme for auxiliary state.
*/
public class TaintTracePcodeExecutorStatePiece
@@ -37,8 +37,7 @@ public class TaintTraceSpace extends TaintSpace {
* Create the space
*
* @param space the address space
* @param backing if present, the backing object
* @param snap the source snap
* @param property the trace property backing this space
*/
public TaintTraceSpace(AddressSpace space, PcodeTracePropertyAccess<String> property) {
this.space = space;
@@ -4,9 +4,9 @@
* 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.
@@ -17,9 +17,9 @@
* The trace-integrated Taint Emulator
*
* <p>
* This package builds on {@link ghidra.pcode.emu.plain} to construct a trace-integrated emulator.
* See that package for remarks about this "working solution." Those state components were factored
* to accommodate the state components introduced by this package.
* This package builds on the emulation framework to construct a trace-integrated emulator. The
* framework's state components were designed to accommodate the state components introduced by this
* package.
*
* <p>
* For this package, I recommend a bottom-up approach, since you should already be familiar with the
@@ -4,9 +4,9 @@
* 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.
@@ -17,12 +17,13 @@
* The Taint domain package
*
* <p>
* This package implements the domain of taint analysis. {@link TaintVec} models an array of bytes,
* each having a {@link TaintSet}. A {@link TaintSet} is in turn made of several {@link TaintMarks}.
* Each mark is a symbol with optional tags. We use the tags as a means of handling indirection, so
* that we don't have to decide up front whether tainted offsets taint the values read and written
* from memory. We allow them to be tainted, but add a tag to the mark, so they can be examined
* and/or filtered by the user.
* This package implements the domain of taint analysis. {@link ghidra.taint.model.TaintVec} models
* an array of bytes, each having a {@link ghidra.taint.model.TaintSet}. A
* {@link ghidra.taint.model.TaintSet} is in turn made of several
* {@link ghidra.taint.model.TaintMark}s. Each mark is a symbol with optional tags. We use the tags
* as a means of handling indirection, so that we don't have to decide up front whether tainted
* offsets taint the values read and written from memory. We allow them to be tainted, but add a tag
* to the mark, so they can be examined and/or filtered by the user.
*
* <p>
* To facilitate storage and presentation of taint, we will need to implement some
@@ -30,7 +31,8 @@
* parse method for sets and marks.
*
* <p>
* We recommend you read the documentation and source from the bottom up: {@link TaintMark},
* {@link TaintSet}, {@link TaintVec}.
* We recommend you read the documentation and source from the bottom up:
* {@link ghidra.taint.model.TaintMark}, {@link ghidra.taint.model.TaintSet},
* {@link ghidra.taint.model.TaintVec}.
*/
package ghidra.taint.model;