Merge remote-tracking branch 'origin/Ghidra_12.0'

This commit is contained in:
Ryan Kurtz 2025-09-29 10:42:33 -04:00
commit 97dcd914e8
3 changed files with 31 additions and 7 deletions

View file

@ -100,7 +100,7 @@ can also be used in headless mode with the new `-mirror` command line option.
## PyGhidra
PyGhidra 3.0.0 (compatible with Ghidra 12.0 and later) introduces many new Python-specific API
methods with the goal of making the most common Ghidra tasks quick and easy, such as opening a
project, getting a program, and running a GhidraScript. Legacy API fuctions such as
project, getting a program, and running a GhidraScript. Legacy API functions such as
`pyghidra.open_program()` and `pyghidra_run_script()` have been deprecated in favor of the new
methods. Below is an example program that showcases some of the new API functionality. See the
PyGhidra library README for more information.
@ -148,11 +148,11 @@ with pyghidra.open_project(os.environ["GHIDRA_PROJECT_DIR"], "ExampleProject", c
```
## Z3 Concolic Emulation and Symbolic Summary
We've added an experimental Z3-based symbolic emulator, which runs as an "auxilliary" domain to the
We've added an experimental Z3-based symbolic emulator, which runs as an "auxiliary" domain to the
concrete emulator, effectively constructing what is commonly called a "concolic" emulator. The
symbolic emulator creates Z3 expressions and branching constraints, but it only follows the path
determined by concrete emulation. This is most easily accessed by installing the "SymbolicSummaryZ3"
extension (**File** → **Install Extensions**) and then enabling the `Z3SummaryPlugin` in the
extension (**File** -> **Install Extensions**) and then enabling the `Z3SummaryPlugin` in the
Debugger or Emulator tool, which includes a GUI for viewing and sorting through the results. The Z3
emulator requires z3-4.13.0, available from https://github.com/Z3Prover/z3. Other versions may work,
but our current test configuration uses 4.13.0. Depending on the release and your platform, the

View file

@ -270,7 +270,9 @@ public class NewSymbolFilter implements SymbolFilter {
for (Element child : children) {
String childName = child.getAttributeValue(Filter.NAME_ATTRIBUTE);
Filter f = filterMap.get(childName);
f.restoreFromXml(child);
if (f != null) { // NOTE: filter definition may have been dropped and not found
f.restoreFromXml(child);
}
}
rebuildActiveFilters();

View file

@ -127,9 +127,31 @@ public class MarkdownToHtml {
@Override
public void setAttributes(Node node, String tagName, Map<String, String> attributes) {
if (node instanceof Code || node instanceof IndentedCodeBlock ||
node instanceof FencedCodeBlock) {
attributes.put("style", "background-color: #eef;");
// NOTE: This method will get called on both the <pre> and <code> tags, so be careful
// not to apply things twice
if (node instanceof FencedCodeBlock && tagName.equals("pre")) {
StringBuilder sb = new StringBuilder();
sb.append("background: #f4f4f4;");
sb.append("border: 1px solid #ddd;");
sb.append("border-left: 3px solid #f36d33;");
sb.append("color: #666;");
sb.append("display: block;");
sb.append("font-family: monospace;");
sb.append("line-height: 1.6;");
sb.append("margin-bottom: 1.6em;");
sb.append("max-width: 100%;");
sb.append("overflow: auto;");
sb.append("padding: 1em 1.5em;");
sb.append("page-break-inside: avoid;");
sb.append("word-wrap: break-word;");
attributes.put("style", sb.toString());
}
else if (node instanceof Code || node instanceof IndentedCodeBlock) {
StringBuilder sb = new StringBuilder();
sb.append("background: #f4f4f4;");
sb.append("font-family: monospace;");
attributes.put("style", sb.toString());
}
}
}