Skip to content

Latest commit

 

History

History
81 lines (49 loc) · 1.63 KB

gdb.asciidoc

File metadata and controls

81 lines (49 loc) · 1.63 KB

GDB Server

Packets

all packets: "$packet-data#checksum"

notification packets: "% data # checksum" ( Example : %Stop:…​)

empty response is "$#00"

testing

$ arm-none-eabi-gdb --nh --nx build/application.elf
(gdb) set debug remote 1
(gdb) target remote 192.168.42.1:54321
(gdb) i r

Thread id

id

Meaning

-1

all threads

0

any thread

1

first thread

p1.-1

all threads in process 1

Dictionary

There are some GDB specific words used that only make sense in the GDB contet. These words are defined here.

Word

Meaning

stub

the JTAG/SWD probe

process

processes can have one or more threads. Each proces has a seperate memory and can not access the memory of another process.

thread

A code execution path. Threads can access the memory of other threads in the same process. (Embeedde context: in bare metal we have one thread per CPU core. If the firmware uses an OS then we can be "aware" of the threads of the OS.