Eric K(deleted)
|
Stepping by Instruction through child process
|
Eric K(deleted)
06/11/2013 1:16 PM
post102167
|
Stepping by Instruction through child process
Hello,
I'm wondering how you can go about stepping by instruction through a child process. I already have the child process
being spawned with SPAWN_HOLD.
Then I send the DCMD_PROC_STOP flag to the process using devctl() and finally I send a SIGCONT signal to the process to
get rid of the SIGSTOP that results from the SPAWN_HOLD.
After that I send DCMD_PROC_RUN flags to the process with the _DEBUG_RUN_STEP flag set.
I'm checking error codes and looking at the procfs_status structs each step of the way and everything looks reasonable
aside from the instruction pointer. The instruction pointer is always around 17 million.
The problem arises after I tell the child process to step to the next instruction for the first time. The child process
does not execute and instead just dies.
I have tested this setup without the stepping flag, and the child process runs fine so that leads me to believe that I
am incorrectly stepping through.
Is there an initialization process with the stack or instruction pointer that I'm not aware of? Or have I been stepping
through incorrectly the entire time?
My setup for the run flags is this:
procfs_run run;
memset(&run, 0, sizeof(run))
run.flags = 0 | _DEBUG_RUN_STEP
and then I'm calling the devctl function like this:
while( (retVal = devctl( fd, DCMD_PROC_RUN, &run, sizeof(run), NULL )) == EOK )
...
Thanks, Eric
|
|
|