fix(ghidra): resolve file offsets in decompile (#2101)
* fix(native): expose loaded image bases in overviews * test(ghidra): retain resources when verifier cleanup fails * docs(ghidra): spell out file-offset address mapping * fix(ci): separate and retry NativeAOT dependency restoration * fix(test): resolve CI script file URLs on Windows * fix(native): retain conflict observations and actionable CLI guidance * fix(fixtures): keep NativeAOT retry logs credential-safe * fix(fixtures): redact authenticated URLs at diagnostic creation * fix(ghidra): restrict source-coordinate observations to decompilation * fix(cli): identify conflicting file-offset selectors accurately * fix(ghidra): bind file offsets to admitted target sources * fix(ghidra): preserve resolved file-offset failure context * test(ghidra): verify ELF address and file-offset round trips * test(nativeaot): align diagnostic regressions with fixture host support
This commit is contained in:
@@ -12,6 +12,38 @@ const selectors = [
|
||||
] as const;
|
||||
|
||||
describe("CLI analysis selector boundaries", () => {
|
||||
cliTest(
|
||||
"accepts file offsets and rejects mixed coordinate selectors before opening a target",
|
||||
async ({ cli }) => {
|
||||
const selected = await cli.run({
|
||||
arguments: [
|
||||
"decompile",
|
||||
"does-not-exist",
|
||||
"--file-offset=0x210",
|
||||
"--json",
|
||||
],
|
||||
environment: { REA_LOG_LEVEL: "silent" },
|
||||
});
|
||||
expect(selected.json).toMatchObject({ code: "target_unavailable" });
|
||||
const conflicting = await cli.run({
|
||||
arguments: [
|
||||
"decompile",
|
||||
"does-not-exist",
|
||||
"0x140001010",
|
||||
"--file-offset=0x210",
|
||||
"--json",
|
||||
],
|
||||
environment: { REA_LOG_LEVEL: "silent" },
|
||||
});
|
||||
expect(conflicting.json).toMatchObject({
|
||||
code: "invalid_request",
|
||||
details: {
|
||||
operation: "procedure_pseudo_code",
|
||||
issues: [{ path: ["file-offset"], reason: "invalid_value" }],
|
||||
},
|
||||
});
|
||||
},
|
||||
);
|
||||
cliTest(
|
||||
"rejects missing and conflicting selectors before opening a target",
|
||||
async ({ cli }) => {
|
||||
|
||||
Reference in New Issue
Block a user