Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug child and parent process using windbg?

I have one program which creates the child process using CreateProcess function. While Debugging, I step into child process by childdbg 1 . But after executing whole steps of child process. It doesn't returned to Parent process.

When I use .childdbg 1

0:000> .childdbg 1
Processes created by the current process will be debugged

then i used 2 time g, first time, it loaded modules and come to, below position,

0:000> g

.
.
.

1:002>

2nd time, once again it loaded some other modules, and come to below position,

1:002> g

.
.
.

2:005>

From this point, I will start debug my child process. Its working good. After, running child process, its directly execute it parent process. So, can anyone give me the debug command or command to come out from second process to 1st process. Please, I need debug level solution. Not from my code.

like image 299
Muthupandi Avatar asked Dec 06 '22 02:12

Muthupandi


1 Answers

You can use the | command to verify the processes currently attached to. Similar to switching between threads (~0s, ~1s, ~2s), you may use |0s |1s |2s etc to switch between attached processes.

like image 128
Dono Avatar answered Dec 28 '22 09:12

Dono