rtdisasm_find_target works very well
This commit is contained in:
parent
bd6682a61d
commit
9de814e66a
2 changed files with 18 additions and 3 deletions
|
|
@ -11,7 +11,13 @@ int main()
|
|||
// int len = rtdisasm_analyze_single((const uint8_t*)test_1, size, NULL);
|
||||
// printf("rtdisasm_analyze_single: len %d\n", len);
|
||||
|
||||
int offset = rtdisasm_find_target((const uint8_t*)test_1, size, RT_TARGET_NOP);
|
||||
printf("rtdisasm_find_target: offset %d\n", offset);
|
||||
printf("RT_TARGET_NOP %d\n", rtdisasm_find_target((const uint8_t*)test_1, size, RT_TARGET_NOP));
|
||||
printf("RT_TARGET_RET %d\n", rtdisasm_find_target((const uint8_t*)test_1, size, RT_TARGET_RET));
|
||||
printf("RT_TARGET_RET_N %d\n", rtdisasm_find_target((const uint8_t*)test_1, size, RT_TARGET_RET_N));
|
||||
printf("RT_TARGET_INT3 %d\n", rtdisasm_find_target((const uint8_t*)test_1, size, RT_TARGET_INT3));
|
||||
printf("RT_TARGET_INT_N %d\n", rtdisasm_find_target((const uint8_t*)test_1, size, RT_TARGET_INT_N));
|
||||
printf("RT_TARGET_SYSENTER %d\n", rtdisasm_find_target((const uint8_t*)test_1, size, RT_TARGET_SYSENTER));
|
||||
printf("RT_TARGET_SYSCALL %d\n", rtdisasm_find_target((const uint8_t*)test_1, size, RT_TARGET_SYSCALL));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -6,5 +6,14 @@ test_1:
|
|||
push %rax
|
||||
push (%rbp)
|
||||
|
||||
nop # target that rtdisasm must reach
|
||||
# rt targets
|
||||
nop
|
||||
|
||||
ret
|
||||
ret $0x1234
|
||||
|
||||
int3
|
||||
int $0x80
|
||||
sysenter
|
||||
syscall
|
||||
test_1_end:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue