mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-10 15:33:04 +00:00
9c48816b6f
* Improve switch jmptbl analysis * Splitting a block takes switch table in consideration * Fix gcc 9.2.0 kind of x86_64 jumptables ##anal
269 lines
28 KiB
Plaintext
269 lines
28 KiB
Plaintext
NAME=ablt
|
|
FILE=bins/mach0/mac-ls2
|
|
CMDS=<<EOF
|
|
e anal.calls=false
|
|
af
|
|
echo $(ablq)
|
|
abt
|
|
ablt fail/str/0x,addr/cols/size/jump/calls
|
|
abl~?
|
|
aflc
|
|
aa
|
|
abl~?
|
|
aflc
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x1000011e8 0x100001211 0x100001216 0x100001232 0x10000124d 0x100001252 0x10000125c 0x100001276 0x10000127e 0x100001284 0x100001290 0x1000012a8 0x1000012b6 0x1000012bf 0x1000012c6 0x1000012dc 0x1000012e3 0x1000012e7 0x100001301 0x10000130a 0x100001321 0x10000132a 0x100001347 0x100001353 0x100001370 0x100001392 0x100001396 0x1000013a2 0x1000013b1 0x1000013bd 0x1000013cc 0x1000013fb 0x10000140a 0x10000141a 0x10000143f 0x10000144b 0x100001466 0x100001473 0x10000147f 0x100001492 0x1000014a9 0x1000014b4 0x1000014ba 0x1000014d0 0x1000014df 0x1000014f0 0x1000014ff 0x100001519 0x100001525 0x10000153e 0x10000155b 0x10000156a 0x100001572 0x100001583 0x1000015a0 0x1000015ac 0x1000015c9 0x1000015e4 0x1000015f7 0x10000160d 0x10000162a 0x100001636 0x100001645 0x100001665 0x100001682 0x10000168b 0x1000016aa 0x1000016b8 0x1000016cd 0x1000016f1 0x100001768 0x10000177f 0x100001789 0x100001795 0x10000179a 0x1000017a6 0x1000017af 0x1000017b4 0x1000017fe 0x100001875 0x10000187e 0x10000188b 0x1000018c2 0x1000018cb 0x1000018d1 0x1000018dd 0x1000018e3 0x1000018ef 0x1000018f8 0x100001901 0x10000190a 0x100001913 0x10000191c 0x100001925 0x10000192e 0x100001937 0x100001940 0x100001949 0x100001952 0x10000195b 0x100001964 0x10000196d 0x100001976 0x10000197f 0x100001988 0x10000198f 0x1000019a2 0x1000019ab 0x1000019b4 0x1000019bd 0x1000019c6 0x1000019cf 0x1000019d6 0x1000019e2 0x1000019f0 0x1000019f7
|
|
.----------------------------------------------------------------------------------------------------------.
|
|
| addr | size | traced | ninstr | jump | fail | fcns | calls | xrefs |
|
|
)----------------------------------------------------------------------------------------------------------(
|
|
| 0x1000011e8 | 41 | 0 | 14 | 0x100001216 | 0x100001211 | 0x1000011e8 | | |
|
|
`----------------------------------------------------------------------------------------------------------'
|
|
|
|
.-----------------------------------------------------------------------------------------------------.
|
|
| addr | size | jump | calls |
|
|
)-----------------------------------------------------------------------------------------------------(
|
|
| 0x1000011e8 | 41 | 0x100001216 | |
|
|
| 0x100001216 | 28 | 0x100001290 | 0x10000456a 0x100004510 |
|
|
| 0x100001232 | 27 | 0x10000125c | 0x1000044e0 |
|
|
| 0x10000124d | 5 | 0x10000125c | |
|
|
| 0x10000125c | 26 | 0x100001284 | 0x10000450a |
|
|
| 0x100001276 | 8 | 0x100001284 | |
|
|
| 0x100001290 | 24 | 0x1000012b6 | 0x1000044e0 |
|
|
| 0x1000012b6 | 9 | 0x1000012c6 | 0x1000044f2 |
|
|
| 0x1000012e7 | 26 | 0x100001682 | 0x1000044e6 |
|
|
| 0x100001370 | 34 | 0x1000012e7 | 0x10000448c |
|
|
| 0x10000141a | 37 | 0x1000012e7 | 0x10000448c |
|
|
| 0x10000144b | 27 | 0x1000012e7 | 0x10000448c |
|
|
| 0x100001492 | 23 | 0x1000014d0 | 0x10000448c |
|
|
| 0x1000015c9 | 27 | 0x1000012e3 | 0x10000448c |
|
|
| 0x100001682 | 9 | 0x1000012dc | |
|
|
| 0x10000168b | 31 | 0x1000017a6 | 0x1000044e0 |
|
|
| 0x1000016aa | 14 | 0x1000016cd | 0x100004510 |
|
|
| 0x1000016b8 | 21 | 0x1000017a6 | 0x1000044e0 |
|
|
| 0x1000016cd | 36 | 0x1000017a6 | 0x1000044e0 0x1000045a6 |
|
|
| 0x1000016f1 | 119 | 0x10000177f | 0x1000045ac 0x1000045ac 0x1000045ac 0x1000045ac 0x1000045ac |
|
|
| 0x10000177f | 10 | 0x1000017a6 | |
|
|
| 0x100001789 | 12 | 0x1000017a6 | |
|
|
| 0x100001795 | 5 | 0x1000017a6 | |
|
|
| 0x1000017a6 | 9 | 0x1000017b4 | |
|
|
| 0x1000017fe | 119 | 0x1000018c2 | |
|
|
| 0x100001875 | 9 | 0x10000188b | |
|
|
| 0x1000018c2 | 9 | 0x1000018dd | |
|
|
| 0x1000018cb | 6 | 0x1000018ef | |
|
|
| 0x1000018dd | 6 | 0x10000191c | |
|
|
| 0x1000018ef | 9 | 0x100001949 | |
|
|
| 0x1000018f8 | 9 | 0x10000195b | |
|
|
| 0x100001901 | 9 | 0x10000196d | |
|
|
| 0x10000190a | 9 | 0x10000197f | |
|
|
| 0x10000191c | 9 | 0x100001952 | |
|
|
| 0x100001925 | 9 | 0x100001964 | |
|
|
| 0x10000192e | 9 | 0x100001976 | |
|
|
| 0x100001937 | 9 | 0x100001988 | |
|
|
| 0x10000198f | 19 | 0x1000019ab | |
|
|
| 0x1000019ab | 9 | 0x1000019c6 | |
|
|
| 0x1000019b4 | 9 | 0x1000019cf | |
|
|
| 0x1000019d6 | 12 | 0x1000019f0 | |
|
|
`-----------------------------------------------------------------------------------------------------'
|
|
|
|
116
|
|
1
|
|
794
|
|
112
|
|
EOF
|
|
RUN
|
|
|
|
NAME=ablt xrefs
|
|
FILE=bins/mach0/mac-ls2
|
|
CMDS=<<EOF
|
|
aa
|
|
abl, addr/cols/xrefs,xrefs/str/0x
|
|
EOF
|
|
EXPECT=<<EOF
|
|
.------------------------------------------------------------------------------------------------------------------.
|
|
| addr | xrefs |
|
|
)------------------------------------------------------------------------------------------------------------------(
|
|
| 0x100001211 | 0x1000043f2 |
|
|
| 0x100001216 | 0x10000456a 0x100004510 |
|
|
| 0x100001232 | 0x1000044e0 |
|
|
| 0x100001252 | 0x100004480 |
|
|
| 0x10000125c | 0x10000450a |
|
|
| 0x100001290 | 0x1000044e0 |
|
|
| 0x1000012a8 | 0x100004480 |
|
|
| 0x1000012b6 | 0x1000044f2 |
|
|
| 0x1000012dc | 0x1000043f2 |
|
|
| 0x1000012e7 | 0x1000044e6 |
|
|
| 0x100001370 | 0x10000448c |
|
|
| 0x1000013cc | 0x10000448c |
|
|
| 0x10000141a | 0x10000448c |
|
|
| 0x10000144b | 0x10000448c |
|
|
| 0x100001492 | 0x10000448c |
|
|
| 0x1000015ac | 0x100004564 |
|
|
| 0x1000015c9 | 0x10000448c |
|
|
| 0x10000168b | 0x1000044e0 |
|
|
| 0x1000016aa | 0x100004510 |
|
|
| 0x1000016b8 | 0x1000044e0 |
|
|
| 0x1000016cd | 0x1000044e0 0x1000045a6 |
|
|
| 0x1000016f1 | 0x1000045ac 0x1000045ac 0x1000045ac 0x1000045ac 0x1000045ac |
|
|
| 0x100001768 | 0x1000045ac |
|
|
| 0x1000017b4 | 0x100004570 0x100004570 0x1000044e0 0x100003a50 |
|
|
| 0x10000188b | 0x1000044da |
|
|
| 0x1000019f7 | 0x100001b2c 0x100004498 |
|
|
| 0x100001b2c | 0x1000044c2 |
|
|
| 0x100001b69 | 0x1000044b6 0x100001e5f |
|
|
| 0x100001ba2 | 0x1000044c8 |
|
|
| 0x100001bfe | 0x10000458e 0x1000045d6 |
|
|
| 0x100001c2e | 0x10000448c |
|
|
| 0x100001c8c | 0x100004546 |
|
|
| 0x100001ca0 | 0x1000045d6 0x10000448c |
|
|
| 0x100001cdb | 0x100004546 |
|
|
| 0x100001cf4 | 0x1000044b6 0x10000448c |
|
|
| 0x100001d41 | 0x100001e5f |
|
|
| 0x100001d61 | 0x1000044ce |
|
|
| 0x100001d71 | 0x1000044c8 |
|
|
| 0x100001d85 | 0x10000442c 0x1000044bc 0x10000442c 0x10000442c |
|
|
| 0x100001dc6 | 0x100004492 |
|
|
| 0x100001e8a | 0x1000044e0 |
|
|
| 0x100001f07 | 0x10000459a 0x100004528 |
|
|
| 0x100001fa2 | 0x100004576 |
|
|
| 0x1000021dc | 0x100004026 |
|
|
| 0x10000227d | 0x100004438 0x100004438 |
|
|
| 0x1000022d5 | 0x1000045c4 0x1000044fe |
|
|
| 0x1000022ef | 0x10000459a |
|
|
| 0x100002313 | 0x10000459a |
|
|
| 0x100002340 | 0x10000449e |
|
|
| 0x100002359 | 0x1000044b0 0x100004588 |
|
|
| 0x100002379 | 0x10000459a |
|
|
| 0x10000239e | 0x100004486 |
|
|
| 0x1000023c0 | 0x100004582 0x100004582 |
|
|
| 0x1000023f6 | 0x100004438 |
|
|
| 0x100002438 | 0x10000451c |
|
|
| 0x100002477 | 0x100004528 0x10000451c |
|
|
| 0x1000024b5 | 0x10000455e 0x1000044f8 0x10000459a |
|
|
| 0x10000251b | 0x100004462 |
|
|
| 0x100002535 | 0x100004450 |
|
|
| 0x10000254b | 0x10000444a |
|
|
| 0x10000259e | 0x10000444a |
|
|
| 0x1000025d8 | 0x100004582 0x1000044b0 |
|
|
| 0x100002632 | 0x10000458e 0x1000045d6 |
|
|
| 0x1000026a5 | 0x100004438 0x10000459a 0x100004438 0x10000459a 0x100004438 0x10000459a 0x100004438 0x10000459a |
|
|
| 0x1000027eb | 0x10000444a |
|
|
| 0x1000027f0 | 0x1000044b0 0x1000044b0 0x1000044b0 |
|
|
| 0x10000283d | 0x10000443e |
|
|
| 0x100002852 | 0x100004492 |
|
|
| 0x100002894 | 0x10000448c |
|
|
| 0x1000028d1 | 0x100004546 |
|
|
| 0x100002909 | 0x100002950 0x10000454c |
|
|
| 0x100002931 | 0x100004420 |
|
|
| 0x100002974 | 0x100004546 |
|
|
| 0x10000299b | 0x100004546 |
|
|
| 0x1000029db | 0x100003498 |
|
|
| 0x1000029f1 | 0x10000357c |
|
|
| 0x100002a0b | 0x1000045be 0x1000045be |
|
|
| 0x100002a4f | 0x1000035b2 |
|
|
| 0x100002ab0 | 0x100004546 |
|
|
| 0x100002b1e | 0x100004546 |
|
|
| 0x100002b41 | 0x100004546 |
|
|
| 0x100002b72 | 0x1000045a0 |
|
|
| 0x100002bd1 | 0x100004546 |
|
|
| 0x100002c1d | 0x100004546 |
|
|
| 0x100002c43 | 0x100004546 |
|
|
| 0x100002ca6 | 0x100004546 |
|
|
| 0x100002cd0 | 0x100004546 |
|
|
| 0x100002d0e | 0x1000032f4 |
|
|
| 0x100002d45 | 0x100003358 |
|
|
| 0x100002d56 | 0x100003498 |
|
|
| 0x100002d67 | 0x10000357c |
|
|
| 0x100002d89 | 0x1000045be 0x1000045be |
|
|
| 0x100002dca | 0x1000035b2 |
|
|
| 0x100002e47 | 0x100004438 0x100004552 |
|
|
| 0x100002e61 | 0x100004546 0x10000357c |
|
|
| 0x100002e83 | 0x10000442c 0x10000458e 0x1000044a4 |
|
|
| 0x100002eb3 | 0x10000454c |
|
|
| 0x100002f03 | 0x10000454c 0x10000357c 0x10000454c 0x1000032f4 0x10000454c 0x10000459a |
|
|
| 0x100002f86 | 0x100004450 |
|
|
| 0x100002fd4 | 0x100004438 0x1000044b0 |
|
|
| 0x100003029 | 0x10000447a |
|
|
| 0x100003044 | 0x10000445c |
|
|
| 0x10000305f | 0x10000446e |
|
|
| 0x10000307a | 0x100004474 |
|
|
| 0x100003096 | 0x100004528 |
|
|
| 0x1000030d8 | 0x10000452e |
|
|
| 0x100003105 | 0x1000045ca |
|
|
| 0x100003110 | 0x10000444a 0x100004456 0x100004546 0x1000044b0 |
|
|
| 0x100003195 | 0x100004468 |
|
|
| 0x1000031b0 | 0x100004546 |
|
|
| 0x100003206 | 0x100004456 |
|
|
| 0x100003221 | 0x100004546 |
|
|
| 0x100003268 | 0x10000454c |
|
|
| 0x10000327c | 0x100004450 |
|
|
| 0x1000032dc | 0x10000443e |
|
|
| 0x1000032e1 | 0x100004492 |
|
|
| 0x100003303 | 0x100004504 0x100004546 |
|
|
| 0x100003381 | 0x100004540 |
|
|
| 0x1000033a3 | 0x1000045b8 |
|
|
| 0x1000033d4 | 0x10000448c |
|
|
| 0x100003444 | 0x100004522 0x100004594 0x1000044aa |
|
|
| 0x100003493 | 0x10000443e |
|
|
| 0x1000034fa | 0x100003c6a |
|
|
| 0x100003536 | 0x100003c6a |
|
|
| 0x1000035d9 | 0x10000454c |
|
|
| 0x100003695 | 0x10000459a |
|
|
| 0x1000036bd | 0x10000454c |
|
|
| 0x1000036ca | 0x100002950 |
|
|
| 0x1000036e7 | 0x100004546 |
|
|
| 0x100003785 | 0x100004558 |
|
|
| 0x1000037b4 | 0x100004426 |
|
|
| 0x100003896 | 0x100004546 |
|
|
| 0x10000390a | 0x100002950 |
|
|
| 0x100003983 | 0x10000454c |
|
|
| 0x1000039cc | 0x10000454c |
|
|
| 0x1000039f3 | 0x1000045d0 |
|
|
| 0x100003a12 | 0x100004420 |
|
|
| 0x100003a31 | 0x100004420 |
|
|
| 0x100003a50 | 0x10000459a |
|
|
| 0x100003b15 | 0x1000044d4 |
|
|
| 0x100003b67 | 0x100004444 |
|
|
| 0x100003b78 | 0x1000044a4 |
|
|
| 0x100003bcd | 0x1000045be 0x1000045be 0x100004570 0x1000044ec |
|
|
| 0x100003c37 | 0x1000045e2 |
|
|
| 0x100003c5d | 0x10000454c |
|
|
| 0x100003c86 | 0x1000045be |
|
|
| 0x100003caa | 0x1000045b2 |
|
|
| 0x100003cc0 | 0x1000045be |
|
|
| 0x100003cde | 0x1000045b2 |
|
|
| 0x100003d70 | 0x100004534 |
|
|
| 0x100003dae | 0x10000454c |
|
|
| 0x100003de1 | 0x100004432 |
|
|
| 0x100003df6 | 0x1000045dc |
|
|
| 0x100003e0f | 0x10000454c |
|
|
| 0x100003e54 | 0x100004546 |
|
|
| 0x100003e9b | 0x10000443e |
|
|
| 0x100003f02 | 0x10000454c |
|
|
| 0x100003f12 | 0x100004534 |
|
|
| 0x100003f62 | 0x10000454c |
|
|
| 0x100003fa3 | 0x100004432 |
|
|
| 0x100003fc0 | 0x10000454c |
|
|
| 0x100003fd2 | 0x1000045dc |
|
|
| 0x100003fef | 0x10000454c |
|
|
| 0x100004021 | 0x10000443e |
|
|
| 0x10000408c | 0x100004534 |
|
|
| 0x1000040de | 0x100004432 |
|
|
| 0x100004178 | 0x10000443e |
|
|
| 0x10000417d | 0x100004534 |
|
|
| 0x100004224 | 0x100004534 |
|
|
| 0x10000425b | 0x10000454c |
|
|
| 0x100004276 | 0x1000045dc |
|
|
| 0x1000042b4 | 0x10000459a |
|
|
| 0x1000042c1 | 0x100004432 |
|
|
| 0x1000042fe | 0x10000453a |
|
|
| 0x10000431b | 0x10000454c 0x10000454c |
|
|
| 0x10000435d | 0x10000454c 0x10000454c 0x10000454c 0x10000454c |
|
|
| 0x1000043ed | 0x10000443e |
|
|
| 0x1000043f2 | 0x1000044d4 0x100004498 |
|
|
`------------------------------------------------------------------------------------------------------------------'
|
|
|
|
EOF
|
|
RUN
|
|
|