g-cache generic-flash-memory
Simics Reference Manual  /  5 Classes  / 

gdb-remote

Description

The gdb-remote module allows a GDB session to connect to Simics and control the execution. An object of class gdb-remote is used to accept incoming GDB connection requests.

A GDB binary capable of debugging many Simics target machines is included in the Simics Base package. If you want to build your own gdb, read on.

The following table lists, for each target architectures supported by gdb-remote, the string to give to configure as the --target parameter when building GDB, and any command you may have to enter at the GDB command prompt before connecting to Simics:

arm64
--target aarch64-elf
arc600
--target arc-elf32
command: set architecture opella-target arc600
arc700
--target arc-elf32
command: set architecture ARC700
armbe
--target armbe-unknown-linux-gnu
armle
--target armle-unknown-linux-gnu
h8300
--target h8300-elf
command: set architecture h8300(s|h)
m68k
--target m68k
command: set architecture m68k
mips32be
--target mips-elf-linux
command: set architecture mips:isa32r2
mips32le
--target mips-elf-linux
command: set architecture mips:isa32r2
mips64be
--target mips64-elf64-linux64
command: set architecture mips:isa64r2
mips64le
--target mips64el-elf64-linux64
command: set architecture mips:isa64r2
nios2
--target nios2-elf
ppc32
--target powerpc64-elf-linux
command: set architecture powerpc:common
ppc64
--target powerpc64-elf-linux
command: set architecture powerpc:common64
ppce500
--target powerpc64-elf-linux
command: set architecture powerpc:e500
risc-v32
command: set architecture riscv:rv32
risc-v64
--target riscv64-linux-gnu
command: set architecture riscv
sparc-v8
--target sparc-unknown-linux-gnu
command: set architecture sparc:v8plus
x86-64
--target x86_64-pc-linux-gnu
command: set architecture i386:x86-64
x86
--target x86_64-pc-linux-gnu
command: set architecture i386
xtensa
--target xtensa
command: set architecture xtensa

Note that these --target flags are not the only ones that will work, just examples of ones that do work.

Interfaces Implemented

conf_object, log_object, external_connection_events

Notifiers

cell-change
Notifier that is triggered after the object's cell was changed.
object-delete
Notifier that is triggered just before Simics object is deleted.
queue-change
Notifier that is triggered after the object's clock was changed. New clock can be obtained with the SIM_object_clock function.

Port Objects

tcp
tcp-server – gdb-remote TCP server
unix_socket
unix-socket-server – gdb-remote Unix domain socket server

Commands for this class

Attributes

cpus
Pseudo attribute; read/write access; type: [o*]
Processors to connect the GDB stub to.
architecture
Pseudo attribute; read/write access; type: s
Architecture of target.
disconnect
Pseudo attribute; write-only access; type: b
Disconnects the remote GDB
connected
Pseudo attribute; read-only access; type: b
Returns true if the gdb-remote object is connected to a GDB session, false if not.
signal
Pseudo attribute; write-only access; type: i
Sends a signal to the remote GDB. This makes GDB think the program it is debugging has received a signal. See the signal(7) man page for a list of signal numbers.
send_packet
Pseudo attribute; write-only access; type: s
Sends a raw packet from gdb-remote to GDB. The string that this attribute is written with will be sent as a packet to GDB.
large_operations
Optional attribute; read/write access; type: i
Set to non-zero if memory operations received from GDB should be performed as single operations instead of bytewise
send_target_xml
Optional attribute; read/write access; type: b
Should an XML target description be sent to GDB, default is true, but can be disabled since it can confuse some clients.
no_xml_registers
Optional attribute; read/write access; type: b
If true, exclude register layout from XML target description, only architecture will be sent as XML.
multiprocess_support
Pseudo attribute; read/write access; type: b
When set the gdb-remote stub will say that it supports multiprocess. This determines how client and stub communicates process and thread data. Defaults to true.

Provided By

gdb-remote
g-cache generic-flash-memory