fix(ghidra): resolve exact external function entries

This commit is contained in:
morluto
2026-10-09 03:54:02 +08:00
parent dcae3c6c14
commit 549effa056
7 changed files with 84 additions and 23 deletions
-23
View File
@@ -31,18 +31,6 @@ describe("containing-procedure complete body evidence", () => {
found: true,
procedure: identity(),
});
it("accepts the Java producer identity including complete inclusive body ranges", () => {
const value = found();
expect(
parseGhidraInventoryResult("resolve_containing_procedure", value),
).toEqual({ ok: true, value });
expect(
parseGhidraInventoryResult("resolve_containing_procedure", {
...value,
query_address: "0x1021",
}).ok,
).toBe(true);
});
it("rejects a missing body rather than treating a legacy identity as complete", () => {
const { body: omitted, ...legacy } = identity();
expect(omitted.total_bytes).toBe(5);
@@ -108,15 +96,4 @@ describe("containing-procedure complete body evidence", () => {
}).ok,
).toBe(false);
});
it("retains explicit not-found outcomes without fabricating a body", () => {
const value = {
query_address: "0x1010",
found: false,
procedure: null,
reason: "not_in_procedure",
};
expect(
parseGhidraInventoryResult("resolve_containing_procedure", value),
).toEqual({ ok: true, value });
});
});