mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
GP-2731 use warning bookmark for bad flows to address 00000000 instead
of error bookmark
This commit is contained in:
parent
102d1b7151
commit
791b4108de
1 changed files with 8 additions and 3 deletions
|
@ -1387,21 +1387,26 @@ public class Disassembler implements DisassemblerConflictHandler {
|
|||
return;
|
||||
}
|
||||
|
||||
boolean markAsError = true;
|
||||
|
||||
Address flowFrom = conflict.getFlowFromAddress();
|
||||
String flowMsg = flowFrom != null ? (" (flow from " + flowFrom + ")") : "";
|
||||
Address markAddr = address;
|
||||
if (!isBookmarkAllowed(markAddr)) {
|
||||
if (flowFrom != null) {
|
||||
markAddr = flowFrom;
|
||||
if (conflict.getInstructionErrorType() == InstructionErrorType.MEMORY &&
|
||||
address.getOffset() == 0) {
|
||||
markAsError = false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
bmMgr.setBookmark(markAddr, BookmarkType.ERROR, ERROR_BOOKMARK_CATEGORY,
|
||||
conflict.getConflictMessage() + flowMsg);
|
||||
|
||||
bmMgr.setBookmark(markAddr, markAsError ? BookmarkType.ERROR : BookmarkType.WARNING,
|
||||
ERROR_BOOKMARK_CATEGORY, conflict.getConflictMessage() + flowMsg);
|
||||
}
|
||||
|
||||
private boolean isBookmarkAllowed(Address addr) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue