mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
GP-2237 AddrSpace as marshaling primitive and prettyprint update
This commit is contained in:
parent
4807ec354a
commit
6be9943b8a
58 changed files with 1333 additions and 1098 deletions
|
@ -81,27 +81,19 @@ void LoadImageXml::open(const AddrSpaceManager *m)
|
|||
uint4 sz; // unused size
|
||||
|
||||
// Read parsed xml file
|
||||
XmlDecode decoder(rootel);
|
||||
XmlDecode decoder(m,rootel);
|
||||
uint4 elemId = decoder.openElement(ELEM_BINARYIMAGE);
|
||||
for(;;) {
|
||||
uint4 subId = decoder.openElement();
|
||||
if (subId == 0) break;
|
||||
if (subId==ELEM_SYMBOL) {
|
||||
AddrSpace *base = (AddrSpace *)0;
|
||||
string spaceName = decoder.readString(ATTRIB_SPACE);
|
||||
base = manage->getSpaceByName(spaceName);
|
||||
if (base == (AddrSpace *)0)
|
||||
throw LowlevelError("Unknown space name: "+spaceName);
|
||||
AddrSpace *base = decoder.readSpace(ATTRIB_SPACE);
|
||||
Address addr(base,base->decodeAttributes(decoder,sz));
|
||||
string nm = decoder.readString(ATTRIB_NAME);
|
||||
addrtosymbol[addr] = nm;
|
||||
}
|
||||
else if (subId == ELEM_BYTECHUNK) {
|
||||
AddrSpace *base = (AddrSpace *)0;
|
||||
string spaceName = decoder.readString(ATTRIB_SPACE);
|
||||
base = manage->getSpaceByName(spaceName);
|
||||
if (base == (AddrSpace *)0)
|
||||
throw LowlevelError("Unknown space name: "+spaceName);
|
||||
AddrSpace *base = decoder.readSpace(ATTRIB_SPACE);
|
||||
Address addr(base,base->decodeAttributes(decoder,sz));
|
||||
map<Address,vector<uint1> >::iterator chnkiter;
|
||||
vector<uint1> &vec( chunk[addr] );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue