Re: problem using gdb with ROOT

From: John Idarraga <idarraga_at_cern.ch>
Date: Thu, 31 May 2012 11:36:57 +0200


Hello,

If you start gdb with root.exe you won't have access to any of the libraries at the moment of loading the root.exe executable, because root finds the libraries later. What you can do to make sure you find your debug symbols is the following

  1. Start gdb with no parameters (you can do it from emacs too)
  2. Then run root separately and load your libs
  3. Look for the processId and attach gdb to that id Here you will see that your root session freezes and you are ready to put on your breakpoints
  4. Tell gdb to "continue" and then you recover your ROOT session

J.

On 05/31/2012 11:32 AM, Chiara Zampolli wrote:
> Ciao Timur,
>
> Yes, I forgot to mention it.
> For the first problem, I think I needed to call:
>
> gdb root.exe
>
> instead of
>
> gdb root
>
> But for the second one (breakpoints not working) I don't know. I tried
> with simply ROOT (no AliRoot) with the simple 1-line macro I am
> attaching, and setting:
>
> b TObjArray.cxx:67
>
> or
>
> b TObjArray.cxx:61
>
> But it does not break...
>
> Thanks!
>
> Chiara
>
>
>
>
> On May 31, 2012, at 11:25 AM, Timur Pocheptsov wrote:
>
> > Is your ROOT compiled with debug information?
> > ________________________________________
> > From: owner-roottalk_at_root.cern.ch [owner-roottalk_at_root.cern.ch] on
> behalf of Chiara Zampolli [chiara.zampolli_at_bo.infn.it]
> > Sent: 31 May 2012 11:23
> > To: Root
> > Subject: [ROOT] problem using gdb with ROOT
> >
> > Dear all,
> >
> > I have some problems running gdb with ROOT. First, if I simply
> call:
> >
> > gdb root
> >
> > It does not work, and I get:
> >
> > (gdb) r
> > Starting program: /Users/zampolli/SOFT/ROOT/v5-33-02b/bin/root
> > Reading symbols for shared libraries .+++++.......... done
> > *******************************************
> > * *
> > * W E L C O M E to R O O T *
> > * *
> > * Version 5.33/03 6 March 2012 *
> > * *
> > * You are welcome to visit our Web site *
> > * http://root.cern.ch *
> > * *
> > *******************************************
> >
> > ROOT 5.33/03 (tags/v5-33-02b_at_43822, Apr 22 2012, 23:58:59 on macosx64)
> >
> > CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010
> > Type ? for help. Commands must be C++ statements.
> > Enclose multiple statements between { }.
> >
> > Program received signal SIGUSR1, User defined signal 1.
> > 0x00007fff87939932 in select$DARWIN_EXTSN ()
> > (gdb)
> >
> > Any idea?
> >
> > Second, if I run gdb with AliRoot (which works), and try to set a
> breakpoint to TObjArray.cxx:567 (for example), the breakpoint does not
> work, while breakpoints with AliRoot do.
> > The ROOT version is v5-33-02b, and I am running with two different
> Mac (iMac and MacBook) with SnowLeopard.
> >
> > Thanks for any hint.
> >
> > Best Regards,
> >
> > Chiara
> >
> >
>
Received on Thu May 31 2012 - 11:36:58 CEST

This archive was generated by hypermail 2.2.0 : Thu May 31 2012 - 17:50:01 CEST