fix(kuna): preserve reference target aliases
This commit is contained in:
1 parent
d588d2986f
commit
da842598bc
5 files changed
+14
-2
No files matched your search
@@ -18,7 +18,7 @@ export const workflowAnalysisProfile = (
|
||||
: operation === "batch_decompile"
|
||||
? { workflow_revision: 4 }
|
||||
: operation === "trace_feature"
|
||||
? { workflow_revision: 7 }
|
||||
? { workflow_revision: 8 }
|
||||
: operation === "get_call_graph"
|
||||
? { workflow_revision: 3 }
|
||||
: { workflow_revision: 1 }),
|
||||
|
||||
@@ -1348,7 +1348,7 @@ it("revises the trace_feature workflow profile so earlier results are not replay
|
||||
expect(
|
||||
workflowAnalysisProfile(profile, "trace_feature").parameters
|
||||
.workflow_revision,
|
||||
).toBe(7);
|
||||
).toBe(8);
|
||||
|
||||
expect(workflowAnalysisProfile(profile, "trace_feature")).not.toEqual(
|
||||
workflowAnalysisProfile(profile),
|
||||
|
||||
@@ -273,6 +273,10 @@ export interface KunaIncomingReferences {
|
||||
readonly bytes: number;
|
||||
readonly rows: number;
|
||||
readonly excludedAliasRows: number;
|
||||
readonly targetAliases: readonly {
|
||||
readonly name: string;
|
||||
readonly address: string;
|
||||
}[];
|
||||
readonly walkCoverage: z.infer<typeof xrefWalkCoverage> | null;
|
||||
readonly pointerCoverage: string | null;
|
||||
readonly pointers: Array<
|
||||
@@ -359,6 +363,10 @@ export const parseKunaIncomingReferences = (
|
||||
addresses: [...addresses].sort(compareKunaAddresses),
|
||||
rows: document.xrefs.length + (document.data_refs?.length ?? 0),
|
||||
excludedAliasRows,
|
||||
targetAliases: document.target.aliases.map(({ name, address }) => ({
|
||||
name,
|
||||
address,
|
||||
})),
|
||||
walkCoverage: document.coverage ?? null,
|
||||
pointerCoverage: document.data_refs_coverage ?? null,
|
||||
pointers:
|
||||
|
||||
@@ -1016,6 +1016,9 @@ export class KunaSessionClient implements AnalysisClient {
|
||||
bytes: references.value.bytes,
|
||||
examined_rows: references.value.rows,
|
||||
excluded_alias_rows: references.value.excludedAliasRows,
|
||||
target_aliases: references.value.targetAliases.map(
|
||||
({ name, address }) => ({ name, address }),
|
||||
),
|
||||
walk_coverage: references.value.walkCoverage,
|
||||
pointer_coverage: references.value.pointerCoverage,
|
||||
pointers: references.value.pointers,
|
||||
|
||||
@@ -371,6 +371,7 @@ it("counts pointer rows excluded because they target a forwarding alias", () =>
|
||||
addresses: ["0x1004", "0x4000"],
|
||||
rows: 5,
|
||||
excludedAliasRows: 2,
|
||||
targetAliases: [{ name: "slot", address: "0x3000" }],
|
||||
pointers: [
|
||||
{ from_address: "0x4000", to_address: "0x2000" },
|
||||
{ from_address: "0x4008", to_address: "0x3000" },
|
||||
|
||||
Reference in new issue
Block a user