CINT .L problem
Jacek M. Holeczek (holeczek@us.edu.pl)
Sun, 16 May 1999 19:49:17 +0200 (MET DST)
Hi,
Masa writes :
> h_x pointer should be initialized by ".L". If it wasn't something is
> already broken before ".L". The problem does not reproduce on my machine.
> The pointer is correctly initialized by ".L".
After some fights with debugger I think it's NOT possible that the .L
works the way you write. The direct cause is : the G__prerun is set to 1
during execution of the G_interpret_func ( see the line 2379 and following
of the file CINT_ifunc.c ).
On ".L t1.cxx" the G__prerun is set to 1 in line 1500 in file CINT_pause.c
in function G__process_cmd shortly before, in line 1501 of the same file,
the G__loadfile is called, which again ( line 1100 of CINT_loadfile.c )
sets G__prerun to 1 and then calls G__exec_statement ( line 1159 of the
CINT_loadfile.c ), which then ...
------------------------------------------------------------------------------
(gdb) where
#0 G__interpret_func (result7=0xbfffa980, funcname=0xbfffa880 "TH1F",
libp=0xbfff7bbc, hash=275, p_ifunc=0x8305a48, funcmatch=1, memfunc_flag=3)
at CINT_ifunc.c:2379
#1 0x401799d4 in G__getfunction (item=0xbfffd630 "TH1F()",
known3=0xbfffaa1c, memfunc_flag=3) at CINT_func.c:936
#2 0x40101405 in G__new_operator (expression=0xbfffdba4 "TH1F") at
CINT_new.c:321
#3 0x4016f447 in G__getpower (expression2=0xbfffdba0 "new TH1F") at
CINT_expr.c:1226
#4 0x4011576f in G__define_var (tagnum=226, typenum=-1) at
CINT_decl.c:1299
#5 0x4013b5e4 in G__defined_type (typename=0xbfffe76c "TH1F", len=4) at
CINT_typedef.c:1285
#6 0x40137621 in G__exec_statement () at CINT_parse.c:3377
#7 0x40152ae5 in G__loadfile (filenamein=0xbffff626
"/home/holeczek/s132/./t1.cxx") at CINT_loadfile.c:1159
#8 0x4013e49e in G__process_cmd (line=0x400de843 ".L
/home/holeczek/s132/./t1.cxx", prompt=0x805c410 "", more=0x805c40c) at
CINT_pause.c:1501
#9 0x404f0925 in TCint::ProcessLine (this=0x805c3f0, line=0x400de843 ".L
/home/holeczek/s132/./t1.cxx") at META_Cint.cxx:177
#10 0x40036e21 in TApplication::ProcessLine (this=0x84c0c00,
line=0x40263c40 ".L t1.cxx") at BASE_Application.cxx:474
#11 0x40840f9b in TRint::HandleTermInput (this=0x84c0c00) at
RINT_Rint.cxx:359
#12 0x4084060c in TTermInputHandler::Notify (this=0x84d2108) at
RINT_Rint.cxx:133
#13 0x40841157 in TTermInputHandler::ReadNotify (this=0x84d2108) at
RINT_Rint.cxx:127
#14 0x4060e653 in TUnixSystem::DispatchOneEvent (this=0x805a1c0,
pendingOnly=0 '\000') at UNIX_UnixSystem.cxx:449
#15 0x40058ec8 in TSystem::InnerLoop (this=0x805a1c0) at
BASE_System.cxx:259
#16 0x40058e4d in TSystem::Run (this=0x805a1c0) at BASE_System.cxx:237
#17 0x40037675 in TApplication::Run (this=0x84c0c00, retrn=0) at
BASE_Application.cxx:636
#18 0x40840bea in TRint::Run (this=0x84c0c00, retrn=0 '\000') at
RINT_Rint.cxx:254
#19 0x80488d5 in main (argc=1, argv=0xbffffb38) at MAIN_rmain.cxx:51
------------------------------------------------------------------------------
The t1.cxx was a one line file :
------------------------------------------------------------------------------
TH1F *h_tpat= new TH1F();
------------------------------------------------------------------------------
Jacek.