mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +02:00
Decompiler support for default data space
This commit is contained in:
parent
660062691a
commit
46e8a54948
21 changed files with 97 additions and 65 deletions
|
@ -1865,7 +1865,7 @@ void SleighCompile::process(void)
|
|||
|
||||
{ // Do all post processing on the parsed data structures
|
||||
checkNops();
|
||||
if (getDefaultSpace() == (AddrSpace *)0)
|
||||
if (getDefaultCodeSpace() == (AddrSpace *)0)
|
||||
reportError("No default space specified");
|
||||
if (errors>0) return;
|
||||
checkConsistency();
|
||||
|
@ -2037,10 +2037,10 @@ void SleighCompile::newSpace(SpaceQuality *qual)
|
|||
AddrSpace *spc = new AddrSpace(this,this,IPTR_PROCESSOR,qual->name,qual->size,qual->wordsize,numSpaces(),AddrSpace::hasphysical,delay);
|
||||
insertSpace(spc);
|
||||
if (qual->isdefault) {
|
||||
if (getDefaultSpace() != (AddrSpace *)0)
|
||||
reportError(getCurrentLocation(), "Multiple default spaces -- '" + getDefaultSpace()->getName() + "', '" + qual->name + "'");
|
||||
if (getDefaultCodeSpace() != (AddrSpace *)0)
|
||||
reportError(getCurrentLocation(), "Multiple default spaces -- '" + getDefaultCodeSpace()->getName() + "', '" + qual->name + "'");
|
||||
else {
|
||||
setDefaultSpace(spc->getIndex()); // Make the flagged space the default
|
||||
setDefaultCodeSpace(spc->getIndex()); // Make the flagged space the default
|
||||
pcode.setDefaultSpace(spc);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue