summaryrefslogtreecommitdiffstats
path: root/doc/rtems_gdb/started.t
blob: c8b4bad3e9e5908bcc92c1b42b8c9633a5c622b5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
@c
@c  COPYRIGHT (c) 1988-2002.
@c  On-Line Applications Research Corporation (OAR).
@c  All rights reserved.
@c
@c  $Id$
@c


@chapter Getting Started

This section describes the steps which are necessary to set up a
debugging session with RTEMS/GDB.


@section Compiling The System Components

The components that need to be debugged have to be compiled with the -g option
in order the generated file to contain the required information for the debug
session.


@section Starting a debugging session

After having launched GDB, the user must connect to the RTEMS target with the
following commands:

@example
(gdb) setrpcmode sun
(gdb) setdaemontype rdbg
(gdb) target rtems target-name
@end example

Then he can use the file GDB command to specify the binary to be debugged.

This initialization phase can be written in a @code{``.gdbinit''}
file. Each time, the user will launch GDB, it will execute this initialization
sequence.


@section Attaching To The System

The entire target system is viewed as a single multi-threaded process,
the identifier of which is 1. To attach, use:

@example
(gdb) attach 1
@end example

When successfully attached, the user can control the execution of
the target system from the debugger.