Re: [ROOT] How to debug SegVs received at the root prompt?

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Mon Jul 30 2001 - 19:30:17 MEST


Hi Brett,

  Q1: the "Root >" prompt is generated in the TUnixSystem class after printing
the "*** Break ***" line. In this class we have no access to the "real" prompt
which is maintained by the TRint class so I just use this generic prompt.

Q2: do like Philippe described: gdb $ROOTSYS/bin/root.exe (or use ddd like
    I do).


Cheers, Fons.



Brett Viren wrote:
> 
> Hi.
> 
> I have a custom library which I dynamically link into the root app,
> along with the others on which it depends.  Then, durring the creation
> ofan object from this library I get a segmentation violation.
> 
> The session goes a little like this:
> 
> root [0] gSystem->Load("....");
> root [1] gSystem->Load("....");
> root [2] m = new MyObject()
>  ...
>  *** Break *** segmentation violation
> Root >
> 
> 2 questions:
> 
>  - What, if anything is the meaning of the change of root prompt
>  style?
> 
>  - More importantly, is there some way to debug this SegV without
>  peppering the code with a lot of "cerr<<"s?  When I run under GDB,
>  root "eats" the SegV signal and keeps running so I can't even get a
>  stack trace.  Any suggestions?
> 
> Thanks,
> -Brett.
> 
> 

-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7677910



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:53 MET