Setting up GDB in Eclipse

Configuring Eclipse Debugger

  1. In your Eclipse project go to Run->Debug Configurations...

Image of Deubg Configuration in Eclipse IDE.
  1. Select the Debugger tab.

  2. Select the Connect to remote GDB server radio button and under Host Name enter localhost and under Port Number enter 3333

Image of Eclipse Debug Setup.
  1. Hit Apply

Launching GDB Debugging in Eclipse with Lager

  1. Plug device into Lager Gateway

  2. Connect to device, e.g. lager connect --device stm32f3x --interface stlink --transport hla_swd

  3. Start gdb server

~ lager gdbserver
Serving GDB on localhost:3333. Press Ctrl+C to quit.
  1. In Eclipse start the debugger.

Image of starting the debugger.
Image of debugging in Eclipse