Changes between Version 9 and Version 10 of Tools/Gdb Server


Ignore:
Timestamp:
Feb 4, 2009, 8:59:33 PM (15 years ago)
Author:
becoulet
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Tools/Gdb Server

    v9 v10  
    8080 ''Note that you can avoid to type this command every time: you just have to copy it in a `.gdbinit` file (in the same repertory from where you are lauching gdb).''
    8181
     82=== Processor state analysis ===
     83
    8284The processors are now frozen. Each processor is seen as a thread by the GDB client:
    8385
     
    9092* 1 Thread 1 (Processor mips_iss0)  0xe010cef4 in cpu_atomic_bit_waitset (a=0x602002cc, n=<error type>)
    9193    at /home/diaxen/projets/mutekh/cpu/mips/include/cpu/hexo/atomic.h:99
     94}}}
     95
     96The first processor has thread id 1. A specific processor can be selected for registers examination with the `thread` command.
     97
     98''Note this does change processor used for single step execution though. (see advanced commands sections)''
     99
     100{{{
     101(gdb) thread 1
     102[Switching to thread 1 (Thread 1)]#0  0x6011d370 in sched_context_stop_unlock ()
    92103}}}
    93104
     
    110121}}}
    111122
     123=== Running code ===
     124
     125The following rules apply:
     126
     127 * All the managed processors are frozen at the same time when the gdb client prompt is displayed.
     128 * When using the `continue` command, all processors resume at the same time.
     129 * Single step execution is '''only''' performed on the processor which was interrupted. User selection of a different processor for data examination with the `thread` command does '''not''' change this. (see advanced commands section below)
     130
     131=== Advanced commands ===
     132
     133The 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:
     134
     135 * The processor (thread id) used for step by step execution may be forced for the next '''single step''' operation:
     136{{{(gdb) monitor stepcpu 1}}}
     137 * The GdbServer may be instructed to break on processor exception or to let the processor jump in its exception handler transparently. When used with an extra parameter, this setting can apply to a single processor instead of all. The following command enable exception catching for thread id 2 (processor 1):
     138{{{(gdb) monitor except 1 2}}}
     139 * The gdb protocol debug mode may enabled to dump interaction between client and server:
     140{{{(gdb) monitor debug 1}}}
     141
    112142More informations on using the GDB client can be found on the [http://sourceware.org/gdb/ The GNU Project Debugger] home page.
     143