In most cases, a forked program immediately uses one of the variations of the exec
function to start a completely independent executable. In the same manner, threads use multiple paths of execution, occurring simultaneously in the same executable. This can provide a whole new range of debugging challenges, such as setting a breakpoint for a particular thread that won't interrupt the execution of any other thread. GDB supports threaded debugging (but not in all architectures for which GDB can be built).