User manual

UM0036 Basic debugging features
Doc ID 7705 Rev 11 199/385
5.18 Online commands
An online command is a single line of input that you can use to control the debugger (GDB)
via the Console tab of the Output window. There is no limit on how long it can be. It starts
with a command name, which is followed by arguments whose meaning depends on the
command name. For example, the command step accepts an argument which is the
number of times to step, as in 'step 5'. You can also use the step command with no
arguments. Some command names do not allow any arguments.
Online command names may always be truncated if that abbreviation is unambiguous.
Other possible command abbreviations are listed in the documentation for individual
commands. In some cases, even ambiguous abbreviations are allowed; for example, s is
specially defined as equivalent to step even though there are other commands whose
names start with s. You can test abbreviations by using them as arguments to the help
command.
A blank line as input to the debugger (typing just RET) means to repeat the previous
command. Certain commands (for example, run) will not repeat this way; these are
commands whose unintentional repetition might cause trouble and which you are unlikely to
want to repeat.
The list and x commands, when you repeat them with RET, construct new arguments
rather than repeating exactly as typed. This permits easy scanning of source or memory.
The following section describe some of the most useful online commands.
5.18.1 The load command
load filename
The load command makes a filename (an executable) available for debugging on the
remote system—by downloading, or dynamic linking, for example. The load command also
records the filename symbol table in GDB, like the add-symbol-file command.
The file is loaded at whatever address is specified in the executable. For some object file
formats, you can specify the load address when you link the program; for other formats, like
a.out, the object file format specifies a fixed address.
load does not repeat if you press RET again after using it.
5.18.2 The output_file command
pin -output_file <yes/no>
The output_file command sends the input/output values on pins to a text file port.out
in your project directory. This text file reports pin names and there input/output values at
intervals of 1 cpu cycle. To disable the output, enter gdi -output_file no in the
Console tab.
5.18.3 The stimuli command
pin -stimuli
The -stimuli command allows you to see the input stimuli commands that are being used
by the simulator in the Console tab of the Output window.