Commit 6a3c7ab3 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov

restore: Drop no longer needed printing

Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@gmail.com>
parent bf41dcac
...@@ -170,8 +170,6 @@ self_len_end: ...@@ -170,8 +170,6 @@ self_len_end:
if (fd_self_vmas < 0) if (fd_self_vmas < 0)
goto core_restore_end; goto core_restore_end;
write_hex_n(__LINE__);
/* Note no magic constant on fd_self_vmas */ /* Note no magic constant on fd_self_vmas */
sys_lseek(fd_self_vmas, 0, SEEK_SET); sys_lseek(fd_self_vmas, 0, SEEK_SET);
while (1) { while (1) {
...@@ -184,14 +182,10 @@ self_len_end: ...@@ -184,14 +182,10 @@ self_len_end:
if (!(vma_entry.status & VMA_AREA_REGULAR)) if (!(vma_entry.status & VMA_AREA_REGULAR))
continue; continue;
write_hex_n(__LINE__);
write_hex_n(vma_entry.start); write_hex_n(vma_entry.start);
if (sys_munmap((void *)vma_entry.start, if (sys_munmap((void *)vma_entry.start,
vma_entry.end - vma_entry.start)) vma_entry.end - vma_entry.start))
goto core_restore_end; goto core_restore_end;
write_hex_n(__LINE__);
write_char('\n');
} }
sys_close(fd_self_vmas); sys_close(fd_self_vmas);
...@@ -214,12 +208,11 @@ self_len_end: ...@@ -214,12 +208,11 @@ self_len_end:
if (!(vma_entry.status & VMA_AREA_REGULAR)) if (!(vma_entry.status & VMA_AREA_REGULAR))
continue; continue;
write_hex_n(__LINE__);
write_hex_n(vma_entry.start);
vma_entry.fd = -1UL; /* for a while */ vma_entry.fd = -1UL; /* for a while */
vma_entry.pgoff = 0; vma_entry.pgoff = 0;
write_hex_n(vma_entry.end - vma_entry.start);
/* /*
* Should map memory here. Note we map them as * Should map memory here. Note we map them as
* writable since we're going to restore page * writable since we're going to restore page
...@@ -228,17 +221,18 @@ self_len_end: ...@@ -228,17 +221,18 @@ self_len_end:
va = sys_mmap((void *)vma_entry.start, va = sys_mmap((void *)vma_entry.start,
vma_entry.end - vma_entry.start, vma_entry.end - vma_entry.start,
vma_entry.prot | PROT_WRITE, vma_entry.prot | PROT_WRITE,
vma_entry.flags | MAP_ANONYMOUS | MAP_FIXED, (vma_entry.flags |
MAP_ANONYMOUS |
MAP_FIXED |
MAP_PRIVATE) & ~MAP_SHARED,
vma_entry.fd, vma_entry.fd,
vma_entry.pgoff); vma_entry.pgoff);
if (va != vma_entry.start) { if (va != vma_entry.start) {
write_hex_n(va); write_hex_n(vma_entry.start);
goto core_restore_end; write_hex_n(va);
} goto core_restore_end;
}
write_hex_n(__LINE__);
write_char('\n');
} }
/* /*
...@@ -250,21 +244,14 @@ self_len_end: ...@@ -250,21 +244,14 @@ self_len_end:
break; break;
if (ret != sizeof(va)) if (ret != sizeof(va))
goto core_restore_end; goto core_restore_end;
write_hex_n(__LINE__);
write_hex_n(va);
if (!va) if (!va)
break; break;
write_hex_n(__LINE__);
ret = sys_read(fd_core, (void *)va, PAGE_SIZE); ret = sys_read(fd_core, (void *)va, PAGE_SIZE);
if (ret != PAGE_SIZE) { if (ret != PAGE_SIZE) {
write_hex_n(ret); write_hex_n(ret);
goto core_restore_end; goto core_restore_end;
} }
write_hex_n(__LINE__);
write_char('\n');
} }
/* /*
...@@ -288,15 +275,9 @@ self_len_end: ...@@ -288,15 +275,9 @@ self_len_end:
if (vma_entry.prot & PROT_WRITE) if (vma_entry.prot & PROT_WRITE)
continue; continue;
write_hex_n(__LINE__);
write_hex_n(vma_entry.start);
sys_mprotect(vma_entry.start, sys_mprotect(vma_entry.start,
vma_entry.end - vma_entry.start, vma_entry.end - vma_entry.start,
vma_entry.prot); vma_entry.prot);
write_hex_n(__LINE__);
write_char('\n');
} }
sys_close(fd_core); sys_close(fd_core);
...@@ -369,7 +350,6 @@ self_len_end: ...@@ -369,7 +350,6 @@ self_len_end:
: "r"((long)rt_sigframe + sizeof(*rt_sigframe)) : "r"((long)rt_sigframe + sizeof(*rt_sigframe))
: "rax","rsp","memory"); : "rax","rsp","memory");
core_restore_end: core_restore_end:
write_hex_n(sys_getpid()); write_hex_n(sys_getpid());
for (;;) for (;;)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment