mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
GP-3873 Data-type alignment support in decompiler
This commit is contained in:
parent
6508088623
commit
64a58bdeab
29 changed files with 456 additions and 149 deletions
|
@ -104,7 +104,6 @@ OptionDatabase::OptionDatabase(Architecture *g)
|
|||
registerOption(new OptionForLoops());
|
||||
registerOption(new OptionInline());
|
||||
registerOption(new OptionNoReturn());
|
||||
registerOption(new OptionStructAlign());
|
||||
registerOption(new OptionProtoEval());
|
||||
registerOption(new OptionWarning());
|
||||
registerOption(new OptionNullPrinting());
|
||||
|
@ -364,23 +363,6 @@ string OptionNoReturn::apply(Architecture *glb,const string &p1,const string &p2
|
|||
return res;
|
||||
}
|
||||
|
||||
/// \class OptionStructAlign
|
||||
/// \brief Alter the "structure alignment" data organization setting
|
||||
///
|
||||
/// The first parameter must an integer value indicating the desired alignment
|
||||
string OptionStructAlign::apply(Architecture *glb,const string &p1,const string &p2,const string &p3) const
|
||||
|
||||
{
|
||||
int4 val = -1;
|
||||
istringstream s(p1);
|
||||
s >> dec >> val;
|
||||
if (val == -1)
|
||||
throw ParseError("Missing alignment value");
|
||||
|
||||
glb->types->setStructAlign(val);
|
||||
return "Structure alignment set";
|
||||
}
|
||||
|
||||
/// \class OptionWarning
|
||||
/// \brief Toggle whether a warning should be issued if a specific action/rule is applied.
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue