Rechercher une page de manuel
cint.root
Langue: en
Version: February 3, 2001 (debian - 07/07/09)
Section: 1 (Commandes utilisateur)
Sommaire
NAME
cint - C/C++ interpreterSYNOPSIS
cint <[options]> <[sourcefiles]|[suboption]> <[arguments]>DESCRIPTION
cint is a C/C++ interpreter. About 95% of ANSI C and 90% of C++ features are covered. (Data abstraction, class inheritance, virtual function, function and operator overloading, default parameters, templates, etc...) Cint has a source code debugger for interpreted source code and it has sufficient capability for debugging a C++ script.CINT AND MAKECINT
Cint can be used just as it is, but it is recommended to use makecint. Makecint can encapsulate native C/C++ objects into Cint as precompiled libraries. User defined precompiled objects can be accessed from the interpreter and a user application can invoke the C/C++ interpreter as interactive interface. It provides a seamless compiler/interpreter scripting environment. Precompiled libraries can be dynamically loaded/unloaded if they are configured as Dynamic Link Library (DLL). See also makecint(1).OPTIONS
(*) : used only with makecint or -c option- -A
- ANSI C++ mode(default)
Handles given file as C++, regardless of file extension. Otherwise, .c files are handled as C and .cxx, .C and .cpp files are handled as C++. - -b BREAKPOINT
- Set break point
Set break point in source file. Break point can be specified by either line number or function name. Use -f option to specify a source file that you want to set break point.-b [line] -b [funcname] -b [classname]::[funcname]
- -c -1 (*)
- Make C++ precompiled interface method files
Cint creates interface method source file. Cint reads C++ header file and analyzes interface that is exported to the interpreter. The information is then compiled into an interface method source file which can be compiled and lined with user code. Default name for the interface method source/header file is G__cpplink.C and G__cpplink.h. -c option must be given after -n, -N, -w and -z option if used simultaneously. Normally, -c-1 option is used within the 'makecint' tool. In that case, a user does not need to know the detail. - -c -2 (*)
- Make C precompiled interface method files
Cint creates interface method source file. Cint reads C header file and analyzes interface that is exported to the interpreter. The information is then compiled into an interface method source file which can be compiled and lined with user code. Default name for the interface method source/header file is G__clink.c and G__clink.h. -c option must be given after -n, -N, -w and -z option if used simultaneously. Normally, -c-1 option is used within the 'makecint' tool. In that case, a user does not need to know the detail. - -C
- Copy source to $TMPDIR so that src can be changed during cint run
- -d DUMPFILE
- Dump function call history
- -D MACRO
- Define macro MACRO with the value '1' as its definition.
- -D MACRO=DEFN
- Define macro MACRO as DEFN
- -e
- Process extern declarations in source file
- -E
- Dump core at error
- -f FILE
- Set break file
This option is used with -b option when setting break point to a specified file. - -F EXPRESSION
- Evaluate an EXPRESSION before running interpreted main() function.
This option is normally used for overriding value of global variable after initialization. - -G TRACEDMP
- Dump execution trace into a file TRACEDMP
- -i
- Interactively return undefined symbol value
- -I INCLUDEPATH
- Append directory INCLUDEPATH to the list of directories searched for include files.
- -K
- C mode
Handles given file as C, regardless of file extension. Otherwise, .c files are handled as C and .cxx, .C and .cpp files are handled as C++. - -l DYNAMICLINKLIB
- Link dynamic link library (or shared library)
- -n LINKNAME (*)
- Specify interface method filename
This option must be used with -c, and must be given before the -c option. Cint creates an interface method source file as LINKNAME. If omitted, G__cpplink.C, G__cpplink.h are created for C++, and G__clink.c, G__clink.h are created for C. - -N DLL_NAME (*)
- Specify DLL interface method name
This option must be used with -c, and must be given before the -c option. This option changes function name in the interface method source file, in order to avoid name conflict. All function names in the interface method source file are suffixed by DLL_NAME. - -O [0~5]
- Loop compiler on (1~5) off (0). Default is on (4)
Controls bytecode compiler optimization level. In case of problem, it is safer to run script in a lower optimization level. - -p
- Use preprocessor prior to interpretation
- -q SECURITY
- Set security level (default 0)
- -r
- Revision and linked function/global info
- -R
- Display input file at break point
- -s
- Step(-into) execution mode
- -S
- Step(-over) execution mode, First stop in main()
- -t
- Trace execution mode
- -T
- Trace execution mode (from pre-run)
- -u UNDEFOUT (*)
- Listup possible undefined typenames
Lists up undefined typenames and output that list into a file UNDEFOUT. - -U DIR (*)
- Directory to disable interface method generation
Interface method generation is surpressed if header file belongs to specified directory DIR. - -V (*)
- Generate interface method for non-public member
- -v
- Bytecode compiler debug mode
- -w [0|1] (*)
- Switch between archive library and DLL when creating interface method source file. This option is needed only for Windows-NT/9x/200x when cint creates .DEF file for precompiled library. This option must be given before -c option.
- -X READLINEDUMPFILE
- Execute readline dumpfile
- -x 'main() {...}'
- Execute argument as source code
- -Y [0|1]
- ignore(1) not ignore(0) std namespace
This option switches 'std' namespace to be used(0) or ignored(1). - -z PROJECTNAME (*)
- Specify project name as PROJECTNAME when making interface method source file. This option is needed only for Windows-NT/9x/200x when cint creates .DEF file for precompiled library. This option must be given before -c option.
- -Z [0|1]
- Auto loading of standard header files with DLL
This option controls automatic loading of standard header files with DLL. If -Z1 is given, standard header files included when making interface method source file are automatically loaded when loading DLL.
SOURCEFILES
Cint directly accepts C/C++ source file. If you give multiple source files, main() function must be included in the last one. If source file is omitted or main() function is not found in given source file, cint automatically starts interactive interface. Cint reads source file on the fly from the file system. Do not change the active source files during cint run.
SUBOPTIONS
(*) : used only with makecint or -c option Suboptions are options which appears in between source files.
- -A
- ANSI C++ mode(default)
- +V
- turn on class title comment mode for following source files
- -V
- turn off class title comment mode for following source files
- +P
- turn on preprocessor for following source files
- -P
- turn off preprocessor for following source files
- +STUB (*)
- stub function header begin
- -STUB (*)
- stub function header end ARGUMENTS Arguments to main(int argc,char *argv[]) function.
EXAMPLES
$ cint $ cint lib1.c lib2.c source.c $ cint -S -I../include -DDEBUG source.c $ cint -x 'main(int argc,char *argv[]){printf("%s,argv[1]);}' $ cint -qlevel1 myprog.C
DEBUG MODE
Cint starts debug mode at following situations:- main() function is not included in the given source file.
- Step execution mode (-S,-s option)
- Program reaches to a break point
- Keyboard interrupt (CTL-C or Break)
- Explicit call of interactive interface function G__pause().
- Bus error or segmentation violation occurred. You can perform step and trace execution, locate as many break points as you want, look into function/variable/class information tables, etc... Use of following debug mode commands enables you to do these things. Cint's debug mode can only debug interpreted source code. You need to use a binary level debugger to debug precompiled library. Cint can be used with any kind of binary level debugger such as gdb. cint (C/C++ interpreter) debugger usage:
Dump: n [file] : create new readline dumpfile and start dump y [file] : append readline dump to [file] z : stop readline dump < [file] : execute readline dumpfile > [file] : output redirect to [file] 2> [file] : error redirect to [file] . : switch command input mode Help: ? : help help : help /[keyword] : help information for keyword Completion: [nam][Tab] : complete symbol name start with [nam] [nam][Tab][Tab] : list up all symbol name start with [nam]] Shell: ![shell] : execute shell command Source: v <[line]>: view source code <around [line]> V [stack] : view source code in function call stack t : show function call stack f [file] : select file to debug T : turn on/off trace mode for all source A [1|0] : allowing automatic variable on/off trace <classname> : turn on trace mode for class deltrace <classname> : turn off trace mode for class break [classname] : set break point at every [classname] memberfunc delbreak [classname] : turn off memberfunc break point Evaluation: p [expr] : evaluate expression (no declaration/loop/condition) s [expr] : step into expression (no declaration/loop/condition) S [expr] : step over expression (no declaration/loop/condition) {[statements]} : evaluate statement (any kind) x [file] : load [file] and evaluate {statements} in the file X [file] : load [file] and execute function [file] (wo extension) E <[file]>: open editor and evaluate {statements} in the file Load/Unload: L [file] : load [file] La [file] : reload all files loaded after [file] U [file] : unload [file] C [1|0] : copy source to $TMPDIR (on/off) reset : reset interpreter environment undo : undo previous declarations Monitor: g <[var]> : list global variable l <[var]> : list local variable proto <[scope]::>[func] : show function prototype class <[name]> : show class definition (one level) Class <[name]> : show class definition (all level) typedef <name> : show typedefs function : show interpreted functions macro : show macro functions template : show templates include : show include paths file : show loaded files where : show current file position security : show security level refcount : reference count control on/off garbage : show garbage collection buffer Garbage : Do garbage collection cover [file] : save trace coverage return [val] : return undefined symbol value Run: S : step over function/loop s : step into function/loop i : ignore and step over c <[line]>: continue <to [line]> e : step out from function f [file] : select file to debug b [line] : set break point db [line] : delete break point a [assert]: break only if assertion is true O [0~4] : Set bytecode compiler mode debug : bytecode status display on/off asmstep : bytecode step mode on/off status : show bytecode exec flags dasm : disassembler Quit: q : quit cint qqq : really do quit cint makecint(1),
The programs are documented fully in various files under /usr/share/doc/cint/.
AUTHOR
Masaharu Goto <MXJ02154@niftyserve.or.jp>Copyright © 1995-2000 Masaharu Goto
This manual page was compiled from information in the Cint source package for the Debian GNU/Linux system (but may be used by others).
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre