mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 23:27:35 +00:00
ptrace: Stop a traced thread when it exists from execve
This was a missing feature in the PT_TRACEME command. This feature allows the tracer to interact with the tracee before the tracee has started executing its program. It will be useful for automatically inserting a breakpoint at a debugged program's entry point.
This commit is contained in:
parent
4568a628f9
commit
0431712660
3 changed files with 58 additions and 16 deletions
|
@ -1,8 +1,12 @@
|
|||
#include <cstdio>
|
||||
int main(int, char**)
|
||||
{
|
||||
printf("before breakpoint\n");
|
||||
asm("int3");
|
||||
printf("after breakpoint\n");
|
||||
printf("Debuggee main\n");
|
||||
int s = 0;
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
s++;
|
||||
}
|
||||
printf("s: %d\n", s);
|
||||
// asm("int3");
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue