4 ms·
You can consider your debugger to be a program which forks() to create a child process and then calls execl() to load the process we want to debug That is one
by stinos 10y ago
You can consider your debugger to be a program which forks() to create a child process and then calls execl() to load the process we want to debug
That is one way to look at it, but I find it a bit too limiting (debuggers can attach to an existing process as well) and too confusing (requires knowing what fork does/is, same for execl - and are those even used when attaching to an existing process?) and because of the latter functions used obviously coming from a linux background (nothing wrong with that, on the contrary, but I can imagine windows people or beginners still having no clue whatsoever about a debugger after reading this - though it's likely not the target group).
- swiley 10y agoOn Linux, fork is a wrapper around clone, so it's still not particularly accurate.
- hornetblack 10y agoThere is also remote debugging. Via network or JTAG.