2

在 Visual Studio 2012 中编写 C++ 时,我可以介入诸如 malloc() 等函数的实际 Microsoft 实现。

在 Linux 上使用什么是最好的(调试器?),我可以进入诸如 malloc() 之类的函数的 Linux/GCC 实现吗?做起来相对简单吗?在 Linux 上编写 C++ 时,我想了解在 Linux 的“幕后”实际发生了什么。

4

1 回答 1

1

depending on your enviroment i would say yes it is simple. but it is really depending on your setup. so what are you going to use?

most debuggers on on linux relying on gdb and are just gui's for it. if you are going to use QT for example, it is realy easy/simple to do what you want. you also could use ddd which is also just a gui for gdb, or gdb itself in a terminal. the only hitch can (should not) happen is that you have to say your debugger where to find the source of the lib you want to jump in while debugging. also the source should be on your system (on a debian (and offsprings like ubuntu) usually the *-dev or from the source repositories the source itself).

additional gdb is possible to walk-through the catch block of a try-catch, which isn't possible under visual studio. in my opinion this is a real candy for code debugging... also gdb is possible to debug executables created with clang.

于 2013-10-15T13:30:26.290 回答