how to find the caller function in shared library libev when the application crashes

1

I compiled my application and shared library libev using -g flag in gcc. When I run the application it crashes after a few minutes. I ran the application within gdb and tried to do a backtrace. I get the output (appended at the end). As the output shows, I only know that it crashed while trying to make a syscall. I don't know anything else e.g. which function made the call etc.

How do I find that out. This on stack overflow said that all we need to do is compile the shared library with -g (and without optimizations) which I have already done. If I do a b ev.c (file in shared library libev), gdb cannot find it. At the very least, I should be able to find the function that I wrote on top of libev that initiated the call which eventually crashed. Any idea how to do this?Thanks

#0  0xf779b425 in __kernel_vsyscall ()
#1  0xf77036f3 in ?? ()
#2  0xf77baf88 in ?? ()
#3  0xf77b8c36 in ?? ()
#4  0x0000000c in ?? ()
#5  0xffe21894 in ?? ()
#6  0x00000053 in ?? ()
#7  0xf77bc46c in ?? ()
#8  0xffe21894 in ?? ()
#9  0xf7799060 in ?? ()
#10 0xf77bc468 in ?? ()
#11 0xf77bc990 in ?? ()
#12 0x00020631 in ?? ()
#13 0x50545448 in ?? ()
#14 0x302e312f in ?? ()
#15 0x30303220 in ?? ()
#16 0x0d4b4f20 in ?? ()
#17 0x6e6f430a in ?? ()
#18 0x746e6574 in ?? ()
#19 0x6e654c2d in ?? ()
#20 0x3a687467 in ?? ()
#21 0x0a0d3120 in ?? ()
#22 0x6e6e6f43 in ?? ()
#23 0x69746365 in ?? ()
#24 0x203a6e6f in ?? ()
#25 0x736f6c63 in ?? ()
#26 0x430a0d65 in ?? ()
#27 0x65746e6f in ?? ()
---Type <return> to continue, or q <return> to quit---
#28 0x542d746e in ?? ()
#29 0x3a657079 in ?? ()
#30 0x78657420 in ?? ()
#31 0x74682f74 in ?? ()
#32 0x0a0d6c6d in ?? ()
#33 0x00310a0d in ?? ()
#34 0x2f72cf46 in ?? ()
#35 0xf7798e70 in ?? ()
#36 0x00000002 in ?? ()
#37 0xf7799060 in ?? ()
#38 0xffe21928 in ?? ()
#39 0xf778e6fe in ?? ()
#40 0xf7799060 in ?? ()
#41 0xf77bc46c in ?? ()
#42 0x00000002 in ?? ()
#43 0x00000004 in ?? ()
#44 0x0000000c in ?? ()
#45 0xffffffff in ?? ()
#46 0xf770ea87 in ?? ()
#47 0x2f72cf46 in ?? ()
#48 0xf7799060 in ?? ()
#49 0x00000000 in ?? ()
gdb
shared-libraries
asked on Stack Overflow Apr 14, 2011 by kakinada • edited May 23, 2017 by Community

1 Answer

0

try to use bt - to check more frames

like bt -100 will give you 100 frames or you can use up 100

answered on Stack Overflow Apr 18, 2011 by Vijay

User contributions licensed under CC BY-SA 3.0