mirror of
https://github.com/rizinorg/rizin
synced 2026-08-22 20:26:16 -04:00
Fix call flag in CFG json output. (#6639)
This commit is contained in:
parent
60514e78f9
commit
f05d8e228b
2 changed files with 3 additions and 1 deletions
|
|
@ -336,7 +336,7 @@ RZ_API void rz_graph_drawable_to_json(RZ_NONNULL RzGraph /*<RzGraphNodeInfo *, N
|
|||
pj_kb(pj, "is_malloc", print_node->type & RZ_GRAPH_NODE_SUBTYPE_ICFG_MALLOC);
|
||||
} else if (print_node->type == RZ_GRAPH_NODE_TYPE_CFG) {
|
||||
pj_kn(pj, "address", print_node->cfg.address);
|
||||
pj_kb(pj, "is_call", print_node->type & RZ_GRAPH_NODE_SUBTYPE_CFG_CALL);
|
||||
pj_kb(pj, "is_call", print_node->subtype & RZ_GRAPH_NODE_SUBTYPE_CFG_CALL);
|
||||
if (print_node->subtype & RZ_GRAPH_NODE_SUBTYPE_CFG_CALL && print_node->cfg.call_address != UT64_MAX) {
|
||||
pj_kn(pj, "call_address", print_node->cfg.call_address);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -617,6 +617,7 @@ FILE=bins/elf/analysis/x86_cfg_test
|
|||
CMDS=<<EOF
|
||||
s sym.ignore_call
|
||||
agF
|
||||
agF json
|
||||
EOF
|
||||
EXPECT=<<EOF
|
||||
.-----------------.
|
||||
|
|
@ -652,6 +653,7 @@ EXPECT=<<EOF
|
|||
.-----------------.
|
||||
| 0x80000ce (r) |
|
||||
`-----------------'
|
||||
{"nodes":[{"id":0,"address":134217923,"is_call":false,"is_entry":true,"is_exit":false,"is_return":false,"out_nodes":[1]},{"id":1,"address":134217924,"is_call":false,"is_entry":false,"is_exit":false,"is_return":false,"out_nodes":[2]},{"id":2,"address":134217927,"is_call":true,"call_address":134218600,"is_entry":false,"is_exit":false,"is_return":false,"out_nodes":[3]},{"id":3,"address":134217932,"is_call":false,"is_entry":false,"is_exit":false,"is_return":false,"out_nodes":[4]},{"id":4,"address":134217933,"is_call":false,"is_entry":false,"is_exit":false,"is_return":false,"out_nodes":[5]},{"id":5,"address":134217934,"is_call":false,"is_entry":false,"is_exit":false,"is_return":true,"out_nodes":[]}]}
|
||||
EOF
|
||||
RUN
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue