Hi Ron, whar if you use G__process_cmd() to exec .debug, instead of G__exec_text()? If this does not work, please contact directly Masa (although he is currently on holidays for two weeks). Cheers, Fons. Meir Ron wrote: > > Hi rooters, > Hi Fons! > > 1) Thanks Fons for helping me. > 2) I try the below suggestion but no succeed ! > > (The problem was: > I'm using the CINT as an interpreter in my program: > I handle it with a special class that send commands to the > CINT.) > > example code: > try > { > G__init_cint((char*)"cint"); > > G__loadfile((char*)(source_file.c_str())); > > G__init_process_cmd(); > > string command = " .debug"; > G__exec_text((char*)(command.c_str())); > > command = " .L "; > command += source_file; > G__exec_text((char*)(command.c_str())); > > command = " .b 13"; > G__exec_text((char*)(command.c_str())); > > G__calc((char*)("counter();")); > > G__scratch_all(); > > } > catch(string &e) > { > LogicError a("Error ocour: ",string(e),CRITICAL); > throw a; > } > > What I need is to debug the load file by sending command from the process. > Debugging from console (getting CINT prompt is not good for me! > > Errors example that I received after run this example: > > Warning: Illegal numerical expression .debug > FILE:C:\DOCUME~1\meirr\LOCALS~1\Temp\3 LINE:2 > Warning: Illegal numerical expression .debug > FILE:C:\DOCUME~1\meirr\LOCALS~1\Temp\3 LINE:2 > Warning: Illegal numerical expression .debug > FILE:C:\DOCUME~1\meirr\LOCALS~1\Temp\3 LINE:2 > Error: unsigned can not be specified for float or double .debug > FILE:C:\DOCUME~1\meirr\LOCALS~1\Temp\3 LINE:2 > !!!Dictionary position rewinded... !!!Error recovered!!! > Error: No symbol \test in current scope > FILE:C:\DOCUME~1\meirr\LOCALS~1\Temp\4 LINE:2 > Error: Failed to evaluate \test.cc FILE:C:\DOCUME~1\meirr\LOCALS~1\Temp\4 > LINE:2 > !!!Dictionary position rewinded... !!!Error recovered!!! > Warning: Illegal numerical expression .b13 > FILE:C:\DOCUME~1\meirr\LOCALS~1\Temp\5 LINE:2 > -----Original Message----- > From: Meir Ron [mailto:meirr@uxsrvc.tti-telecom.com] > Sent: Monday, July 23, 2001 10:06 AM > To: 'roottalk@root.cern.ch' > Subject: [ROOT] CINT - Debug mode > > Hi Fox > > I have some difficulties with the debug mode. > > I'm using the CINT as an interpreter in my program: > I handle it with a special class that send commands to the CINT. > example: > Interpreter::Interpreter() > { > int ret; > ret = G__init_cint((char*)"cint"); // if(ret!=0) > } > Interpreter::~Interpreter() > { > G__scratch_all(); > } > long Interpreter::Exec(string text) > { > return G__int(G__exec_text((char*)(text.c_str()))); > } > long Interpreter::Calc(string funcname) > { > return G__int(G__calc((char*)(funcname.c_str()))); > } > void Interpreter::LoadFile(string filename) > { > try{ > int ret; > ret = G__loadfile((char*)(filename.c_str())); > }catch(...){ > cerr << "BUG: Interpreter::LoadFile"<<endl; > } > } > > My propose is to switch the CINT to debug mode, set break points etz. > WITHOUT adding command to the script file which loaded. (adding > G__pause()... to the file is not good for me) > I tried to use G__process_cmd command but I didn't succeed! > > I'll be thankful for any help! > > Meir Ron > Tel: +(972)-3-9269007 > Home: +(972)-3-9220847 > Email: meirr@tti-telecom.com <mailto:meirr@tti-telecom.com> -- 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:52 MET