A group of variables and functions give the name of the interface and different types of information.
to_shortname
. This is the name of the target
for use when connecting in GDB. For the OpenRISC 1000, it is
"jtag"
, so connection in GDB will be
established by using the command
target jtag ....
to_longname
. A brief description of the
command for use by the GDB info target
command.
to_doc
. The help text for this target. The
first sentence is used for general help about all targets, the
full text for help specifically about this target. The text
explains how to connect both directly and over TCP/IP.
or1k_files_info
. This function provides the
initial information for info target. For
the OpenRISC 1000 it provides the name of the program being run
on the target, if known.
OpenRISC remote targets are always executable, with full access to memory, stack, registers etc once the connection is established. A set of variables in struct target_ops for OpenRISC 1000 records this.
to_stratum
. Since the OpenRISC 1000 target
can execute code, this field is set to
process_stratum
.
to_has_all_memory
,
to_has_memory
,
to_has_stack
and
to_has_registers
. Once the OpenRISC 1000
target is connected, it has access to all its memory, a stack
and registers, so all these fields are set to 1 (true).
to_has_execution
. When the connection is
initially established, the OpenRISC 1000 processor will be
stalled, so is not actually executing. So this field is
initialized to 0 (false).
to_have_steppable_watchpoint
and
to_have_continuable_watchpoint
. These flags
indicate whether the target can step through a watchpoint
immediately after it has been executed, or if the watchpoint can
be immediate continued without having any effect.
If the OpenRISC 1000 triggers a hardware watchpoint, the instruction affected will not have completed execution, so must be re-executed (the code cannot continue). Furthermore the watchpoint must be temporarily disabled while re-executing, or it will trigger again (it is not steppable). Thus both these flags are set to 0 (false).