fix(ghidra): recover evidenced switch cases and default targets (#579)

Correlate typed labels with recovered block entries and one indirect dispatch.
Preserve ambiguous and nonexact integer associations as unknown with raw diagnostics.
Expose defaults separately, collect backing load metadata, and invalidate old profiles.
Add independent compiler-byte CLI/MCP acceptance and actual Ghidra model controls.

Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)
Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
This commit is contained in:
N0zoM1z0
2026-10-05 22:54:17 +08:00
committed by GitHub
parent bb91abd3df
commit b225b0f64b
26 changed files with 1955 additions and 55 deletions
+14
View File
@@ -114,6 +114,20 @@ export const ghidraNativeApiBoundary = () => ({
],
},
],
default_targets: [
{
target_address: "0x401030",
confidence: "high" as const,
evidence: [
{
kind: "jump-table" as const,
source: "ghidra-clang-case-token",
detail:
"Typed default label belongs to the block at 0x401030 with unique indirect dispatch predecessor 0x401010.",
},
],
},
],
limitations: [],
},
],
+7
View File
@@ -71,11 +71,18 @@ const jumpTableMappingSchema = z
})
.strict();
const jumpTableDefaultTargetSchema = z.strictObject({
target_address: z.string().min(1),
confidence: inferenceConfidenceSchema,
evidence: z.array(inferenceEvidenceSchema).min(1),
});
const inferredJumpTableSchema = z
.object({
dispatch_address: z.string().min(1),
data_sources: z.array(jumpTableDataSourceSchema),
mappings: z.array(jumpTableMappingSchema),
default_targets: z.array(jumpTableDefaultTargetSchema).default([]),
limitations: z.array(z.string()),
})
.strict();