Sync startPos, curPos, endPos with new LinkedByteBuffer

This commit is contained in:
caheckman
2026-10-01 22:33:40 +00:00
parent e73cfe1bf1
commit abac140f5f
8 changed files with 14 additions and 14 deletions
@@ -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.
@@ -75,7 +75,6 @@
prototype, and local symbol information.
- \ref classfuncdata
.
.
\b Translation
- \ref classloadimage
@@ -2383,6 +2383,8 @@ ProtoModel::~ProtoModel(void)
delete input;
if (output != (ParamList *)0)
delete output;
for(int4 i=0;i<sharedActions.size();++i)
delete sharedActions[i];
}
/// Test whether one ProtoModel can substituted for another during FuncCallSpecs::deindirect
@@ -15,7 +15,6 @@
*/
#include "marshal.hh"
#include "translate.hh"
#include "type.hh"
namespace ghidra {
@@ -1014,7 +1014,7 @@ PcodeOp *PcodeOpBank::create(int4 inputs,const SeqNum &sq)
/// of input slots, which start out empty. A sequence number is assigned, and
/// the op is added to the end of the \e dead list.
/// \param inputs is the number of input slots
/// \param pc is the Address to associate with the PcodeOp
/// \param addr is the Address to associate with the PcodeOp
/// \return the newly allocated PcodeOp
PcodeOp *PcodeOpBank::createIndirect(int4 inputs,const Address &addr)
@@ -10688,8 +10688,8 @@ int4 RuleLzcountShiftBool::applyOp(PcodeOp *op,Funcdata &data)
/// \brief Convert floating-point \e sign bit manipulation into FLOAT_ABS or FLOAT_NEG
///
/// Transform floating-point specific operations
/// -- `x & 0x7fffffff => ABS(f)`
/// -- 'x ^ 0x80000000 => -f`
/// - `x & 0x7fffffff => ABS(f)`
/// - `x ^ 0x80000000 => -f`
///
/// A Varnode is determined to be floating-point by participation in other floating-point operations,
/// not based on the data-type of the Varnode.
@@ -10776,8 +10776,8 @@ int4 RuleFloatSignCleanup::applyOp(PcodeOp *op,Funcdata &data)
/// \class RuleOrCompare
/// \brief Simplify INT_OR in comparisons with 0.
///
/// `(V | W) == 0` => '(V == 0) && (W == 0)'
/// `(V | W) != 0` => '(V != 0) || (W != 0)'
/// - `(V | W) == 0 => (V == 0) && (W == 0)`
/// - `(V | W) != 0 => (V != 0) || (W != 0)`
void RuleOrCompare::getOpList(vector<uint4> &oplist) const
{
@@ -19,7 +19,7 @@
namespace ghidra {
/// The base propagation ordering associated with each meta-type.
/// The array elements correspond to the ordering of #type_metatype.
/// The array elements correspond to the ordering of type_metatype.
sub_metatype Datatype::base2sub[18] = {
SUB_PARTIALUNION, SUB_PARTIALSTRUCT, SUB_UINT_PARTIALENUM, SUB_UNION, SUB_STRUCT, SUB_INT_ENUM, SUB_UINT_ENUM,
SUB_ARRAY, SUB_PTRREL, SUB_PTR, SUB_FLOAT, SUB_CODE, SUB_BOOL, SUB_UINT_PLAIN, SUB_INT_PLAIN, SUB_UNKNOWN,
@@ -76,7 +76,7 @@ extern void print_data(ostream &s,uint1 *buffer,int4 size,const Address &baseadd
//extern void print_char(ostream &s,int4 onechar);
//extern bool print_string(ostream &s,uint1 *buffer,int4 size);
/// Specializations of the core meta-types. Each enumeration is associated with a specific #type_metatype.
/// Specializations of the core meta-types. Each enumeration is associated with a specific type_metatype.
/// Ordering is important: The lower the number, the more \b specific the data-type, affecting propagation.
enum sub_metatype {
SUB_VOID = 23, ///< Compare as a TYPE_VOID
@@ -120,9 +120,6 @@ public class PackedDecode implements Decoder, Closeable {
curPos = new LinkedByteBuffer.Position();
endPos = new LinkedByteBuffer.Position();
open(Integer.MAX_VALUE, desc);
startPos.buffer = inStream;
curPos.buffer = inStream;
endPos.buffer = inStream;
inStream.ingestStreamAsNeeded(stream, endPos);
}
@@ -224,6 +221,9 @@ public class PackedDecode implements Decoder, Closeable {
@Override
public void open(int max, String desc) {
inStream = new LinkedByteBuffer(max, ELEMENT_END, desc);
startPos.buffer = inStream;
curPos.buffer = inStream;
endPos.buffer = inStream;
}
/**