mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 02:09:44 +02:00
Merge remote-tracking branch 'origin/GP-3715_ghizard_PDB_perf_investigate_resolve_as_you_go_squash_and_rebase20231101'
This commit is contained in:
commit
d4861c46ac
46 changed files with 2587 additions and 3253 deletions
|
@ -106,7 +106,7 @@ class StructureDB extends CompositeDB implements StructureInternal {
|
|||
* NOTE: The offset of the migrated flex array component and structure length may change during
|
||||
* upgrade when packing is enabled when the original packed structure length did not properly
|
||||
* factor the flex-array alignment. Repack does not occur in the read-only case.
|
||||
*
|
||||
*
|
||||
* @param oldFlexArrayRecord record which corresponds to an old flex-array component
|
||||
* @throws IOException if a database error occurs
|
||||
*/
|
||||
|
@ -564,7 +564,7 @@ class StructureDB extends CompositeDB implements StructureInternal {
|
|||
* offset shift to the remaining components. Removal of other component types will result in
|
||||
* an offset and ordinal shift to the remaining components. In the case of a non-packed
|
||||
* structure, the resulting shift will cause in a timestamp change for this structure.
|
||||
*
|
||||
*
|
||||
* @param index defined component index
|
||||
* @param disableOffsetShift if false, and component is not a bit-field, an offset shift and
|
||||
* possible structure length change will be performed for non-packed structure.
|
||||
|
@ -778,7 +778,7 @@ class StructureDB extends CompositeDB implements StructureInternal {
|
|||
* <p>
|
||||
* WARNING! copying non-packed structures which contain bitfields can produce invalid results
|
||||
* when switching endianness due to the differences in packing order.
|
||||
*
|
||||
*
|
||||
* @param dtm target data type manager
|
||||
* @return cloned structure
|
||||
*/
|
||||
|
@ -796,7 +796,7 @@ class StructureDB extends CompositeDB implements StructureInternal {
|
|||
* <p>
|
||||
* WARNING! cloning non-packed structures which contain bitfields can produce invalid results
|
||||
* when switching endianness due to the differences in packing order.
|
||||
*
|
||||
*
|
||||
* @param dtm target data type manager
|
||||
* @return cloned structure
|
||||
*/
|
||||
|
@ -906,7 +906,7 @@ class StructureDB extends CompositeDB implements StructureInternal {
|
|||
/**
|
||||
* Backup from specified defined-component index to the first component which contains the
|
||||
* specified offset.
|
||||
*
|
||||
*
|
||||
* @param index any defined component index which contains offset.
|
||||
* @param offset offset within structure.
|
||||
* @return index of first defined component containing specific offset.
|
||||
|
@ -929,7 +929,7 @@ class StructureDB extends CompositeDB implements StructureInternal {
|
|||
* Identify defined-component index of the first non-zero-length component which contains the
|
||||
* specified offset. If only zero-length components exist, the last zero-length component which
|
||||
* contains the offset will be returned.
|
||||
*
|
||||
*
|
||||
* @param index any defined component index which contains offset.
|
||||
* @param offset offset within structure.
|
||||
* @return index of first defined component containing specific offset.
|
||||
|
@ -950,7 +950,7 @@ class StructureDB extends CompositeDB implements StructureInternal {
|
|||
/**
|
||||
* Advance from specified defined-component index to the last component which contains the
|
||||
* specified offset.
|
||||
*
|
||||
*
|
||||
* @param index any defined component index which contains offset.
|
||||
* @param offset offset within structure.
|
||||
* @return index of last defined component containing specific offset.
|
||||
|
@ -1307,7 +1307,7 @@ class StructureDB extends CompositeDB implements StructureInternal {
|
|||
int length, String componentName, String comment) throws IOException {
|
||||
|
||||
// Attempt quick update of a single defined component if possible.
|
||||
// A quick update requires that component characteristics including length, offset,
|
||||
// A quick update requires that component characteristics including length, offset,
|
||||
// and alignment (if packed) not change. All other situations generally require a
|
||||
// repack.
|
||||
DataTypeComponentDB oldComponent = replacedComponents.get(0);
|
||||
|
@ -1557,7 +1557,7 @@ class StructureDB extends CompositeDB implements StructureInternal {
|
|||
|
||||
/**
|
||||
* Replaces the internal components of this structure with components of the given structure.
|
||||
*
|
||||
*
|
||||
* @param dataType the structure to get the component information from.
|
||||
* @throws IllegalArgumentException if any of the component data types are not allowed to
|
||||
* replace a component in this composite data type. For example, suppose dt1 contains dt2.
|
||||
|
@ -1593,7 +1593,7 @@ class StructureDB extends CompositeDB implements StructureInternal {
|
|||
/**
|
||||
* Replaces the internal components of this structure with components of the given structure
|
||||
* including packing and alignment settings.
|
||||
*
|
||||
*
|
||||
* @param struct structure to be copied
|
||||
* @param notify provide notification if true
|
||||
* @throws DataTypeDependencyException if circular dependency detected
|
||||
|
@ -1780,14 +1780,14 @@ class StructureDB extends CompositeDB implements StructureInternal {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the available space for an existing defined component in relation to the next defined
|
||||
* Get the available space for an existing defined component in relation to the next defined
|
||||
* component or the end of the structure. Method should be used in conjunction with
|
||||
* {@link #consumeBytesAfter(int, int)} and/or {@link #shiftOffsets(int, int, int)} for
|
||||
* non-packed structure use. This method is intended to supplt the maxLength parameter
|
||||
* for the {@link #getPreferredComponentLength(DataType, int, int)} method call.
|
||||
*
|
||||
*
|
||||
* @param index defined components index
|
||||
* @return available space for this component (i.e., maxLength). {@link Integer#MAX_VALUE}
|
||||
* @return available space for this component (i.e., maxLength). {@link Integer#MAX_VALUE}
|
||||
* is returned if last component in non-packed structure, or -1 if structure is packed.
|
||||
*/
|
||||
private int getAvailableComponentSpace(int index) {
|
||||
|
@ -2097,7 +2097,7 @@ class StructureDB extends CompositeDB implements StructureInternal {
|
|||
* Replace the specified components with a new component containing the specified data type.
|
||||
* If {@link DataType#DEFAULT} is specified as the resolvedDataType only a clear operation
|
||||
* is performed.
|
||||
*
|
||||
*
|
||||
* @param origComponents the original sequence of data type components in this structure to be
|
||||
* replaced. These components must be adjacent components in sequential order. If an
|
||||
* non-packed undefined component is specified no other component may be included.
|
||||
|
@ -2206,7 +2206,7 @@ class StructureDB extends CompositeDB implements StructureInternal {
|
|||
/**
|
||||
* Gets the number of Undefined bytes beginning at the indicated component ordinal. Undefined
|
||||
* bytes that have a field name or comment specified are also included.
|
||||
*
|
||||
*
|
||||
* @param ordinal the component ordinal to begin checking at.
|
||||
* @return the number of contiguous undefined bytes
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue