Java Code Examples for ghidra.program.model.data.StructureDataType#setCategoryPath()

The following examples show how to use ghidra.program.model.data.StructureDataType#setCategoryPath() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ObjectiveC1_ProtocolMethod.java    From ghidra with Apache License 2.0 5 votes vote down vote up
public DataType toDataType() throws DuplicateNameException, IOException {
	StructureDataType struct = new StructureDataType(NAME, 0);
	struct.setCategoryPath(ObjectiveC1_Constants.CATEGORY_PATH);
	struct.add(PointerDataType.getPointer(ASCII, _state.pointerSize), "name", null);
	struct.add(PointerDataType.getPointer(ASCII, _state.pointerSize), "types", null);
	return struct;
}
 
Example 2
Source File: ObjectiveC1_Protocol.java    From ghidra with Apache License 2.0 5 votes vote down vote up
public DataType toDataType() throws DuplicateNameException, IOException {
	StructureDataType struct = new StructureDataType(NAME, 0);
	struct.setCategoryPath(ObjectiveC1_Constants.CATEGORY_PATH);
	struct.add(DWORD, "isa", null);
	struct.add(PointerDataType.getPointer(ASCII, _state.pointerSize), "name", null);
	struct.add(PointerDataType.getPointer(ObjectiveC1_ProtocolList.toGenericDataType(_state), _state.pointerSize), "protocolList", null);
	struct.add(PointerDataType.getPointer(ObjectiveC1_ProtocolMethodList.toGenericDataType(_state), _state.pointerSize), "instanceMethods", null);
	struct.add(PointerDataType.getPointer(ObjectiveC1_ProtocolMethodList.toGenericDataType(_state), _state.pointerSize), "classMethods", null);
	return struct;
}
 
Example 3
Source File: ResourceDirectory.java    From ghidra with Apache License 2.0 5 votes vote down vote up
public DataType toDataType() throws DuplicateNameException, IOException {
	StructureDataType struct = new StructureDataType(NAME, 0);
	struct.add(DWORD, "Characteristics",      null);
	struct.add(DWORD, "TimeDateStamp",        null);
	struct.add( WORD, "MajorVersion",         null);
	struct.add( WORD, "MinorVersion",         null);
	struct.add( WORD, "NumberOfNamedEntries", null);
	struct.add( WORD, "NumberOfIdEntries",    null);
	struct.setCategoryPath(new CategoryPath("/PE"));
	return struct;
}