mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +02:00
GP-4117 Pass structure/union alignment to decompiler
This commit is contained in:
parent
74528b49ec
commit
bd43d1b11a
5 changed files with 95 additions and 75 deletions
|
@ -2793,7 +2793,7 @@ Datatype *CParse::newStruct(const string &ident,vector<TypeDeclarator *> *declis
|
|||
}
|
||||
|
||||
TypeStruct::assignFieldOffsets(sublist);
|
||||
if (!glb->types->setFields(sublist,res,-1,0)) {
|
||||
if (!glb->types->setFields(sublist,res,-1,-1,0)) {
|
||||
setError("Bad structure definition");
|
||||
glb->types->destroyType(res);
|
||||
return (Datatype *)0;
|
||||
|
@ -2826,7 +2826,7 @@ Datatype *CParse::newUnion(const string &ident,vector<TypeDeclarator *> *declist
|
|||
sublist.emplace_back(i,0,decl->getIdentifier(),decl->buildType(glb));
|
||||
}
|
||||
|
||||
if (!glb->types->setFields(sublist,res,-1,0)) {
|
||||
if (!glb->types->setFields(sublist,res,-1,-1,0)) {
|
||||
setError("Bad union definition");
|
||||
glb->types->destroyType(res);
|
||||
return (Datatype *)0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue