Changes between Version 25 and Version 26 of Tools/Gdb Server
- Timestamp:
- Mar 29, 2010, 2:09:29 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Tools/Gdb Server
v25 v26 7 7 8 8 The !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 10 The !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. 9 11 10 12 == Implementation == … … 133 135 * The `S` flag can be added to the `SOCLIB_GDB` environment variable to pause the simulation waiting for connection when an exception is catched. 134 136 135 === Advanced commands===137 === Advanced use === 136 138 137 139 The 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: … … 184 186 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) 185 187 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 === 187 191 The following flags can be concatenated in the `SOCLIB_GDB` environment variable (eg, {{{$ export SOCLIB_GDB=SZ}}}) 188 192 * '''F''': start the simulation in a frozen state so it can be attached with a gdb client … … 190 194 * '''S''': make the simulation stop and wait for a gdb attachment whenever an exception is caught 191 195 * '''C''': dump a trace of every inter-functions branch 196 * '''T''': exit the simulator on trap exception 192 197 * '''Z''': same as '''C''' but display only function's entrypoint 193 198 * '''W''': disable automatic break whenever a watchpoint is hit, just report it on stderr (the watchpoints are to be defined in SOCLIB_GDB_WATCH)