fix wrong entry break addr on arm32

This commit is contained in:
5ec1cff
2023-11-12 21:27:40 +08:00
parent 889a44cd0d
commit 36dcec0264
2 changed files with 6 additions and 2 deletions

View File

@@ -74,7 +74,7 @@ bool inject_on_main(int pid, const char *lib_path) {
}
if (WIFSTOPPED(status) && WSTOPSIG(status) == SIGSEGV) {
if (!get_regs(pid, regs)) return false;
if (regs.REG_IP != break_addr) {
if ((regs.REG_IP & ~1) != (break_addr & ~1)) {
LOGE("stopped at unknown addr %p", (void *) regs.REG_IP);
return false;
}