displaying source after and before the program counter
Daniel Jacobowitz
drow@mvista.com
Mon Dec 15 15:53:00 GMT 2003
On Mon, Dec 15, 2003 at 11:50:09AM +0100, Vianney Lecroart wrote:
> Hello,
>
> I have a C++ program that generates a core dump. I must activate
> inlining because it's too slow. It crashes very rarely.
>
> The program stack is:
>
> #2 0x080597da in CBase<TRow>::operator()() const () at
> /home/ace/src/gs/mpvi.h:451
> #3 0x081e0c1f in CPhrase::update() (this=0x115245d8) at
> /home/ace/src/gs/mpvi.h:527
>
> The problem is that CPhrase::update() is a big function in a cpp file. I
> would like to know the line where the call to mpvi.h:527 is made. I
> can't see it because the function is inlining and it's an accessor, so,
> it's called at least 50 times on this function.
>
> The question is: Is it possible to know where in the function ::update()
> the crash happened?
In addition to the other suggestions you've gotten, you can work this
out by hand from the debug information; however, it's a bit of a pain
to do and you have to get familiar with DWARF-2. GDB has enough
information to do this for you but currently doesn't support it.
Hopefully that will change sometime next year.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
More information about the Gdb
mailing list