Repository navigation
fix(ghidra): declare observed function facets and call coverage #3025
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Fixes #2980
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,11 +47,17 @@ const searchLimitation = | |
| const resolvedCallReferenceLimitation = | ||
| "Only resolved Ghidra call references are returned; unresolved computed or indirect calls remain unknown, while function classifications distinguish thunks and externals."; | ||
|
|
||
| /** Relationship-only caveats belong to each observed caller/callee result. */ | ||
| /** | ||
| * Relationship-only caveats belong to each observed caller/callee result. | ||
| * analyze_function reads its callers and callees from the same Ghidra | ||
| * FunctionManager call references as procedure_callers/procedure_callees. | ||
| */ | ||
| export const relationshipCoverageFor = ( | ||
| operation: string, | ||
| ): RelationshipCoverage | undefined => | ||
| operation === "procedure_callers" || operation === "procedure_callees" | ||
| operation === "procedure_callers" || | ||
| operation === "procedure_callees" || | ||
| operation === "analyze_function" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
With complete coverage for Share the unresolved-call collector from Prompt To Fix With AIThis is a comment left during a code review.
Path: src/ghidra/GhidraProviderCapabilities.ts
Line: 60
Comment:
**Unresolved calls look unchanged**
With complete coverage for `analyze_function`, functions with unresolved indirect calls compare as `unchanged` in the `calls` dimension when their resolved callers and callees match. `analyzeFunctionObservation` never adds `unresolved_calls`, and `functionCallCoverageLimitations` ignores diagnostics for complete coverage.
Share the unresolved-call collector from `procedureReferences` with `analyze_function` and include those sites in the dossier. This keeps unresolved calls `unknown` while allowing fully observed functions to compare normally.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! |
||
| ? { | ||
| status: "complete", | ||
| diagnostics: [resolvedCallReferenceLimitation], | ||
|
Comment on lines
+60
to
63
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When the analyzed function contains a targetless indirect/computed call, this new branch emits AGENTS.md reference: AGENTS.md:L19-L19 Useful? React with 👍 / 👎. |
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mock supplies
facet_availability, so this test only checks that the provider preserves it. Removing the Java declaration would leave the test passing.Add bridge-level coverage for an ordinary function and an external or bodyless function, including the unavailable
pseudocodebranch. That would catch regressions in the producer this PR changes.Prompt To Fix With AI
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!