gdb - where is function called from?

1

This seems like a simple question... I have a library (no source code) which calls one of my own functions (cbp_Gen, the fptr is passed at some point previously).
I have a breakpoint in that function and I would like to know where in my code it's all called from.
I thought a simple finish would bring me back to my own code on top, but it does not work. I can continue, but not finish.

Sample debug session (slightly cleaned up):

(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.
c
gdb
asked on Stack Overflow Aug 20, 2014 by dargaud • edited Aug 20, 2014 by n0p

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0