Syntax checking

The syntax checking mechanism checks the validity of a command without actually executing it and thus without requiring target interactions and without changing the system settings.

The debugger command sc performs syntax checking. It can be used in two different ways.

To check the syntax of a single command, enter:

sc "command"

To check the syntax of an entire script file and all nested files, enter:

sc < script_file_name

See sc.

Syntax checking is also automatically invoked whenever a breakpoint with an associated command or condition is created. The bpsyntaxchecking configuration option can be used to disable this automatic checking. The validity of the commands associated with the breakpoint are checked in the context that would exist if the breakpoint were hit. If a syntax error is found in the breakpoint command, a warning message is issued.

For example, entering the command:

sc "print abcdef"

will echo the error message:

Syntax Checking: Unknown name "abcdef".

and entering the command:

b main { print abcdef; }

will echo the the error messages:

Syntax Checking: Unknown name "abcdef".
Failed to set breakpoint owing to syntax error.

Related topic:


Previous

Next



Copyright © 1999, Green Hills Software. All rights reserved.