Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请教个问题? #1

Open
zhangxufengde opened this issue May 25, 2021 · 0 comments
Open

请教个问题? #1

zhangxufengde opened this issue May 25, 2021 · 0 comments

Comments

@zhangxufengde
Copy link

在有偏移的情况下,这段代码这样写,不是默认认为在新分配的虚拟地址上,原指令的偏移是region开始地址 +1,+5,+9 .......吗?如果原指令偏移是region+2,或region +3,这样写还合理吗? 我在测试过程中出现的都是 // mshook do not handle pc offset没有偏移的情况。

           // mshook handle `pc` offset
            int max_buffer_instructions_count = 20;   // 8 ~ 18
            
            for (int i = 0; i<max_buffer_instructions_count; i++) {
                uint64_t* cur_instruction_addr = (uint64_t *)(region_address+i*4);
                if (MSHookARMCheck(cur_instruction_addr) && (*(cur_instruction_addr+1) == func_begin)) {
                    NSLog(@"8--------->>>002");
                    return (void *)region_address;
                }
            }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant