mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-06-02 03:37:31 +08:00
Merge remote-tracking branch 'origin/GP-0-dragonmacher-test-fixes-4-30-26'
This commit is contained in:
+15
-3
@@ -68,25 +68,37 @@ public class LabelFieldSymbolLoader {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean showPrimary = !ignoreSymbol(primary);
|
||||||
|
int remaining = showPrimary ? max - 1 : max;
|
||||||
|
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
Symbol s = it.next();
|
Symbol s = it.next();
|
||||||
if (s.isPrimary()) {
|
if (s.isPrimary()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((max - 1) == symbols.size()) { // -1 to save space for primary
|
if (remaining == symbols.size()) {
|
||||||
hasMore = true;
|
hasMore = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s instanceof FunctionSymbol && !displayFunctionLabel) {
|
if (ignoreSymbol(s)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
symbols.add(s);
|
symbols.add(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
symbols.add(primary);
|
if (showPrimary) {
|
||||||
|
symbols.add(primary);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean ignoreSymbol(Symbol s) {
|
||||||
|
if (s instanceof FunctionSymbol) {
|
||||||
|
return !displayFunctionLabel;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void gatherOffcutSymbols(CodeUnit cu, int max) {
|
private void gatherOffcutSymbols(CodeUnit cu, int max) {
|
||||||
|
|||||||
-4
@@ -44,10 +44,6 @@ public class LabelFieldFactoryTest extends AbstractGhidraHeadedIntegrationTest {
|
|||||||
private CodeBrowserPlugin cb;
|
private CodeBrowserPlugin cb;
|
||||||
private Program program;
|
private Program program;
|
||||||
|
|
||||||
public LabelFieldFactoryTest() {
|
|
||||||
super();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user