mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
Merge remote-tracking branch 'origin/patch'
This commit is contained in:
commit
2936493408
11 changed files with 83 additions and 78 deletions
|
@ -55,7 +55,8 @@ public class StructureFactory {
|
|||
* <li>if there are no data components to add to the structure
|
||||
* </ul>
|
||||
*/
|
||||
public static Structure createStructureDataType(Program program, Address address, int dataLength) {
|
||||
public static Structure createStructureDataType(Program program, Address address,
|
||||
int dataLength) {
|
||||
return createStructureDataType(program, address, dataLength, DEFAULT_STRUCTURE_NAME, true);
|
||||
}
|
||||
|
||||
|
@ -89,8 +90,8 @@ public class StructureFactory {
|
|||
}
|
||||
|
||||
if (dataLength <= 0) {
|
||||
throw new IllegalArgumentException("Structure length must be positive, not " +
|
||||
dataLength);
|
||||
throw new IllegalArgumentException(
|
||||
"Structure length must be positive, not " + dataLength);
|
||||
}
|
||||
|
||||
Address endAddress;
|
||||
|
@ -116,7 +117,7 @@ public class StructureFactory {
|
|||
name = providerContext.getUniqueName(name);
|
||||
}
|
||||
|
||||
Structure newStructure = new StructureDataType(name, 0);
|
||||
Structure newStructure = new StructureDataType(name, 0, program.getDataTypeManager());
|
||||
|
||||
initializeStructureFromContext(newStructure, providerContext, dataLength);
|
||||
|
||||
|
@ -211,16 +212,15 @@ public class StructureFactory {
|
|||
}
|
||||
|
||||
// create the context
|
||||
DataTypeProviderContext providerContext =
|
||||
new ProgramStructureProviderContext(program, data.getMinAddress(),
|
||||
(Structure) parentDataType, comp1.getParentOffset());
|
||||
DataTypeProviderContext providerContext = new ProgramStructureProviderContext(program,
|
||||
data.getMinAddress(), (Structure) parentDataType, comp1.getParentOffset());
|
||||
|
||||
String name = structureName;
|
||||
if (makeUniqueName) {
|
||||
name = providerContext.getUniqueName(name);
|
||||
}
|
||||
|
||||
Structure newStructure = new StructureDataType(name, 0);
|
||||
Structure newStructure = new StructureDataType(name, 0, program.getDataTypeManager());
|
||||
|
||||
initializeStructureFromContext(newStructure, providerContext, dataLength);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue