mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 17:59:46 +02:00
Merge remote-tracking branch 'origin/patch'
Conflicts: Ghidra/Features/Decompiler/src/decompile/cpp/funcdata_varnode.cc
This commit is contained in:
commit
e2ae03d1b9
3 changed files with 12 additions and 7 deletions
|
@ -1222,11 +1222,10 @@ bool Funcdata::attemptDynamicMapping(SymbolEntry *entry,DynamicHash &dhash)
|
|||
}
|
||||
Varnode *vn = dhash.findVarnode(this,entry->getFirstUseAddress(),entry->getHash());
|
||||
if (vn == (Varnode *)0) return false;
|
||||
if (vn->getSymbolEntry() != (SymbolEntry *)0) return false; // Varnode is already labeled
|
||||
if (category == Symbol::equate) { // Is this an equate symbol
|
||||
if (vn->mapentry != entry) { // Check we haven't marked this before
|
||||
vn->setSymbolEntry(entry);
|
||||
return true;
|
||||
}
|
||||
vn->setSymbolEntry(entry);
|
||||
return true;
|
||||
}
|
||||
else if (entry->getSize() == vn->getSize()) {
|
||||
if (vn->setSymbolProperties(entry))
|
||||
|
@ -1254,7 +1253,7 @@ bool Funcdata::attemptDynamicMappingLate(SymbolEntry *entry,DynamicHash &dhash)
|
|||
Varnode *vn = dhash.findVarnode(this,entry->getFirstUseAddress(),entry->getHash());
|
||||
if (vn == (Varnode *)0)
|
||||
return false;
|
||||
if (vn->getSymbolEntry() == entry) return false; // Already applied it
|
||||
if (vn->getSymbolEntry() != (SymbolEntry *)0) return false; // Symbol already applied
|
||||
if (sym->getCategory() == Symbol::equate) { // Equate symbol does not depend on size
|
||||
vn->setSymbolEntry(entry);
|
||||
return true;
|
||||
|
|
|
@ -637,7 +637,13 @@ public class SpecExtension {
|
|||
}
|
||||
cspecValidator.verify(res.optionName, document);
|
||||
checkExtension(res);
|
||||
parseExtension(res.optionName, document, program.getCompilerSpec(), false);
|
||||
if (!(program.getCompilerSpec() instanceof BasicCompilerSpec)) {
|
||||
throw new SleighException(
|
||||
"Can only test specification extensions against SLEIGH program");
|
||||
}
|
||||
BasicCompilerSpec cSpecCopy =
|
||||
new BasicCompilerSpec((BasicCompilerSpec) program.getCompilerSpec());
|
||||
parseExtension(res.optionName, document, cSpecCopy, false);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ public class BasicCompilerSpec implements CompilerSpec {
|
|||
* spec from Language.
|
||||
* @param op2 is the spec to clone
|
||||
*/
|
||||
protected BasicCompilerSpec(BasicCompilerSpec op2) {
|
||||
public BasicCompilerSpec(BasicCompilerSpec op2) {
|
||||
language = op2.language;
|
||||
description = op2.description;
|
||||
// PrototypeModel is immutable but the map may change, so callingConventionMap
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue