This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: displaying source after and before the program counter
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: gdb at sources dot redhat dot com
- Date: Mon, 15 Dec 2003 10:53:17 -0500
- Subject: Re: displaying source after and before the program counter
- References: <1071484872.21849.ezmlm@sources.redhat.com> <000b01c3c2f9$35a1fe80$0901a8c0@vianneyl>
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