Bdb

3. Bdb The ``Bigloo Debugger'' Nov 1999 -- Running Programs Under BDB

main page
top: | Bdb The ``Bigloo Debugger'' Nov 1999
Running Programs Under BDB
Chapters
| Other informations may be found at See info-file ` gdb.info', Gdb.
### 3.1 Solaris Run
On the Solaris platform, the normal initialization process of the Garbage Collector is to raise a `SIGSEGV` signal. You can safely ignore this signal. Simply emit a |continue| when the execution first stops because of that signal.
### 3.2 Scheme vs C
BDB is able to debug both Scheme and C code. Commands to inspect variables and code are the same for Scheme and C. The general convention adopted by BDB is to represent Scheme symbols in uppercase. This distinction is of importance because the BDB treatment is different for a Scheme expression and for a C expression. For instance, the command
    break main
sets a breakpoint into a C function named `main`. While the command
    break MAIN
sets a breakpoint into a Scheme function named `main`.
### 3.3 Compilation
BDB requires special compilation mode for Bigloo and C files. Some of the files may not be compiled in that special mode. For those, BDB won't be able to step over the code. It is mandatory that, at least, the Bigloo module that contains the main entry point is compiled with debugging informations The two options that tells Bigloo to produce BDB code are `-gbdb` and `-gbdb2`. The second delivers more runtime informations but may enlarge the size of the binary file. The option to use when compiling C code is the regular debugging option (e.g. `-g`) There is no need to link programs with static version of the libraries although setting up breakpoints in library code is enabled only for static libraries. On some platforms linking with static versions of the libraries will prevent the debugger from getting confused when loading a dynamic library (e.g. it may happen that the debugger steps the dynamic code loader).
### 3.4 Starting
`run` `` `r` `` Use the `run` command to start your program under BDB. You must first specify the program name with an argument to BDB, or by using the `file` command The arguments. Specify the arguments passed to your program as the arguments of the `run` command. If no arguments are specified and this run invocation is not the first one, previous arguments to the last `run` command are used The standard input and output. The current BDB version is unable to debug interactive programs. This is a major flaw remedied by the graphical version of BDB (namely KBDB).

This Html page has been produced by Skribe.
Last update Fri Dec 22 17:20:20 2023.