Eclipse and GDB: Process Properties, Arguments and GDB Traces

To me this was new, and thanks to Liviu I know now how to inspect the command line passed to the GDB server (see “Semihosting (again!) with NXP Kinetis SDK V2.0“) 🙂

Process Properties

Process Properties

To get the arguments passed to the process and GDB Server, right-click on the entry in the Eclipse Debug View and select properties. This provides me the full launching argument to the process:

Process Properties

Process Properties

After launching the server, there is exchange between the GDB client in Eclipse and the GDB server (e.g. Segger or P&E). This is logged in the ‘gdb traces’ (see “Board Bring-Up Tips, GDB Logs and Traces in Eclipse“). In that view I search for ‘monitor’ commands or others which are sent by the client to the server:

monitor commands in gdb traces

monitor commands in gdb traces

That way I can see in a transparent way what is going on. There are these small and tiny things which make debugging more transparent for me 🙂

Happy Inspecting 🙂

1 thought on “Eclipse and GDB: Process Properties, Arguments and GDB Traces

  1. Once these details known, it is easier to understand how the debugging plug-ins work. There is no magic here, the fields in the ‘J-Link GDB Server Startup’ are concatenated to make the command line used to launch the GDB server, the fields in ‘GDB Client Setup‘ are concatenated to make the command line used to launch the GDB client, and the fields in the ‘Startup’ tab are passed as commands to the GDB client, some of them being forwarded to the server (those prefixed with ‘monitor‘).

    If something goes wrong, inspecting the command line and the GDB trace output gives full details on how the session was started. For extreme cases, when J-Link is suspected for bugs, the J-Link log file can be enabled, and the entire dialog between the GDB server and the J-Link is available and can be sent to SEGGER together with the bug report.

    Like

What do you think?

This site uses Akismet to reduce spam. Learn how your comment data is processed.