mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
GP-2767 Structured pieces
This commit is contained in:
parent
b707c2ea6b
commit
535ac7c08d
29 changed files with 834 additions and 210 deletions
|
@ -693,6 +693,19 @@ void PrintLanguage::setIntegerFormat(const string &nm)
|
|||
mods |= mod; // Set any new force
|
||||
}
|
||||
|
||||
/// This is used if a value is extracted from a structured data-type, but the natural name is not available.
|
||||
/// An artificial name is generated given just the offset into the data-type and the size in bytes.
|
||||
/// \param off is the byte offset into the data-type
|
||||
/// \param size is the number of bytes in the extracted value
|
||||
/// \return a string describing the artificial field
|
||||
string PrintLanguage::unnamedField(int4 off,int4 size)
|
||||
|
||||
{
|
||||
ostringstream s;
|
||||
s << '_' << dec << off << '_' << size << '_';
|
||||
return s.str();
|
||||
}
|
||||
|
||||
/// Count '0' and '9' digits base 10. Count '0' and 'f' digits base 16.
|
||||
/// The highest count is the preferred base.
|
||||
/// \param val is the given integer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue