This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: displaying source after and before the program counter


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]