Seth Woolley's Man Viewer

cint(1) - cint - C/C++ interpreter - man 1 cint

([section] manual, -k keyword, -K [section] search, -f whatis)
man plain no title

CINT(1)                                                                CINT(1)



NAME
       cint - C/C++ interpreter

SYNOPSIS
       cint <[options]> <[sourcefiles]|[suboption]> <[arguments]>

DESCRIPTION
       cint  is  a  C/C++ interpreter. About 95% of ANSI C and 90% of C++ fea-
       tures are covered. (Data abstraction, class inheritance, virtual(5,8)  func-
       tion, 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(3,n)  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(1,n) as C++, regardless of file(1,n) extension.  Other-
              wise, as C++.

       -b BREAKPOINT
              Set break point
              Set  break point in(1,8) source file. Break point can be specified by
              either line number or function name. Use -f option to specify  a
              source file(1,n) that you want to set(7,n,1 builtins) 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(1,n) and analyzes interface that is exported to the interpreter.
              The information is then compiled into an interface method source
              file(1,n) which can be compiled and lined with  user  code.   Default
              name for the interface method source/header file(1,n) is G__cpplink.C
              and G__cpplink.h.  -c option must be given after -n, -N, -w  and
              -z option if(3,n) 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(1,n) and analyzes interface that is exported to the interpreter.
              The information is then compiled into an interface method source
              file(1,n) which can be compiled and lined with  user  code.   Default
              name  for  the interface method source/header file(1,n) is G__clink.c
              and G__clink.h.  -c option must be given after -n, -N, -w and -z
              option  if(3,n)  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(1,3,n,1 builtins)

       -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(1,8) source file(1,n)

       -E     Dump core at error(8,n)

       -f FILE
              Set break file(1,n)
              This option is used with -b option when setting break point to a
              specified file.

       -F EXPRESSION
              Evaluate  an  EXPRESSION before running interpreted main() func-
              tion.
              This option is normally used  for  overriding  value  of  global
              variable after initialization.

       -G TRACEDMP
              Dump execution trace(3x,n,3x _nc_tracebits) into a file(1,n) 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(1,n) as C, regardless of  file(1,n)  extension.  Other-
              wise, as C++.

       -l DYNAMICLINKLIB
              Link dynamic link(1,2) 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(1,n)  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(1,8) the interface
              method source file(1,n), in(1,8) order to avoid name conflict.  All  func-
              tion  names  in(1,8) the interface method source file(1,n) 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  prob-
              lem, it is safer to run script in(1,8) a lower optimization level.

       -p     Use preprocessor prior to interpretation

       -q SECURITY
              Set security level (default 0)

       -r     Revision and linked function/global info(1,5,n)

       -R     Display input file(1,n) at break point

       -s     Step(-into) execution mode

       -S     Step(-over) execution mode, First stop in(1,8) 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(1,n)
              UNDEFOUT.

       -U DIR (*)
              Directory to disable interface method generation
              Interface method generation is surpressed if(3,n) header file(1,n) 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

       -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(1,n) 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(1,n) 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(1,8) the last one. If source file(1,n)
       is omitted or main() function is not found in(1,8) given source  file(1,n),  cint
       automatically  starts interactive interface.  Cint reads source file(1,n) on
       the fly from the file(1,n) 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(1,8)  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(1,3,1 builtins)("%s0,argv[1]);}'
       $ cint -qlevel1 myprog.C


DEBUG MODE
       Cint starts debug mode at following situations:
       - main() function is not included in(1,8) 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(8,n) or segmentation violation occurred.

       You can perform step and trace(3x,n,3x _nc_tracebits) execution, locate as many  break  points
       as  you  want,  look(1,8,3 Search::Dict)  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(1,n)]  : create new readline dumpfile and start dump
                    y [file(1,n)]  : append readline dump to [file(1,n)]
                    z         : stop readline dump
                    < [file(1,n)]  : execute readline dumpfile
                    > [file(1,n)]  : output redirect to [file(1,n)]
                    2> [file(1,n)] : error(8,n) redirect to [file(1,n)]
                    .         : switch(1,n) 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(1,8) function call stack
                    t         : show function call stack
                    f [file(1,n)]  : select(2,7,2 select_tut) file(1,n) to debug
                    T         : turn on/off trace(3x,n,3x _nc_tracebits) mode for all source
                    A [1|0]   : allowing automatic variable on/off
                    trace(3x,n,3x _nc_tracebits) <classname> : turn on trace(3x,n,3x _nc_tracebits) mode for class
                    deltrace <classname> : turn off trace(3x,n,3x _nc_tracebits) mode for class
                    break [classname] : set(7,n,1 builtins) break point at every [classname]
                                        memberfunc
                    delbreak [classname] : turn off memberfunc break point
       Evaluation:  p [expr(1,3,n)]  : evaluate expression
                                 (no declaration/loop/condition)
                    s [expr(1,3,n)]  : step into expression
                                 (no declaration/loop/condition)
                    S [expr(1,3,n)]  : step over expression
                                 (no declaration/loop/condition)
                    {[statements]} : evaluate statement (any kind)
                    x [file(1,n)]  : load(7,n) [file(1,n)] and evaluate {statements} in(1,8) the
                                file(1,n)
                    X [file(1,n)]  : load(7,n) [file(1,n)] and execute function [file(1,n)]
                                 (wo extension)
                    E <[file(1,n)]>: open(2,3,n) editor and evaluate {statements} in(1,8) the
                                file(1,n)
       Load/Unload: L [file(1,n)]  : load(7,n) [file(1,n)]
                    La [file(1,n)] : reload all files loaded after [file(1,n)]
                    U [file(1,n)]  : unload [file(1,n)]
                    C [1|0]   : copy source to $TMPDIR (on/off)
                    reset(1,7,1 tput)     : reset(1,7,1 tput) 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(1,n)      : show loaded files
                    where     : show current file(1,n) position
                    security  : show security level
                    refcount  : reference count control on/off
                    garbage   : show garbage collection buffer
                    Garbage   : Do garbage collection
                    cover [file(1,n)] : save trace(3x,n,3x _nc_tracebits) 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(1,n)]  : select(2,7,2 select_tut) file(1,n) to debug
                    b [line]  : set(7,n,1 builtins) break point
                    db [line] : delete break point
                    a [assert]: break only if(3,n) 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(3,n,1 builtins) flags
                    dasm      : disassembler
       Quit:        q         : quit cint
                    qqq       : really do quit cint

SEE ALSO
       makecint(1),
       The   programs   are   documented   fully   in(1,8)   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(1,8) the Cint source pack-
       age for the Debian GNU/Linux system (but may be used by others).



                               February  3, 2001                       CINT(1)

References for this manual (incoming links)