English 中文(简体)
GDB在职能要求之后被混淆的断点?
原标题:GDB breakpoints confused after a function call?

我有一个依靠外部共享图书馆的方案,但在图书馆内部运作后,我丧失了使用断点的能力。

在我履行这一职能之前,我可以打破僵局,采取同样的正常步骤,但后来,这项职能却从未中断。 如果我第二次尝试使用<条码><>>>>><>>>/代码>,它就赢得了主机。 这不是一个线性的职能问题,因为我是在我评论这一特殊职能之前和时,就打破了这些职能。

是否有任何人像以前那样遇到这种情况? 我能做些什么?

使用gdb 7.1和gcc 3.2.3

Edit: After some hints from users I figured out that the process is forking inside the library call. I m not sure what it s doing (and I really don t care). Can I somehow compensate for this? I ve been experimenting with the follow-fork-mode as child, but I m really confused what happens once it forks and I can t seem to figure out how to continue execution or do anything of use.

Edit: Further investigation. The nearest I can tell, gdb is losing all its symbol information somewhere. After the 2nd run, all symbols resolve to the @plt address and not to the actual address that they resolved to on the first run. Like somehow the second loading of the process loses all the info it gained the first time around and refuses to reload it. I m so confused!!

Edit: So I traced down the problem to the vfork of a popen call. Apparently gdb doesn t play nice with popen? As soon as I detach from the popen d vforked process, I lose all my symbols. I ve read some reports online about this as well. Is there any hope?

最佳回答
问题回答

暂无回答




相关问题
tell gdb to disassemble "unknown" code

is it possible to configure gdb in order to debug assembly code when there are no debug symbols or no sources available ? I mean showing assembly instruction by assembly instruction when performing a ...

C++ Netbeans debugging issues

I installed netbeans6.7.1 ide for c/c++ also i have mingw/msys cygwin installed and i have given C:Msysin as environment variable path.It has gdb7 version.However wheni run dbugging thru netbeans ...

setting strings in gdb

c++: int main() { string a = "a"; ... ... } when i debug in gdb: (gdb) set var a = "ok" Invalid cast I run the program and pause at a break point after string a has been ...

How to debug programms written in fasm under linux using gdb?

I wrote simple "hello, world" in fasm, and its works, but how i can generate debug info for gdb and edb (Evan s Debugger)? Fasm compiler could only produce debugging symbols in its specific format - "...

How can I display Unicode strings while debugging on linux?

I have been working for some years now as C++ Developer using MS Visual Studio as working platform. Since I privately prefer to use linux, I recently took the chance to move my working environment to ...

Continue to debug after failed assertion on Linux?

When an assertion fails with Visual C++ on Windows, the debugger stops, displays the message, and then lets you continue (or, if no debugging session is running, offers to launch visual studio for you)...