gdb - 从哪里调用函数?

时间:2014-08-20 11:52:12

标签: c gdb

这似乎是一个简单的问题...... 我有一个库(没有源代码),它调用我自己的一个函数(cbp_Genfptr之前在某个时间点传递。)
我在该函数中有一个断点,我想知道在我的代码中它从哪里调用 我认为一个简单的finish会让我回到我自己的代码顶部,但它不起作用。我可以continue,但不能finish

示例调试会话(略微清理):

(gdb) run
Starting program
[Thread debugging using libthread_db enabled]
[New Thread 0xb7f6d6d0 (LWP 1100)]

DEBUG ReadIniFile-187 Enter[New Thread 0x74cdb90 (LWP 1104)]
[New Thread 0x2886b90 (LWP 1105)]

Breakpoint 8, cbp_Gen ()
    at SomeCode.c:592
592   SetPanelAttribute(panel, ATTR_WIDTH, Width=MinWidth);

(gdb) bt
#0  cbp_Gen ()
    at SomeCode.c:592
#1  0x001d5e37 in ?? () from /usr/local/lib/libcvi.so
#2  0x00000088 in ?? ()
#3  0x0000000c in ?? ()
#4  0x00000000 in ?? ()

(gdb) finish
Run till exit from #0  cbp_Gen ()
    at SomeCode.c:592
0x001d5e37 in ?? () from /usr/local/lib/libcvi.so
Value returned is $25 = 1

(gdb) finish
Run till exit from #0  0x001d5e37 in ?? () from /usr/local/lib/libcvi.so
Warning:
Cannot insert breakpoint 0.
Error accessing memory address 0x88: Input/output error.

0 个答案:

没有答案