rizin/test/db/cmd/cmd_ag
2026-07-05 22:33:25 +08:00

1251 lines
43 KiB
Text

NAME=agc j
FILE=bins/elf/hello_world
CMDS=<<EOF
aa 2> /dev/null
agc j
EOF
EXPECT=<<EOF
{"nodes":[{"id":0,"title":"entry0","offset":1696,"out_nodes":[1]},{"id":1,"title":"reloc.__libc_start_main","offset":2101216,"out_nodes":[]}]}
EOF
RUN
NAME=agi
FILE=bins/elf/hello_world
CMDS=<<EOF
aa 2> /dev/null
agi *
EOF
EXPECT=<<EOF
agn "sym.imp.free"
agn "0x0000083f"
agn "_ITM_deregisterTMCloneTable"
agn "sym.imp.strcpy"
agn "0x00000814"
agn "sym.imp.puts"
agn "0x00000833"
agn "sym.imp.strlen"
agn "0x000007cf"
agn "0x000007de"
agn "__libc_start_main"
agn "__gmon_start__"
agn "sym.imp.malloc"
agn "0x000007f6"
agn "sym.imp.strcat"
agn "0x00000827"
agn "_ITM_registerTMCloneTable"
agn "sym.imp.__cxa_finalize"
agn "0x0000077e"
age "0x0000083f" "sym.imp.free"
age "0x00000814" "sym.imp.strcpy"
age "0x00000833" "sym.imp.puts"
age "0x000007cf" "sym.imp.strlen"
age "0x000007de" "sym.imp.strlen"
age "0x000007f6" "sym.imp.malloc"
age "0x00000827" "sym.imp.strcat"
age "0x0000077e" "sym.imp.__cxa_finalize"
EOF
RUN
NAME=agx
FILE=bins/elf/hello_world
CMDS=<<EOF
aa 2> /dev/null
agx * @ main
EOF
EXPECT=<<EOF
agn "sym.main"
agn "0x000006bd"
age "0x000006bd" "sym.main"
EOF
RUN
NAME=formats
FILE=bins/elf/hello_world
CMDS=<<EOF
aa 2> /dev/null
agx @ main
agi d
agi g
agi j
agi k
EOF
EXPECT=<<EOF
.--------------.
| 0x000006bd |
`--------------'
v
|
'.
|
.------------.
| sym.main |
`------------'
digraph code {
rankdir=LR;
outputorder=edgesfirst
graph [bgcolor=azure];
edge [arrowhead=normal, color="#3030c0" style=bold weight=2 ];
node [fillcolor=white, style=filled shape=box fontsize="8" fontname="Courier"];
0 [URL="sym.imp.free", color="lightgray", label="sym.imp.free"]
1 [URL="0x0000083f", color="lightgray", label="0x0000083f"]
1 -> 0
2 [URL="_ITM_deregisterTMCloneTable", color="lightgray", label="_ITM_deregisterTMCloneTable"]
3 [URL="sym.imp.strcpy", color="lightgray", label="sym.imp.strcpy"]
4 [URL="0x00000814", color="lightgray", label="0x00000814"]
4 -> 3
5 [URL="sym.imp.puts", color="lightgray", label="sym.imp.puts"]
6 [URL="0x00000833", color="lightgray", label="0x00000833"]
6 -> 5
7 [URL="sym.imp.strlen", color="lightgray", label="sym.imp.strlen"]
8 [URL="0x000007cf", color="lightgray", label="0x000007cf"]
8 -> 7
9 [URL="0x000007de", color="lightgray", label="0x000007de"]
9 -> 7
10 [URL="__libc_start_main", color="lightgray", label="__libc_start_main"]
11 [URL="__gmon_start__", color="lightgray", label="__gmon_start__"]
12 [URL="sym.imp.malloc", color="lightgray", label="sym.imp.malloc"]
13 [URL="0x000007f6", color="lightgray", label="0x000007f6"]
13 -> 12
14 [URL="sym.imp.strcat", color="lightgray", label="sym.imp.strcat"]
15 [URL="0x00000827", color="lightgray", label="0x00000827"]
15 -> 14
16 [URL="_ITM_registerTMCloneTable", color="lightgray", label="_ITM_registerTMCloneTable"]
17 [URL="sym.imp.__cxa_finalize", color="lightgray", label="sym.imp.__cxa_finalize"]
18 [URL="0x0000077e", color="lightgray", label="0x0000077e"]
18 -> 17
}
graph
[
hierarchic 1
label ""
directed 1
node [
id 0
label "sym.imp.free"
]
node [
id 1
label "0x0000083f"
]
node [
id 2
label "_ITM_deregisterTMCloneTable"
]
node [
id 3
label "sym.imp.strcpy"
]
node [
id 4
label "0x00000814"
]
node [
id 5
label "sym.imp.puts"
]
node [
id 6
label "0x00000833"
]
node [
id 7
label "sym.imp.strlen"
]
node [
id 8
label "0x000007cf"
]
node [
id 9
label "0x000007de"
]
node [
id 10
label "__libc_start_main"
]
node [
id 11
label "__gmon_start__"
]
node [
id 12
label "sym.imp.malloc"
]
node [
id 13
label "0x000007f6"
]
node [
id 14
label "sym.imp.strcat"
]
node [
id 15
label "0x00000827"
]
node [
id 16
label "_ITM_registerTMCloneTable"
]
node [
id 17
label "sym.imp.__cxa_finalize"
]
node [
id 18
label "0x0000077e"
]
edge [
source 1
target 0
]
edge [
source 4
target 3
]
edge [
source 6
target 5
]
edge [
source 8
target 7
]
edge [
source 9
target 7
]
edge [
source 13
target 12
]
edge [
source 15
target 14
]
edge [
source 18
target 17
]
]
{"nodes":[{"id":0,"title":"sym.imp.free","offset":1584,"out_nodes":[]},{"id":1,"title":"0x0000083f","offset":2111,"out_nodes":[0]},{"id":2,"title":"_ITM_deregisterTMCloneTable","offset":0,"out_nodes":[]},{"id":3,"title":"sym.imp.strcpy","offset":1600,"out_nodes":[]},{"id":4,"title":"0x00000814","offset":2068,"out_nodes":[3]},{"id":5,"title":"sym.imp.puts","offset":1616,"out_nodes":[]},{"id":6,"title":"0x00000833","offset":2099,"out_nodes":[5]},{"id":7,"title":"sym.imp.strlen","offset":1632,"out_nodes":[]},{"id":8,"title":"0x000007cf","offset":1999,"out_nodes":[7]},{"id":9,"title":"0x000007de","offset":2014,"out_nodes":[7]},{"id":10,"title":"__libc_start_main","offset":0,"out_nodes":[]},{"id":11,"title":"__gmon_start__","offset":0,"out_nodes":[]},{"id":12,"title":"sym.imp.malloc","offset":1648,"out_nodes":[]},{"id":13,"title":"0x000007f6","offset":2038,"out_nodes":[12]},{"id":14,"title":"sym.imp.strcat","offset":1664,"out_nodes":[]},{"id":15,"title":"0x00000827","offset":2087,"out_nodes":[14]},{"id":16,"title":"_ITM_registerTMCloneTable","offset":0,"out_nodes":[]},{"id":17,"title":"sym.imp.__cxa_finalize","offset":1680,"out_nodes":[]},{"id":18,"title":"0x0000077e","offset":1918,"out_nodes":[17]}]}
agraph.color_box=G1swbQ==
agraph.delta_x=0x72
agraph.delta_y=0x1
agraph.h=0x14
agraph.is_callgraph=false
agraph.nodes=sym.imp.free,0x0000083f,_ITM_deregisterTMCloneTable,sym.imp.strcpy,0x00000814,sym.imp.puts,0x00000833,sym.imp.strlen,0x000007cf,0x000007de,__libc_start_main,__gmon_start__,sym.imp.malloc,0x000007f6,sym.imp.strcat,0x00000827,_ITM_registerTMCloneTable,sym.imp.__cxa_finalize,0x0000077e
agraph.nodes.0x0000077e.body=base64:
agraph.nodes.0x0000077e.h=0x3
agraph.nodes.0x0000077e.neighbours=sym.imp.__cxa_finalize
agraph.nodes.0x0000077e.w=0x10
agraph.nodes.0x0000077e.x=0x10d
agraph.nodes.0x0000077e.y=0x72
agraph.nodes.0x000007cf.body=base64:
agraph.nodes.0x000007cf.h=0x3
agraph.nodes.0x000007cf.neighbours=sym.imp.strlen
agraph.nodes.0x000007cf.w=0x10
agraph.nodes.0x000007cf.x=0x67
agraph.nodes.0x000007cf.y=0x72
agraph.nodes.0x000007de.body=base64:
agraph.nodes.0x000007de.h=0x3
agraph.nodes.0x000007de.neighbours=sym.imp.strlen
agraph.nodes.0x000007de.w=0x10
agraph.nodes.0x000007de.x=0x7b
agraph.nodes.0x000007de.y=0x72
agraph.nodes.0x000007f6.body=base64:
agraph.nodes.0x000007f6.h=0x3
agraph.nodes.0x000007f6.neighbours=sym.imp.malloc
agraph.nodes.0x000007f6.w=0x10
agraph.nodes.0x000007f6.x=0xc1
agraph.nodes.0x000007f6.y=0x72
agraph.nodes.0x00000814.body=base64:
agraph.nodes.0x00000814.h=0x3
agraph.nodes.0x00000814.neighbours=sym.imp.strcpy
agraph.nodes.0x00000814.w=0x10
agraph.nodes.0x00000814.x=0x3d
agraph.nodes.0x00000814.y=0x72
agraph.nodes.0x00000827.body=base64:
agraph.nodes.0x00000827.h=0x3
agraph.nodes.0x00000827.neighbours=sym.imp.strcat
agraph.nodes.0x00000827.w=0x10
agraph.nodes.0x00000827.x=0xd7
agraph.nodes.0x00000827.y=0x72
agraph.nodes.0x00000833.body=base64:
agraph.nodes.0x00000833.h=0x3
agraph.nodes.0x00000833.neighbours=sym.imp.puts
agraph.nodes.0x00000833.w=0x10
agraph.nodes.0x00000833.x=0x53
agraph.nodes.0x00000833.y=0x72
agraph.nodes.0x0000083f.body=base64:
agraph.nodes.0x0000083f.h=0x3
agraph.nodes.0x0000083f.neighbours=sym.imp.free
agraph.nodes.0x0000083f.w=0x10
agraph.nodes.0x0000083f.x=0x1
agraph.nodes.0x0000083f.y=0x72
agraph.nodes._ITM_deregisterTMCloneTable.body=base64:
agraph.nodes._ITM_deregisterTMCloneTable.h=0x3
agraph.nodes._ITM_deregisterTMCloneTable.w=0x21
agraph.nodes._ITM_deregisterTMCloneTable.x=0x15
agraph.nodes._ITM_deregisterTMCloneTable.y=0x72
agraph.nodes._ITM_registerTMCloneTable.body=base64:
agraph.nodes._ITM_registerTMCloneTable.h=0x3
agraph.nodes._ITM_registerTMCloneTable.w=0x1f
agraph.nodes._ITM_registerTMCloneTable.x=0xeb
agraph.nodes._ITM_registerTMCloneTable.y=0x72
agraph.nodes.__gmon_start__.body=base64:
agraph.nodes.__gmon_start__.h=0x3
agraph.nodes.__gmon_start__.w=0x14
agraph.nodes.__gmon_start__.x=0xa9
agraph.nodes.__gmon_start__.y=0x72
agraph.nodes.__libc_start_main.body=base64:
agraph.nodes.__libc_start_main.h=0x3
agraph.nodes.__libc_start_main.w=0x17
agraph.nodes.__libc_start_main.x=0x8f
agraph.nodes.__libc_start_main.y=0x72
agraph.nodes.sym.imp.__cxa_finalize.body=base64:
agraph.nodes.sym.imp.__cxa_finalize.h=0x3
agraph.nodes.sym.imp.__cxa_finalize.w=0x1c
agraph.nodes.sym.imp.__cxa_finalize.x=0xff
agraph.nodes.sym.imp.__cxa_finalize.y=0x7f
agraph.nodes.sym.imp.free.body=base64:
agraph.nodes.sym.imp.free.h=0x3
agraph.nodes.sym.imp.free.w=0x12
agraph.nodes.sym.imp.free.x=0
agraph.nodes.sym.imp.free.y=0x7f
agraph.nodes.sym.imp.malloc.body=base64:
agraph.nodes.sym.imp.malloc.h=0x3
agraph.nodes.sym.imp.malloc.w=0x14
agraph.nodes.sym.imp.malloc.x=0xb9
agraph.nodes.sym.imp.malloc.y=0x7f
agraph.nodes.sym.imp.puts.body=base64:
agraph.nodes.sym.imp.puts.h=0x3
agraph.nodes.sym.imp.puts.w=0x12
agraph.nodes.sym.imp.puts.x=0x53
agraph.nodes.sym.imp.puts.y=0x7f
agraph.nodes.sym.imp.strcat.body=base64:
agraph.nodes.sym.imp.strcat.h=0x3
agraph.nodes.sym.imp.strcat.w=0x14
agraph.nodes.sym.imp.strcat.x=0xd1
agraph.nodes.sym.imp.strcat.y=0x7f
agraph.nodes.sym.imp.strcpy.body=base64:
agraph.nodes.sym.imp.strcpy.h=0x3
agraph.nodes.sym.imp.strcpy.w=0x14
agraph.nodes.sym.imp.strcpy.x=0x3b
agraph.nodes.sym.imp.strcpy.y=0x7f
agraph.nodes.sym.imp.strlen.body=base64:
agraph.nodes.sym.imp.strlen.h=0x3
agraph.nodes.sym.imp.strlen.w=0x14
agraph.nodes.sym.imp.strlen.x=0x69
agraph.nodes.sym.imp.strlen.y=0x7f
agraph.w=0x11d
EOF
RUN
NAME=aga multiple formats
FILE=bins/elf/hello_world
CMDS=<<EOF
aa 2> /dev/null
aga
aga ascii
aga cmd
aga dot
aga gml
aga json
aga json_disasm
aga sdb
EOF
EXPECT=<<EOF
.----------.
| entry0 |
`----------'
.----------.
| entry0 |
`----------'
agn "entry0"
digraph code {
rankdir=LR;
outputorder=edgesfirst
graph [bgcolor=azure];
edge [arrowhead=normal, color="#3030c0" style=bold weight=2 ];
node [fillcolor=white, style=filled shape=box fontsize="8" fontname="Courier"];
0 [URL="entry0", color="lightgray", label="entry0"]
}
graph
[
hierarchic 1
label ""
directed 1
node [
id 0
label "entry0"
]
]
{"nodes":[{"id":0,"title":"entry0","offset":1696,"out_nodes":[]}]}
{"nodes":[{"id":0,"title":"entry0","offset":1696,"out_nodes":[]}]}
agraph.color_box=G1swbQ==
agraph.delta_x=0
agraph.delta_y=0x1
agraph.h=0x6
agraph.is_callgraph=false
agraph.nodes=entry0
agraph.nodes.entry0.body=base64:
agraph.nodes.entry0.h=0x3
agraph.nodes.entry0.w=0xc
agraph.nodes.entry0.x=0x13
agraph.nodes.entry0.y=0
agraph.w=0xc
EOF
RUN
NAME=agA multiple formats
FILE=bins/elf/hello_world
CMDS=<<EOF
aa 2> /dev/null
agA
agA ascii
agA cmd
agA dot
agA gml
agA json
agA json_disasm
agA sdb
EOF
EXPECT=<<EOF
.----------. .----------------------------. .--------------------------. .-----------------------------. .--------------------------. .---------------. .-----------------------. .-------------. .-----------------------. .-----------. .------------------. .------------------. .------------------. .------------------. .----------------. .----------------. .-------------.
| entry0 | | sym.deregister_tm_clones | | sym.register_tm_clones | | sym.__do_global_dtors_aux | | sym.imp.__cxa_finalize | | entry.init0 | | sym.__libc_csu_fini | | sym._fini | | sym.__libc_csu_init | | main | | sym.imp.strlen | | sym.imp.malloc | | sym.imp.strcpy | | sym.imp.strcat | | sym.imp.puts | | sym.imp.free | | sym._init |
`----------' `----------------------------' `--------------------------' `-----------------------------' `--------------------------' `---------------' `-----------------------' `-------------' `-----------------------' `-----------' `------------------' `------------------' `------------------' `------------------' `----------------' `----------------' `-------------'
v t f
| | |
'---. | |
| .------------' |
| | '--.
| | |
.--------------------. .-------------. .----------------.
| obj.__dso_handle | | str.Hello | | str.r2_folks |
`--------------------' `-------------' `----------------'
.----------. .----------------------------. .--------------------------. .-----------------------------. .--------------------------. .---------------. .-----------------------. .-------------. .-----------------------. .-----------. .------------------. .------------------. .------------------. .------------------. .----------------. .----------------. .-------------.
| entry0 | | sym.deregister_tm_clones | | sym.register_tm_clones | | sym.__do_global_dtors_aux | | sym.imp.__cxa_finalize | | entry.init0 | | sym.__libc_csu_fini | | sym._fini | | sym.__libc_csu_init | | main | | sym.imp.strlen | | sym.imp.malloc | | sym.imp.strcpy | | sym.imp.strcat | | sym.imp.puts | | sym.imp.free | | sym._init |
`----------' `----------------------------' `--------------------------' `-----------------------------' `--------------------------' `---------------' `-----------------------' `-------------' `-----------------------' `-----------' `------------------' `------------------' `------------------' `------------------' `----------------' `----------------' `-------------'
v t f
| | |
'---. | |
| .------------' |
| | '--.
| | |
.--------------------. .-------------. .----------------.
| obj.__dso_handle | | str.Hello | | str.r2_folks |
`--------------------' `-------------' `----------------'
agn "entry0"
agn "sym.deregister_tm_clones"
agn "sym.register_tm_clones"
agn "sym.__do_global_dtors_aux"
agn "obj.__dso_handle"
agn "sym.imp.__cxa_finalize"
agn "entry.init0"
agn "sym.__libc_csu_fini"
agn "sym._fini"
agn "sym.__libc_csu_init"
agn "main"
agn "str.Hello"
agn "str.r2_folks"
agn "sym.imp.strlen"
agn "sym.imp.malloc"
agn "sym.imp.strcpy"
agn "sym.imp.strcat"
agn "sym.imp.puts"
agn "sym.imp.free"
agn "sym._init"
age "sym.__do_global_dtors_aux" "obj.__dso_handle"
age "main" "str.Hello"
age "main" "str.r2_folks"
digraph code {
rankdir=LR;
outputorder=edgesfirst
graph [bgcolor=azure];
edge [arrowhead=normal, color="#3030c0" style=bold weight=2 ];
node [fillcolor=white, style=filled shape=box fontsize="8" fontname="Courier"];
0 [URL="entry0", color="lightgray", label="entry0"]
1 [URL="sym.deregister_tm_clones", color="lightgray", label="sym.deregister_tm_clones"]
2 [URL="sym.register_tm_clones", color="lightgray", label="sym.register_tm_clones"]
3 [URL="sym.__do_global_dtors_aux", color="lightgray", label="sym.__do_global_dtors_aux"]
3 -> 4
4 [URL="obj.__dso_handle", color="lightgray", label="obj.__dso_handle"]
5 [URL="sym.imp.__cxa_finalize", color="lightgray", label="sym.imp.__cxa_finalize"]
6 [URL="entry.init0", color="lightgray", label="entry.init0"]
7 [URL="sym.__libc_csu_fini", color="lightgray", label="sym.__libc_csu_fini"]
8 [URL="sym._fini", color="lightgray", label="sym._fini"]
9 [URL="sym.__libc_csu_init", color="lightgray", label="sym.__libc_csu_init"]
10 [URL="main", color="lightgray", label="main"]
10 -> 11
10 -> 12
11 [URL="str.Hello", color="lightgray", label="str.Hello"]
12 [URL="str.r2_folks", color="lightgray", label="str.r2_folks"]
13 [URL="sym.imp.strlen", color="lightgray", label="sym.imp.strlen"]
14 [URL="sym.imp.malloc", color="lightgray", label="sym.imp.malloc"]
15 [URL="sym.imp.strcpy", color="lightgray", label="sym.imp.strcpy"]
16 [URL="sym.imp.strcat", color="lightgray", label="sym.imp.strcat"]
17 [URL="sym.imp.puts", color="lightgray", label="sym.imp.puts"]
18 [URL="sym.imp.free", color="lightgray", label="sym.imp.free"]
19 [URL="sym._init", color="lightgray", label="sym._init"]
}
graph
[
hierarchic 1
label ""
directed 1
node [
id 0
label "entry0"
]
node [
id 1
label "sym.deregister_tm_clones"
]
node [
id 2
label "sym.register_tm_clones"
]
node [
id 3
label "sym.__do_global_dtors_aux"
]
node [
id 4
label "obj.__dso_handle"
]
node [
id 5
label "sym.imp.__cxa_finalize"
]
node [
id 6
label "entry.init0"
]
node [
id 7
label "sym.__libc_csu_fini"
]
node [
id 8
label "sym._fini"
]
node [
id 9
label "sym.__libc_csu_init"
]
node [
id 10
label "main"
]
node [
id 11
label "str.Hello"
]
node [
id 12
label "str.r2_folks"
]
node [
id 13
label "sym.imp.strlen"
]
node [
id 14
label "sym.imp.malloc"
]
node [
id 15
label "sym.imp.strcpy"
]
node [
id 16
label "sym.imp.strcat"
]
node [
id 17
label "sym.imp.puts"
]
node [
id 18
label "sym.imp.free"
]
node [
id 19
label "sym._init"
]
edge [
source 3
target 4
]
edge [
source 10
target 11
]
edge [
source 10
target 12
]
]
{"nodes":[{"id":0,"title":"entry0","offset":1696,"out_nodes":[]},{"id":1,"title":"sym.deregister_tm_clones","offset":1744,"out_nodes":[]},{"id":2,"title":"sym.register_tm_clones","offset":1808,"out_nodes":[]},{"id":3,"title":"sym.__do_global_dtors_aux","offset":1888,"out_nodes":[4]},{"id":4,"title":"obj.__dso_handle","offset":2101256,"out_nodes":[]},{"id":5,"title":"sym.imp.__cxa_finalize","offset":1680,"out_nodes":[]},{"id":6,"title":"entry.init0","offset":1952,"out_nodes":[]},{"id":7,"title":"sym.__libc_csu_fini","offset":2240,"out_nodes":[]},{"id":8,"title":"sym._fini","offset":2244,"out_nodes":[]},{"id":9,"title":"sym.__libc_csu_init","offset":2128,"out_nodes":[]},{"id":10,"title":"main","offset":1962,"out_nodes":[11,12]},{"id":11,"title":"str.Hello","offset":2260,"out_nodes":[]},{"id":12,"title":"str.r2_folks","offset":2266,"out_nodes":[]},{"id":13,"title":"sym.imp.strlen","offset":1632,"out_nodes":[]},{"id":14,"title":"sym.imp.malloc","offset":1648,"out_nodes":[]},{"id":15,"title":"sym.imp.strcpy","offset":1600,"out_nodes":[]},{"id":16,"title":"sym.imp.strcat","offset":1664,"out_nodes":[]},{"id":17,"title":"sym.imp.puts","offset":1616,"out_nodes":[]},{"id":18,"title":"sym.imp.free","offset":1584,"out_nodes":[]},{"id":19,"title":"sym._init","offset":1544,"out_nodes":[]}]}
{"nodes":[{"id":0,"title":"entry0","offset":1696,"out_nodes":[]},{"id":1,"title":"sym.deregister_tm_clones","offset":1744,"out_nodes":[]},{"id":2,"title":"sym.register_tm_clones","offset":1808,"out_nodes":[]},{"id":3,"title":"sym.__do_global_dtors_aux","offset":1888,"out_nodes":[4]},{"id":4,"title":"obj.__dso_handle","offset":2101256,"out_nodes":[]},{"id":5,"title":"sym.imp.__cxa_finalize","offset":1680,"out_nodes":[]},{"id":6,"title":"entry.init0","offset":1952,"out_nodes":[]},{"id":7,"title":"sym.__libc_csu_fini","offset":2240,"out_nodes":[]},{"id":8,"title":"sym._fini","offset":2244,"out_nodes":[]},{"id":9,"title":"sym.__libc_csu_init","offset":2128,"out_nodes":[]},{"id":10,"title":"main","offset":1962,"out_nodes":[11,12]},{"id":11,"title":"str.Hello","offset":2260,"out_nodes":[]},{"id":12,"title":"str.r2_folks","offset":2266,"out_nodes":[]},{"id":13,"title":"sym.imp.strlen","offset":1632,"out_nodes":[]},{"id":14,"title":"sym.imp.malloc","offset":1648,"out_nodes":[]},{"id":15,"title":"sym.imp.strcpy","offset":1600,"out_nodes":[]},{"id":16,"title":"sym.imp.strcat","offset":1664,"out_nodes":[]},{"id":17,"title":"sym.imp.puts","offset":1616,"out_nodes":[]},{"id":18,"title":"sym.imp.free","offset":1584,"out_nodes":[]},{"id":19,"title":"sym._init","offset":1544,"out_nodes":[]}]}
agraph.color_box=G1swbQ==
agraph.delta_x=0xb4
agraph.delta_y=0x1
agraph.h=0xf
agraph.is_callgraph=false
agraph.nodes=entry0,sym.deregister_tm_clones,sym.register_tm_clones,sym.__do_global_dtors_aux,obj.__dso_handle,sym.imp.__cxa_finalize,entry.init0,sym.__libc_csu_fini,sym._fini,sym.__libc_csu_init,main,str.Hello,str.r2_folks,sym.imp.strlen,sym.imp.malloc,sym.imp.strcpy,sym.imp.strcat,sym.imp.puts,sym.imp.free,sym._init
agraph.nodes.entry.init0.body=base64:
agraph.nodes.entry.init0.h=0x3
agraph.nodes.entry.init0.w=0x11
agraph.nodes.entry.init0.x=0x94
agraph.nodes.entry.init0.y=0xb4
agraph.nodes.entry0.body=base64:
agraph.nodes.entry0.h=0x3
agraph.nodes.entry0.w=0xc
agraph.nodes.entry0.x=0
agraph.nodes.entry0.y=0xb4
agraph.nodes.main.body=base64:
agraph.nodes.main.h=0x3
agraph.nodes.main.neighbours=str.Hello,str.r2_folks
agraph.nodes.main.w=0xd
agraph.nodes.main.x=0xf2
agraph.nodes.main.y=0xb4
agraph.nodes.obj.__dso_handle.body=base64:
agraph.nodes.obj.__dso_handle.h=0x3
agraph.nodes.obj.__dso_handle.w=0x16
agraph.nodes.obj.__dso_handle.x=0x56
agraph.nodes.obj.__dso_handle.y=0xbd
agraph.nodes.str.Hello.body=base64:
agraph.nodes.str.Hello.h=0x3
agraph.nodes.str.Hello.w=0xf
agraph.nodes.str.Hello.x=0xe7
agraph.nodes.str.Hello.y=0xbd
agraph.nodes.str.r2_folks.body=base64:
agraph.nodes.str.r2_folks.h=0x3
agraph.nodes.str.r2_folks.w=0x12
agraph.nodes.str.r2_folks.x=0xf9
agraph.nodes.str.r2_folks.y=0xbd
agraph.nodes.sym.__do_global_dtors_aux.body=base64:
agraph.nodes.sym.__do_global_dtors_aux.h=0x3
agraph.nodes.sym.__do_global_dtors_aux.neighbours=obj.__dso_handle
agraph.nodes.sym.__do_global_dtors_aux.w=0x1f
agraph.nodes.sym.__do_global_dtors_aux.x=0x52
agraph.nodes.sym.__do_global_dtors_aux.y=0xb4
agraph.nodes.sym.__libc_csu_fini.body=base64:
agraph.nodes.sym.__libc_csu_fini.h=0x3
agraph.nodes.sym.__libc_csu_fini.w=0x19
agraph.nodes.sym.__libc_csu_fini.x=0xa8
agraph.nodes.sym.__libc_csu_fini.y=0xb4
agraph.nodes.sym.__libc_csu_init.body=base64:
agraph.nodes.sym.__libc_csu_init.h=0x3
agraph.nodes.sym.__libc_csu_init.w=0x19
agraph.nodes.sym.__libc_csu_init.x=0xd6
agraph.nodes.sym.__libc_csu_init.y=0xb4
agraph.nodes.sym._fini.body=base64:
agraph.nodes.sym._fini.h=0x3
agraph.nodes.sym._fini.w=0xf
agraph.nodes.sym._fini.x=0xc4
agraph.nodes.sym._fini.y=0xb4
agraph.nodes.sym._init.body=base64:
agraph.nodes.sym._init.h=0x3
agraph.nodes.sym._init.w=0xf
agraph.nodes.sym._init.x=0x18e
agraph.nodes.sym._init.y=0xb4
agraph.nodes.sym.deregister_tm_clones.body=base64:
agraph.nodes.sym.deregister_tm_clones.h=0x3
agraph.nodes.sym.deregister_tm_clones.w=0x1e
agraph.nodes.sym.deregister_tm_clones.x=0x10
agraph.nodes.sym.deregister_tm_clones.y=0xb4
agraph.nodes.sym.imp.__cxa_finalize.body=base64:
agraph.nodes.sym.imp.__cxa_finalize.h=0x3
agraph.nodes.sym.imp.__cxa_finalize.w=0x1c
agraph.nodes.sym.imp.__cxa_finalize.x=0x74
agraph.nodes.sym.imp.__cxa_finalize.y=0xb4
agraph.nodes.sym.imp.free.body=base64:
agraph.nodes.sym.imp.free.h=0x3
agraph.nodes.sym.imp.free.w=0x12
agraph.nodes.sym.imp.free.x=0x178
agraph.nodes.sym.imp.free.y=0xb4
agraph.nodes.sym.imp.malloc.body=base64:
agraph.nodes.sym.imp.malloc.h=0x3
agraph.nodes.sym.imp.malloc.w=0x14
agraph.nodes.sym.imp.malloc.x=0x11a
agraph.nodes.sym.imp.malloc.y=0xb4
agraph.nodes.sym.imp.puts.body=base64:
agraph.nodes.sym.imp.puts.h=0x3
agraph.nodes.sym.imp.puts.w=0x12
agraph.nodes.sym.imp.puts.x=0x162
agraph.nodes.sym.imp.puts.y=0xb4
agraph.nodes.sym.imp.strcat.body=base64:
agraph.nodes.sym.imp.strcat.h=0x3
agraph.nodes.sym.imp.strcat.w=0x14
agraph.nodes.sym.imp.strcat.x=0x14a
agraph.nodes.sym.imp.strcat.y=0xb4
agraph.nodes.sym.imp.strcpy.body=base64:
agraph.nodes.sym.imp.strcpy.h=0x3
agraph.nodes.sym.imp.strcpy.w=0x14
agraph.nodes.sym.imp.strcpy.x=0x132
agraph.nodes.sym.imp.strcpy.y=0xb4
agraph.nodes.sym.imp.strlen.body=base64:
agraph.nodes.sym.imp.strlen.h=0x3
agraph.nodes.sym.imp.strlen.w=0x14
agraph.nodes.sym.imp.strlen.x=0x102
agraph.nodes.sym.imp.strlen.y=0xb4
agraph.nodes.sym.register_tm_clones.body=base64:
agraph.nodes.sym.register_tm_clones.h=0x3
agraph.nodes.sym.register_tm_clones.w=0x1c
agraph.nodes.sym.register_tm_clones.x=0x32
agraph.nodes.sym.register_tm_clones.y=0xb4
agraph.w=0x19d
EOF
RUN
NAME=agc multiple formats
FILE=bins/elf/hello_world
CMDS=<<EOF
aa 2> /dev/null
agc ascii
agc cmd
agc dot
agc gml
agc json
agc json_disasm
agc sdb
EOF
EXPECT=<<EOF
.----------.
| entry0 |
`----------'
t
|
.-------'
|
.---------------------------.
| reloc.__libc_start_main |
`---------------------------'
agn "entry0"
agn "reloc.__libc_start_main"
age "entry0" "reloc.__libc_start_main"
digraph code {
rankdir=LR;
outputorder=edgesfirst
graph [bgcolor=azure];
edge [arrowhead=normal, color="#3030c0" style=bold weight=2 ];
node [fillcolor=white, style=filled shape=box fontsize="8" fontname="Courier"];
0 [URL="entry0", color="lightgray", label="entry0"]
0 -> 1
1 [URL="reloc.__libc_start_main", color="lightgray", label="reloc.__libc_start_main"]
}
graph
[
hierarchic 1
label ""
directed 1
node [
id 0
label "entry0"
]
node [
id 1
label "reloc.__libc_start_main"
]
edge [
source 0
target 1
]
]
{"nodes":[{"id":0,"title":"entry0","offset":1696,"out_nodes":[1]},{"id":1,"title":"reloc.__libc_start_main","offset":2101216,"out_nodes":[]}]}
{"nodes":[{"id":0,"title":"entry0","offset":1696,"out_nodes":[1]},{"id":1,"title":"reloc.__libc_start_main","offset":2101216,"out_nodes":[]}]}
agraph.color_box=G1swbQ==
agraph.delta_x=0
agraph.delta_y=0x1
agraph.h=0xe
agraph.is_callgraph=true
agraph.nodes=entry0,reloc.__libc_start_main
agraph.nodes.entry0.body=base64:
agraph.nodes.entry0.h=0x3
agraph.nodes.entry0.neighbours=reloc.__libc_start_main
agraph.nodes.entry0.w=0xc
agraph.nodes.entry0.x=0x13
agraph.nodes.entry0.y=0
agraph.nodes.reloc.__libc_start_main.body=base64:
agraph.nodes.reloc.__libc_start_main.h=0x3
agraph.nodes.reloc.__libc_start_main.w=0x1d
agraph.nodes.reloc.__libc_start_main.x=0xb
agraph.nodes.reloc.__libc_start_main.y=0x7
agraph.w=0x1d
EOF
RUN
NAME=agf multiple formats
FILE=bins/elf/hello_world
CMDS=<<EOF
aa 2> /dev/null
agf ascii
agf cmd
agf dot
agf gml
agf json
agf json_disasm
agf sdb
EOF
EXPECT=<<EOF
.--------------------------------------------------------.
| 0x6a0 |
| ; [13] -r-x section size 546 named .text |
| ;-- section..text: |
| ;-- .text: |
| ;-- _start: |
| entry0(int64_t arg3); |
| ; arg int64_t arg3 @ rdx |
| xor ebp, ebp |
| ; arg3 |
| mov r9, rdx |
| pop rsi |
| mov rdx, rsp |
| and rsp, 0xfffffffffffffff0 |
| push rax |
| push rsp |
| ; 0x8c0 |
| lea r8, qword [sym.__libc_csu_fini] |
| ; 0x850 |
| ; "AWAVA\x89\xffAUATL\x8d%.\U00000005 " |
| lea rcx, qword [sym.__libc_csu_init] |
| ; 0x7aa |
| lea rdi, qword [main] |
| ; [0x200fe0:8]=0x201058 reloc.target.__libc_start_main |
| ; "X\U00000010 " |
| call qword [reloc.__libc_start_main] |
`--------------------------------------------------------'
agn "0x6a0" base64:OyBbMTNdIC1yLXggc2VjdGlvbiBzaXplIDU0NiBuYW1lZCAudGV4dAogIDstLSBzZWN0aW9uLi50ZXh0OgogIDstLSAudGV4dDoKICA7LS0gX3N0YXJ0OgplbnRyeTAoaW50NjRfdCBhcmczKTsKOyBhcmcgaW50NjRfdCBhcmczIEAgcmR4CnhvciBlYnAsIGVicAo7IGFyZzMKbW92IHI5LCByZHgKcG9wIHJzaQptb3YgcmR4LCByc3AKYW5kIHJzcCwgMHhmZmZmZmZmZmZmZmZmZmYwCnB1c2ggcmF4CnB1c2ggcnNwCjsgMHg4YzAKbGVhIHI4LCBxd29yZCBbc3ltLl9fbGliY19jc3VfZmluaV0KOyAweDg1MAo7ICJBV0FWQVx4ODlceGZmQVVBVExceDhkJS5cVTAwMDAwMDA1ICIKbGVhIHJjeCwgcXdvcmQgW3N5bS5fX2xpYmNfY3N1X2luaXRdCjsgMHg3YWEKbGVhIHJkaSwgcXdvcmQgW21haW5dCjsgWzB4MjAwZmUwOjhdPTB4MjAxMDU4IHJlbG9jLnRhcmdldC5fX2xpYmNfc3RhcnRfbWFpbgo7ICJYXFUwMDAwMDAxMCAiCmNhbGwgcXdvcmQgW3JlbG9jLl9fbGliY19zdGFydF9tYWluXQ==
digraph code {
rankdir=LR;
outputorder=edgesfirst
graph [bgcolor=azure];
edge [arrowhead=normal, color="#3030c0" style=bold weight=2 ];
node [fillcolor=white, style=filled shape=box fontsize="8" fontname="Courier"];
0 [URL="0x6a0", color="lightgray", label="0x6a0\n; [13] -r-x section size 546 named .text
;-- section..text:
;-- .text:
;-- _start:
entry0(int64_t arg3);
; arg int64_t arg3 @ rdx
xor ebp, ebp
; arg3
mov r9, rdx
pop rsi
mov rdx, rsp
and rsp, 0xfffffffffffffff0
push rax
push rsp
; 0x8c0
lea r8, qword [sym.__libc_csu_fini]
; 0x850
; 'AWAVA\x89\xffAUATL\x8d%.\U00000005 '
lea rcx, qword [sym.__libc_csu_init]
; 0x7aa
lea rdi, qword [main]
; [0x200fe0:8]=0x201058 reloc.target.__libc_start_main
; 'X\U00000010 '
call qword [reloc.__libc_start_main]
"]
}
graph
[
hierarchic 1
label ""
directed 1
node [
id 0
label "0x6a0"
]
]
{"nodes":[{"id":0,"title":"0x6a0","body":"; [13] -r-x section size 546 named .text\n ;-- section..text:\n ;-- .text:\n ;-- _start:\nentry0(int64_t arg3);\n; arg int64_t arg3 @ rdx\nxor ebp, ebp\n; arg3\nmov r9, rdx\npop rsi\nmov rdx, rsp\nand rsp, 0xfffffffffffffff0\npush rax\npush rsp\n; 0x8c0\nlea r8, qword [sym.__libc_csu_fini]\n; 0x850\n; \"AWAVA\\x89\\xffAUATL\\x8d%.\\U00000005 \"\nlea rcx, qword [sym.__libc_csu_init]\n; 0x7aa\nlea rdi, qword [main]\n; [0x200fe0:8]=0x201058 reloc.target.__libc_start_main\n; \"X\\U00000010 \"\ncall qword [reloc.__libc_start_main]\n","offset":1696,"out_nodes":[]}]}
{"nodes":[{"id":0,"title":"0x6a0","body":"; [13] -r-x section size 546 named .text\n ;-- section..text:\n ;-- .text:\n ;-- _start:\nentry0(int64_t arg3);\n; arg int64_t arg3 @ rdx\nxor ebp, ebp\n; arg3\nmov r9, rdx\npop rsi\nmov rdx, rsp\nand rsp, 0xfffffffffffffff0\npush rax\npush rsp\n; 0x8c0\nlea r8, qword [sym.__libc_csu_fini]\n; 0x850\n; \"AWAVA\\x89\\xffAUATL\\x8d%.\\U00000005 \"\nlea rcx, qword [sym.__libc_csu_init]\n; 0x7aa\nlea rdi, qword [main]\n; [0x200fe0:8]=0x201058 reloc.target.__libc_start_main\n; \"X\\U00000010 \"\ncall qword [reloc.__libc_start_main]\n","offset":1696,"out_nodes":[]}]}
agraph.color_box=G1swbQ==
agraph.delta_x=0x4
agraph.delta_y=0x1
agraph.h=0x1e
agraph.is_callgraph=false
agraph.nodes=0x6a0
agraph.nodes.0x6a0.body=base64:OyBbMTNdIC1yLXggc2VjdGlvbiBzaXplIDU0NiBuYW1lZCAudGV4dAogIDstLSBzZWN0aW9uLi50ZXh0OgogIDstLSAudGV4dDoKICA7LS0gX3N0YXJ0OgplbnRyeTAoaW50NjRfdCBhcmczKTsKOyBhcmcgaW50NjRfdCBhcmczIEAgcmR4CnhvciBlYnAsIGVicAo7IGFyZzMKbW92IHI5LCByZHgKcG9wIHJzaQptb3YgcmR4LCByc3AKYW5kIHJzcCwgMHhmZmZmZmZmZmZmZmZmZmYwCnB1c2ggcmF4CnB1c2ggcnNwCjsgMHg4YzAKbGVhIHI4LCBxd29yZCBbc3ltLl9fbGliY19jc3VfZmluaV0KOyAweDg1MAo7ICJBV0FWQVx4ODlceGZmQVVBVExceDhkJS5cVTAwMDAwMDA1ICIKbGVhIHJjeCwgcXdvcmQgW3N5bS5fX2xpYmNfY3N1X2luaXRdCjsgMHg3YWEKbGVhIHJkaSwgcXdvcmQgW21haW5dCjsgWzB4MjAwZmUwOjhdPTB4MjAxMDU4IHJlbG9jLnRhcmdldC5fX2xpYmNfc3RhcnRfbWFpbgo7ICJYXFUwMDAwMDAxMCAiCmNhbGwgcXdvcmQgW3JlbG9jLl9fbGliY19zdGFydF9tYWluXQ==
agraph.nodes.0x6a0.h=0x1b
agraph.nodes.0x6a0.w=0x3a
agraph.nodes.0x6a0.x=0
agraph.nodes.0x6a0.y=0x4
agraph.w=0x3a
EOF
RUN
NAME=agr multiple formats
FILE=bins/elf/hello_world
CMDS=<<EOF
aa 2> /dev/null
agr ascii
agr cmd
agr dot
agr gml
agr json
agr json_disasm
agr sdb
EOF
EXPECT=<<EOF
.----------.
| entry0 |
`----------'
agn "entry0"
digraph code {
rankdir=LR;
outputorder=edgesfirst
graph [bgcolor=azure];
edge [arrowhead=normal, color="#3030c0" style=bold weight=2 ];
node [fillcolor=white, style=filled shape=box fontsize="8" fontname="Courier"];
0 [URL="entry0", color="lightgray", label="entry0"]
}
graph
[
hierarchic 1
label ""
directed 1
node [
id 0
label "entry0"
]
]
{"nodes":[{"id":0,"title":"entry0","offset":1696,"out_nodes":[]}]}
{"nodes":[{"id":0,"title":"entry0","offset":1696,"out_nodes":[]}]}
agraph.color_box=G1swbQ==
agraph.delta_x=0
agraph.delta_y=0x1
agraph.h=0x6
agraph.is_callgraph=false
agraph.nodes=entry0
agraph.nodes.entry0.body=base64:
agraph.nodes.entry0.h=0x3
agraph.nodes.entry0.w=0xc
agraph.nodes.entry0.x=0x13
agraph.nodes.entry0.y=0
agraph.w=0xc
EOF
RUN
NAME=agx multiple formats
FILE=bins/elf/hello_world
CMDS=<<EOF
aa 2> /dev/null
s sym.imp.strlen
agx ascii
agx cmd
agx dot
agx gml
agx json
agx json_disasm
agx sdb
EOF
EXPECT=<<EOF
.--------------. .--------------.
| 0x000007cf | | 0x000007de |
`--------------' `--------------'
v v
| |
'---------. |
| .-------'
| |
.------------------.
| sym.imp.strlen |
`------------------'
agn "sym.imp.strlen"
agn "0x000007cf"
agn "0x000007de"
age "0x000007cf" "sym.imp.strlen"
age "0x000007de" "sym.imp.strlen"
digraph code {
rankdir=LR;
outputorder=edgesfirst
graph [bgcolor=azure];
edge [arrowhead=normal, color="#3030c0" style=bold weight=2 ];
node [fillcolor=white, style=filled shape=box fontsize="8" fontname="Courier"];
0 [URL="sym.imp.strlen", color="lightgray", label="sym.imp.strlen"]
1 [URL="0x000007cf", color="lightgray", label="0x000007cf"]
1 -> 0
2 [URL="0x000007de", color="lightgray", label="0x000007de"]
2 -> 0
}
graph
[
hierarchic 1
label ""
directed 1
node [
id 0
label "sym.imp.strlen"
]
node [
id 1
label "0x000007cf"
]
node [
id 2
label "0x000007de"
]
edge [
source 1
target 0
]
edge [
source 2
target 0
]
]
{"nodes":[{"id":0,"title":"sym.imp.strlen","offset":1632,"out_nodes":[]},{"id":1,"title":"0x000007cf","offset":1999,"out_nodes":[0]},{"id":2,"title":"0x000007de","offset":2014,"out_nodes":[0]}]}
{"nodes":[{"id":0,"title":"sym.imp.strlen","offset":1632,"out_nodes":[]},{"id":1,"title":"0x000007cf","offset":1999,"out_nodes":[0]},{"id":2,"title":"0x000007de","offset":2014,"out_nodes":[0]}]}
agraph.color_box=G1swbQ==
agraph.delta_x=0
agraph.delta_y=0x1
agraph.h=0xf
agraph.is_callgraph=false
agraph.nodes=sym.imp.strlen,0x000007cf,0x000007de
agraph.nodes.0x000007cf.body=base64:
agraph.nodes.0x000007cf.h=0x3
agraph.nodes.0x000007cf.neighbours=sym.imp.strlen
agraph.nodes.0x000007cf.w=0x10
agraph.nodes.0x000007cf.x=0x7
agraph.nodes.0x000007cf.y=0
agraph.nodes.0x000007de.body=base64:
agraph.nodes.0x000007de.h=0x3
agraph.nodes.0x000007de.neighbours=sym.imp.strlen
agraph.nodes.0x000007de.w=0x10
agraph.nodes.0x000007de.x=0x1b
agraph.nodes.0x000007de.y=0
agraph.nodes.sym.imp.strlen.body=base64:
agraph.nodes.sym.imp.strlen.h=0x3
agraph.nodes.sym.imp.strlen.w=0x14
agraph.nodes.sym.imp.strlen.x=0xf
agraph.nodes.sym.imp.strlen.y=0x8
agraph.w=0x24
EOF
RUN
NAME=agl multiple formats
FILE=bins/elf/hello_world
CMDS=<<EOF
aa 2> /dev/null
s main
agl ascii
agl cmd
agl dot
agl gml
agl json
agl json_disasm
agl sdb
EOF
EXPECT=<<EOF
.-----------.
| 0x7aa |
`-----------'
f t
| |
| '.
.--------' |
| |
.----------. |
| 0x806 | |
`----------' |
v |
| |
'------. |
| .--'
| |
.-----------.
| 0x844 |
`-----------'
agn "0x7aa"
agn "0x844"
agn "0x806"
age "0x7aa" "0x844"
age "0x7aa" "0x806"
age "0x806" "0x844"
digraph code {
rankdir=LR;
outputorder=edgesfirst
graph [bgcolor=azure];
edge [arrowhead=normal, color="#3030c0" style=bold weight=2 ];
node [fillcolor=white, style=filled shape=box fontsize="8" fontname="Courier"];
0 [URL="0x7aa", color="lightgray", label="0x7aa"]
0 -> 1
0 -> 2
1 [URL="0x844", color="lightgray", label="0x844"]
2 [URL="0x806", color="lightgray", label="0x806"]
2 -> 1
}
graph
[
hierarchic 1
label ""
directed 1
node [
id 0
label "0x7aa"
]
node [
id 1
label "0x844"
]
node [
id 2
label "0x806"
]
edge [
source 0
target 1
]
edge [
source 0
target 2
]
edge [
source 2
target 1
]
]
{"nodes":[{"id":0,"title":"0x7aa","offset":1962,"out_nodes":[1,2]},{"id":1,"title":"0x844","offset":2116,"out_nodes":[]},{"id":2,"title":"0x806","offset":2054,"out_nodes":[1]}]}
{"nodes":[{"id":0,"title":"0x7aa","offset":1962,"out_nodes":[1,2]},{"id":1,"title":"0x844","offset":2116,"out_nodes":[]},{"id":2,"title":"0x806","offset":2054,"out_nodes":[1]}]}
agraph.color_box=G1swbQ==
agraph.delta_x=0
agraph.delta_y=0x1
agraph.h=0x17
agraph.is_callgraph=false
agraph.nodes=0x7aa,0x844,0x806
agraph.nodes.0x7aa.body=base64:
agraph.nodes.0x7aa.h=0x3
agraph.nodes.0x7aa.neighbours=,0x806
agraph.nodes.0x7aa.w=0xd
agraph.nodes.0x7aa.x=0x13
agraph.nodes.0x7aa.y=0
agraph.nodes.0x806.body=base64:
agraph.nodes.0x806.h=0x3
agraph.nodes.0x806.neighbours=0x844
agraph.nodes.0x806.w=0xc
agraph.nodes.0x806.x=0xe
agraph.nodes.0x806.y=0x8
agraph.nodes.0x844.body=base64:
agraph.nodes.0x844.h=0x3
agraph.nodes.0x844.w=0xd
agraph.nodes.0x844.x=0x13
agraph.nodes.0x844.y=0x10
agraph.w=0x12
EOF
RUN
NAME=ags multiple formats
FILE=bins/elf/hello_world
CMDS=<<EOF
aa 2> /dev/null
s main
ags ascii
ags cmd
ags dot
ags gml
ags json
ags json_disasm
ags sdb
EOF
EXPECT=<<EOF
.-----------.
| 0x7aa |
`-----------'
f t
| |
| '.
.--------' |
| |
.----------. |
| 0x806 | |
`----------' |
v |
| |
'------. |
| .--'
| |
.-----------.
| 0x844 |
`-----------'
agn "0x7aa"
agn "0x844"
agn "0x806"
age "0x7aa" "0x844"
age "0x7aa" "0x806"
age "0x806" "0x844"
digraph code {
rankdir=LR;
outputorder=edgesfirst
graph [bgcolor=azure];
edge [arrowhead=normal, color="#3030c0" style=bold weight=2 ];
node [fillcolor=white, style=filled shape=box fontsize="8" fontname="Courier"];
0 [URL="0x7aa", color="lightgray", label="0x7aa"]
0 -> 1
0 -> 2
1 [URL="0x844", color="lightgray", label="0x844"]
2 [URL="0x806", color="lightgray", label="0x806"]
2 -> 1
}
graph
[
hierarchic 1
label ""
directed 1
node [
id 0
label "0x7aa"
]
node [
id 1
label "0x844"
]
node [
id 2
label "0x806"
]
edge [
source 0
target 1
]
edge [
source 0
target 2
]
edge [
source 2
target 1
]
]
{"nodes":[{"id":0,"title":"0x7aa","offset":1962,"out_nodes":[1,2]},{"id":1,"title":"0x844","offset":2116,"out_nodes":[]},{"id":2,"title":"0x806","offset":2054,"out_nodes":[1]}]}
{"nodes":[{"id":0,"title":"0x7aa","offset":1962,"out_nodes":[1,2]},{"id":1,"title":"0x844","offset":2116,"out_nodes":[]},{"id":2,"title":"0x806","offset":2054,"out_nodes":[1]}]}
agraph.color_box=G1swbQ==
agraph.delta_x=0
agraph.delta_y=0x1
agraph.h=0x17
agraph.is_callgraph=false
agraph.nodes=0x7aa,0x844,0x806
agraph.nodes.0x7aa.body=base64:
agraph.nodes.0x7aa.h=0x3
agraph.nodes.0x7aa.neighbours=,0x806
agraph.nodes.0x7aa.w=0xd
agraph.nodes.0x7aa.x=0x13
agraph.nodes.0x7aa.y=0
agraph.nodes.0x806.body=base64:
agraph.nodes.0x806.h=0x3
agraph.nodes.0x806.neighbours=0x844
agraph.nodes.0x806.w=0xc
agraph.nodes.0x806.x=0xe
agraph.nodes.0x806.y=0x8
agraph.nodes.0x844.body=base64:
agraph.nodes.0x844.h=0x3
agraph.nodes.0x844.w=0xd
agraph.nodes.0x844.x=0x13
agraph.nodes.0x844.y=0x10
agraph.w=0x12
EOF
RUN