mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 10:19:23 +02:00
GP-4140 Strip TypeDefs when extracting primitives
This commit is contained in:
parent
4c3d7ca925
commit
ff2526479e
2 changed files with 5 additions and 0 deletions
|
@ -579,6 +579,8 @@ uint4 MultiSlotAssign::assignAddress(Datatype *dt,const PrototypePieces &proto,i
|
||||||
return fail;
|
return fail;
|
||||||
int4 grp = stackEntry->getGroup();
|
int4 grp = stackEntry->getGroup();
|
||||||
Address addr = stackEntry->getAddrBySlot(tmpStatus[grp],sizeLeft,1); // Consume all the space we need
|
Address addr = stackEntry->getAddrBySlot(tmpStatus[grp],sizeLeft,1); // Consume all the space we need
|
||||||
|
if (addr.isInvalid())
|
||||||
|
return fail;
|
||||||
pieces.push_back(VarnodeData());
|
pieces.push_back(VarnodeData());
|
||||||
pieces.back().space = addr.getSpace();
|
pieces.back().space = addr.getSpace();
|
||||||
pieces.back().offset = addr.getOffset();
|
pieces.back().offset = addr.getOffset();
|
||||||
|
|
|
@ -82,6 +82,9 @@ public interface DatatypeFilter {
|
||||||
*/
|
*/
|
||||||
public static boolean extractPrimitives(DataType dt, int max, DataType filler,
|
public static boolean extractPrimitives(DataType dt, int max, DataType filler,
|
||||||
ArrayList<DataType> res) {
|
ArrayList<DataType> res) {
|
||||||
|
if (dt instanceof TypeDef) {
|
||||||
|
dt = ((TypeDef) dt).getBaseDataType();
|
||||||
|
}
|
||||||
int metaType = PcodeDataTypeManager.getMetatype(dt);
|
int metaType = PcodeDataTypeManager.getMetatype(dt);
|
||||||
switch (metaType) {
|
switch (metaType) {
|
||||||
case PcodeDataTypeManager.TYPE_UNKNOWN:
|
case PcodeDataTypeManager.TYPE_UNKNOWN:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue