mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
GT-3382: Formatting fixes.
This commit is contained in:
parent
b6e3d784b1
commit
600cf4d8a2
2 changed files with 11 additions and 8 deletions
|
@ -15,6 +15,10 @@
|
||||||
*/
|
*/
|
||||||
package ghidra.pcodeCPort.slghpatexpress;
|
package ghidra.pcodeCPort.slghpatexpress;
|
||||||
|
|
||||||
|
import java.io.PrintStream;
|
||||||
|
|
||||||
|
import org.jdom.Element;
|
||||||
|
|
||||||
import generic.stl.VectorSTL;
|
import generic.stl.VectorSTL;
|
||||||
import ghidra.pcodeCPort.context.*;
|
import ghidra.pcodeCPort.context.*;
|
||||||
import ghidra.pcodeCPort.sleighbase.SleighBase;
|
import ghidra.pcodeCPort.sleighbase.SleighBase;
|
||||||
|
@ -24,10 +28,6 @@ import ghidra.pcodeCPort.utils.MutableInt;
|
||||||
import ghidra.pcodeCPort.utils.XmlUtils;
|
import ghidra.pcodeCPort.utils.XmlUtils;
|
||||||
import ghidra.sleigh.grammar.Location;
|
import ghidra.sleigh.grammar.Location;
|
||||||
|
|
||||||
import java.io.PrintStream;
|
|
||||||
|
|
||||||
import org.jdom.Element;
|
|
||||||
|
|
||||||
public class OperandValue extends PatternValue {
|
public class OperandValue extends PatternValue {
|
||||||
|
|
||||||
private int index; // This is the defining field of expression
|
private int index; // This is the defining field of expression
|
||||||
|
@ -49,8 +49,9 @@ public class OperandValue extends PatternValue {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TokenPattern genMinPattern(VectorSTL<TokenPattern> ops) {
|
public TokenPattern genMinPattern(VectorSTL<TokenPattern> ops) {
|
||||||
if (index >= ops.size())
|
if (index >= ops.size()) {
|
||||||
return null;
|
return null;
|
||||||
|
}
|
||||||
return ops.get(index);
|
return ops.get(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -543,8 +543,9 @@ public class Constructor {
|
||||||
}
|
}
|
||||||
else if (defexp != null) {
|
else if (defexp != null) {
|
||||||
TokenPattern tmppat = defexp.genMinPattern(oppattern);
|
TokenPattern tmppat = defexp.genMinPattern(oppattern);
|
||||||
if (null == tmppat)
|
if (null == tmppat) {
|
||||||
throw new SleighError("operand " + sym.getName() + " has an issue", location);
|
throw new SleighError("operand " + sym.getName() + " has an issue", location);
|
||||||
|
}
|
||||||
oppattern.push_back(tmppat);
|
oppattern.push_back(tmppat);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -573,8 +574,9 @@ public class Constructor {
|
||||||
// in bytes
|
// in bytes
|
||||||
|
|
||||||
OperandResolve resolve = new OperandResolve(operands);
|
OperandResolve resolve = new OperandResolve(operands);
|
||||||
if (!pateq.resolveOperandLeft(resolve))
|
if (!pateq.resolveOperandLeft(resolve)) {
|
||||||
throw new SleighError("Unable to resolve operand offsets", location);
|
throw new SleighError("Unable to resolve operand offsets", location);
|
||||||
|
}
|
||||||
|
|
||||||
// Unravel relative offsets to absolute (if possible)
|
// Unravel relative offsets to absolute (if possible)
|
||||||
for (int i = 0; i < operands.size(); ++i) {
|
for (int i = 0; i < operands.size(); ++i) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue