commit 97f3ec06fcd5cc02a5f1433281200544f1ed1876
parent debdc5bf90b0a8baee544b8899d38af078d90787
Author: sin <sin@2f30.org>
Date: Fri, 1 Mar 2013 15:21:18 +0000
memzap: Wait for the child to single step
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/memzap.c b/memzap.c
@@ -57,6 +57,9 @@ main(int argc, char *argv[])
if (!WIFSTOPPED(stat))
goto out_mmap;
single_step(pid);
+ wait(&stat);
+ if (!WIFSTOPPED(stat))
+ goto out_mmap;
do {
readmem(pid, buf, addr, len);
@@ -70,7 +73,6 @@ main(int argc, char *argv[])
single_step(pid);
wait(&stat);
-
if (!WIFSTOPPED(stat)) {
free_mem_region(mr_old);
free_mem_tree(mt_old);