c++ - analysis of core dump frame using gdb -


i analysing core dump generated application. stack trace can see below lines #0 0x00779eff in raise () /lib/tls/libc.so.6

#1  0x0077b705 in abort () /lib/tls/libc.so.6  #2  0x006554f7 in __cxa_call_unexpected () /usr/lib/libstdc++.so.5  #3  0x00655544 in std::terminate () /usr/lib/libstdc++.so.5  #4  0x006556b6 in __cxa_throw () /usr/lib/libstdc++.so.5  #5  0x006558d2 in operator new () /usr/lib/libstdc++.so.5   #6  0x006559bf in operator new[] () /usr/lib/libstdc++.so.5 #7  0x090c15df in buffer::resize ()  #8  0x090bd230 in buffer::buffer () 

the definition of buffer function follows

int buffer::resize (     size_t      size         ) {     ……. } 

now have selected frame 7

    (gdb) f 7 #7  0x090c15df in buffer::resize () (gdb) info frame stack level 7, frame @ 0xbfff82f0:  eip = 0x90c15df in buffer::resize(unsigned int); saved eip 0x90bd230  called frame @ 0xbfff8310, caller of frame @ 0xbfff8280  arglist @ 0xbfff82e8, args:   locals @ 0xbfff82e8, previous frame's sp 0xbfff82f0  saved registers:   ebx @ 0xbfff82e4, ebp @ 0xbfff82e8, esi @ 0xbfff8250, edi @ 0xbfff8254, eip @ 0xbfff82ec 

but wanted check value of size passed how do ? appreciated

thanks skp

easiest way (adjusted since question changed):

p size 

p (short print) emit value of size.

pro-tip: hit ctrl+x+a see code executing. (could got list gdb-command.)


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -