mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 17:59:46 +02:00
name to address space map
shortcut to address space map more adjustments to shortcuts allow null AddrSpace pointer in raw baselist holes in the space indices almost working GT-2873 decompiler, other, and overlays GT-2873 added OTHER space to java sleigh compiler, fixed decompiler exception isOtherSpace method isOtherSpace java, addressing code review comments GT-2873 added null check in decompiler reset GT-2873 code review changes Read and write space_other tag in SLA files Version number for .sla file GT-2873 fixups after merge GT-2873 renamed Sparc registers: OTHER->OTHERWIN, WINWSTATE->WSTATE GT-2873 added option in AddressInput to control OTHER space visibility GT-2873 OTHER space now global GT-2873 fixing comments refering to decompiler code in BasicCompilerSpec
This commit is contained in:
parent
cf47a2ee57
commit
612c0d6f3e
40 changed files with 545 additions and 213 deletions
|
@ -24,14 +24,6 @@ void AddrSpace::calcScaleMask(void)
|
|||
highest = highest * wordsize + (wordsize-1); // Maximum byte address
|
||||
}
|
||||
|
||||
/// Called once during initialization to assign a single character shortcut for the space
|
||||
/// The character is used as a shorthand when typing addresses on the console command line
|
||||
void AddrSpace::assignShortcut(void)
|
||||
|
||||
{
|
||||
shortcut = manage->assignShortcut(type);
|
||||
}
|
||||
|
||||
/// Initialize an address space with its basic attributes
|
||||
/// \param m is the space manager associated with the new space
|
||||
/// \param t is the processor translator associated with the new space
|
||||
|
@ -55,6 +47,7 @@ AddrSpace::AddrSpace(AddrSpaceManager *m,const Translate *t,spacetype tp,const s
|
|||
index = ind;
|
||||
delay = dl;
|
||||
deadcodedelay = dl; // Deadcode delay initially starts the same as heritage delay
|
||||
shortcut = ' '; // Placeholder meaning shortcut is unassigned
|
||||
|
||||
// These are the flags we allow to be set from constructor
|
||||
flags = (fl & hasphysical);
|
||||
|
@ -63,7 +56,6 @@ AddrSpace::AddrSpace(AddrSpaceManager *m,const Translate *t,spacetype tp,const s
|
|||
flags |= (heritaged | does_deadcode); // Always on unless explicitly turned off in derived constructor
|
||||
|
||||
calcScaleMask();
|
||||
assignShortcut();
|
||||
}
|
||||
|
||||
/// This is a partial constructor, for initializing a space
|
||||
|
@ -80,6 +72,7 @@ AddrSpace::AddrSpace(AddrSpaceManager *m,const Translate *t,spacetype tp)
|
|||
type = tp;
|
||||
flags = (heritaged | does_deadcode); // Always on unless explicitly turned off in derived constructor
|
||||
wordsize = 1;
|
||||
shortcut = ' ';
|
||||
// We let big_endian get set by attribute
|
||||
}
|
||||
|
||||
|
@ -349,7 +342,6 @@ void AddrSpace::restoreXml(const Element *el)
|
|||
if (deadcodedelay == -1)
|
||||
deadcodedelay = delay; // If deadcodedelay attribute not present, set it to delay
|
||||
calcScaleMask();
|
||||
assignShortcut();
|
||||
}
|
||||
|
||||
/// This constructs the unique constant space
|
||||
|
@ -392,6 +384,42 @@ void ConstantSpace::restoreXml(const Element *el)
|
|||
throw LowlevelError("Should never restore the constant space from XML");
|
||||
}
|
||||
|
||||
/// Construct the \b other space, which is automatically constructed
|
||||
/// by the compiler, and is only constructed once. The name should
|
||||
/// always by \b OTHER.
|
||||
/// \param m is the associated address space manager
|
||||
/// \param t is the associated processor translator
|
||||
/// \param nm is the name of the space
|
||||
/// \param ind is the integer identifier
|
||||
OtherSpace::OtherSpace(AddrSpaceManager *m,const Translate *t,
|
||||
const string &nm,int4 ind)
|
||||
: AddrSpace(m,t,IPTR_PROCESSOR,nm,sizeof(uintb),1,ind,0,0)
|
||||
{
|
||||
clearFlags(heritaged|does_deadcode);
|
||||
setFlags(is_otherspace);
|
||||
}
|
||||
|
||||
OtherSpace::OtherSpace(AddrSpaceManager *m,const Translate *t)
|
||||
: AddrSpace(m,t,IPTR_PROCESSOR)
|
||||
{
|
||||
clearFlags(heritaged|does_deadcode);
|
||||
setFlags(is_otherspace);
|
||||
}
|
||||
|
||||
void OtherSpace::printRaw(ostream &s,uintb offset) const
|
||||
|
||||
{
|
||||
s << "0x" << hex << offset;
|
||||
}
|
||||
|
||||
void OtherSpace::saveXml(ostream &s) const
|
||||
|
||||
{
|
||||
s << "<space_other";
|
||||
saveBasicAttributes(s);
|
||||
s << "/>\n";
|
||||
}
|
||||
|
||||
/// This is the constructor for the \b unique space, which is
|
||||
/// automatically constructed by the analysis engine, and
|
||||
/// constructed only once. The name should always be \b unique.
|
||||
|
@ -653,7 +681,6 @@ void OverlaySpace::restoreXml(const Element *el)
|
|||
delay = baseSpace->getDelay();
|
||||
deadcodedelay = baseSpace->getDeadcodeDelay();
|
||||
calcScaleMask();
|
||||
assignShortcut();
|
||||
|
||||
if (baseSpace->isBigEndian())
|
||||
setFlags(big_endian);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue