我想知道gdb在内部如何工作。
例如我知道一个简短的想法,它利用ptrace()系统调用来监视跟踪的程序。
但是我想知道它是如何处理信号的,如何插入新代码的以及它所做的其他类似的事情。
最佳答案
请查看GDB Internals Manual,它涵盖了一些重要方面。该文档还有一个较旧的PDF version。
从手册中:
This document documents the internals of the GNU debugger, gdb. It includes description of gdb's key algorithms and operations, as well as the mechanisms that adapt gdb to specific hosts and targets.
关于gdb - gdb如何工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3903565/