gdb如何工作? [英] how does gdb work?

查看:155
本文介绍了gdb如何工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道gdb如何在内部工作。
例如我知道一个简单的想法,它使用ptrace()系统调用来监视跟踪的程序。
但是我想知道它如何处理信号,它如何插入新的代码,以及其他如此美妙的事情。

解决方案

查看 GDB内部手册,其中包含一些重要方面。本文档还有一个较老的 PDF版本



从手册:


本文档记录了GNU调试器gdb的内部结构。它包括gdb关键算法和操作的描述,以及将gdb调整到特定主机和目标的机制。



I want to know how does gdb work internally. e.g. I know a brief idea that it makes use of ptrace() system call to monitor traced program. But I want to know how it handles signals, how it inserts new code, and other such fabulous things it does.

解决方案

Check out the GDB Internals Manual, which covers some of the important aspects. There's also an older PDF version of this document.

From the manual:

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如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆