mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
Isolate variable action
This commit is contained in:
parent
c0dfa509ee
commit
b0fb7b287d
4 changed files with 121 additions and 3 deletions
|
@ -261,7 +261,17 @@ public class HighSymbol {
|
|||
public boolean isNameLocked() {
|
||||
return namelock;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* If this returns true, the decompiler will not speculatively merge this with
|
||||
* other variables.
|
||||
* Currently, being isolated is equivalent to being typelocked.
|
||||
* @return true if this will not be merged with other variables
|
||||
*/
|
||||
public boolean isIsolated() {
|
||||
return typelock;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if the symbol's value is considered read-only (by the decompiler)
|
||||
*/
|
||||
|
@ -323,6 +333,9 @@ public class HighSymbol {
|
|||
if (isVolatile) {
|
||||
SpecXmlUtils.encodeBooleanAttribute(buf, "volatile", true);
|
||||
}
|
||||
if (isIsolated()) {
|
||||
SpecXmlUtils.encodeBooleanAttribute(buf, "merge", false);
|
||||
}
|
||||
SpecXmlUtils.encodeSignedIntegerAttribute(buf, "cat", category);
|
||||
if (categoryIndex >= 0) {
|
||||
SpecXmlUtils.encodeSignedIntegerAttribute(buf, "index", categoryIndex);
|
||||
|
@ -356,6 +369,12 @@ public class HighSymbol {
|
|||
if ((namelockstr != null) && (SpecXmlUtils.decodeBoolean(namelockstr))) {
|
||||
namelock = true;
|
||||
}
|
||||
// isolate = false;
|
||||
// String isolatestr = symel.getAttribute("merge");
|
||||
// if ((isolatestr != null) && !SpecXmlUtils.decodeBoolean(isolatestr)) {
|
||||
// isolate = true;
|
||||
// }
|
||||
|
||||
name = symel.getAttribute("name");
|
||||
categoryIndex = -1;
|
||||
category = -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue