Add all call and other xrefs to the abl output#6269
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Pull request overview
This PR updates the abl basic-block listing command so call targets and xrefs are gathered more accurately, including call xrefs discovered by analysis for indirect calls.
Changes:
- Adds
rz_analysis_op_is_call()as a reusable analysis helper. - Switches
ablcall/xref collection toRzSetU, deduplicating addresses. - Fixes the table
xrefscolumn to use actual xrefs and updates command tests.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
librz/arch/analysis.c |
Adds the new call-detection helper implementation. |
librz/include/rz_analysis.h |
Declares the new rz_analysis_op_is_call() API. |
librz/core/cmd/cmd_analysis.c |
Updates abl xref/call collection and output formatting. |
test/db/cmd/cmd_ab |
Updates expected ablt table output for deduplicated calls and corrected xrefs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files
... and 46 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
de2d87b to
2f6cfff
Compare
Your checklist for this pull request
RZ_APIfunction and struct this PR changes.RZ_API).Detailed description
The
abl(list all basic blocks) command has a column which lists the call targets from a basic block.It gets the call targets by disassembling each instruction in it and checks if it is a call. Then adds
op.jumpto the list of calls.This method fails though if the call is indirect (no statically known target), but there were some added during dynamic analysis.
Those xrefs are added now.
Additionally, this fixes a bug. Because the
xrefcolumn was filled with the call targets 🙄Test plan
All green, possibly fix some tests.
Closing issues
...