beh_debug(3)

ORIGIN

Cao&Vlsi libraries, BEH package, libBhl106.a

NAME

beh_debug - BEH structures displayer-debugger

SYNOPSIS

void beh_debug (pnt, type)
void *pnt;
char *type;

PARAMETERS

pnt pointer of the structure to be displayed

type
    name of the structure to be displayed. type can be any of "befig", "beout", "bereg", "bemsg", "bepor", "begen", "berin", "bebus", "beaux", "bebux", "biabl", "binode"

DESCRIPTION

When called, beh_debug() first displaies the structure pointed by pnt then, prints the line:
    COMMAND >>
and waits for a command being entered by the user. If pnt is a NULL pointer or type doesn't represent a legal structure, beh_debug() exits without making any action.

To display the structure, beh_debug() prints a line per field. Fields containing immediate value (integer, character, string, ...) are displayed in the following form:
    name_of_the_field : value_of_the_field

Fields containing a pointer are marked by the symbol ->. If the pointer is a NULL pointer, the field is displayed as:
    -> name_of_the_field :
In the other case, beh_debug() prints :
    -> name_of_the_field : AVAILABLE

Two kinds of command can be introduced by the user.

A command can be the name of a field containing a pointer. The command is accepted only if the pointer is not a NULL pointer (field displayed as "AVAILABLE"). Reading such a command, beh_debug() first pushes the current structure on its stack then, displaies the structure pointed by the named field.

The second kind of commands are predefined commands :

    _exit
        to exit from the debugger

    _up to return to the previous structure

    _stop
        to put a stop mark on the current structure

    _top
        to return to the first structure (pointed by pnt)

    _back
        to return to the last structure marked with a stop mark

    _set
        to modify the value of a field containing an immediate value (_set field value)

In addition to these commands, the command . (dot) can be used to repete the last command.

EXAMPLE

#include <beh106.h>
struct beout *beout_pnt;
beh_debug (beout_pnt , "beout");

NOTES

Scanning structures, beh_debug() uses an internal stack. The message "stack overflow" is printed if too many structures have been pushed on the stack.

SEE ALSO

beh(2)

BUGS

Please e-mail to cao-vlsi@masi.ibp.fr for bug report and suggestions.