mirror of
https://github.com/radareorg/radare2.git
synced 2025-04-01 17:11:51 +00:00
Cleanup debugger state during restart. (#17246) ##debug
This commit is contained in:
parent
e3b67f124c
commit
14c7dfe5fb
@ -116,6 +116,8 @@ R_API int r_core_file_reopen(RCore *core, const char *args, int perm, int loadbi
|
||||
// Reset previous pid and tid
|
||||
core->dbg->pid = -1;
|
||||
core->dbg->tid = -1;
|
||||
core->dbg->recoil_mode = R_DBG_RECOIL_NONE;
|
||||
memset (&core->dbg->reason, 0, sizeof (core->dbg->reason));
|
||||
// Reopen and attach
|
||||
r_core_setup_debugger (core, "native", true);
|
||||
r_debug_select (core->dbg, newpid, newtid);
|
||||
|
@ -68,3 +68,30 @@ EXPECT=<<EOF
|
||||
1 fd: 4 +0x00000000 0x00000000 - 0x7ffffffffffffffe rwx
|
||||
EOF
|
||||
RUN
|
||||
|
||||
NAME=breakpoints after double doo
|
||||
FILE=bins/elf/analysis/x86-helloworld-gcc
|
||||
ARGS=
|
||||
CMDS=<<EOF
|
||||
db main
|
||||
db main+3
|
||||
doo > $_
|
||||
dc # should hit the first breakpoint
|
||||
.dr*
|
||||
?v eip-main
|
||||
doo > $_
|
||||
dc # should hit the first breakpoint
|
||||
.dr*
|
||||
?v eip-main
|
||||
dc # should hit the the second breakpoint
|
||||
.dr*
|
||||
?v eip-main
|
||||
EOF
|
||||
EXPECT=<<EOF
|
||||
0x0
|
||||
0x0
|
||||
0x3
|
||||
Hello world!
|
||||
EOF
|
||||
RUN
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user