Changes between Version 25 and Version 26 of Tools/Gdb Server


Ignore:
Timestamp:
Mar 29, 2010, 2:09:29 AM (14 years ago)
Author:
becoulet
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Tools/Gdb Server

    v25 v26  
    77
    88The !GdbServer is able to manage all processors in a !SoCLib platform. It listens for TCP connection from [http://www.gnu.org/software/gdb/ Gnu GDB] clients. Once connected, clients can be used to freeze, run, step every processor in the platform, add breakpoints, catch exceptions and dump registers and memory content.
     9
     10The !GdbServer is not the only software debugger tool available for SoCLib. The [wiki:Tools/MemoryChecker Memory checker tool] can be of some help to track bugs too.
    911
    1012== Implementation ==
     
    133135 * The `S` flag can be added to the `SOCLIB_GDB` environment variable to pause the simulation waiting for connection when an exception is catched.
    134136
    135 === Advanced commands ===
     137=== Advanced use ===
    136138
    137139The gdb client offers a easy way to send server specific data though the `monitor` command. Our GdbServer takes advantages of the `monitor` command to provide useful advanced features:
     
    184186 It can be view as the counterpart of the command {{{add-symbol-file}}} except it is done on server side (and the "load address" can not be specified, the file is loaded according to its internal information, e.g. LMA/VMA)
    185187
    186 === Flags memo ===
     188 * Cycle breakpoints can be used to instruct the `GdbServer` to stop the simulation at a given cycle number. This enables taking advantage of the fact that SoCLib simulations always yield the same result when executed multiple times. This allows starting a simulation again with a cycle break point to examine the simulator state just before a chosen point is reached or particular event happens. Cycle counts are reported when using the call trace feature for instance. The `SOCLIB_GDB_CYCLEBP` environment variable must be set to the breaking cycle number to define a cycle break point.
     189
     190=== Flags summary ===
    187191The following flags can be concatenated in the `SOCLIB_GDB` environment variable (eg, {{{$ export SOCLIB_GDB=SZ}}})
    188192 * '''F''': start the simulation in a frozen state so it can be attached with a gdb client
     
    190194 * '''S''': make the simulation stop and wait for a gdb attachment whenever an exception is caught
    191195 * '''C''': dump a trace of every inter-functions branch
     196 * '''T''': exit the simulator on trap exception
    192197 * '''Z''': same as '''C''' but display only function's entrypoint
    193198 * '''W''': disable automatic break whenever a watchpoint is hit, just report it on stderr (the watchpoints are to be defined in SOCLIB_GDB_WATCH)