Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Red Hat Enterprise Linux 9 Essentials Book now available.

Purchase a copy of Red Hat Enterprise Linux 9 (RHEL 9) Essentials

Red Hat Enterprise Linux 9 Essentials Print and eBook (PDF) editions contain 34 chapters and 298 pages

Preview Book

5.2.4. Forked Execution

Among the more challenging bugs that can confront programmers is where one program (the parent) makes an independent copy of itself (a fork) that creates a child process which, in turn, fails. Debugging the parent process may or may not be useful—the only way to get to the bug may be by debugging the child process, but doing a gdb child isn't always possible.
To address this, GDB allows programmers to continue following the parent process after a fork, or to follow a child process.

Note

This capability is not supported by all architectures for which GDB is built, but even under those circumstances using GDB to follow a fork can still be possible. In such architectures, GDB can attach itself to a process that is already running, allowing a second instance of GDB to attach to a forked child process.

 
 
  Published under the terms of the Creative Commons License Design by Interspire