summaryrefslogtreecommitdiffstats
path: root/doc/rtems_gdb/started.t
blob: e2b80b6c368610b24a7682b9f505febc1e262746 (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
54
55
56
57
@c
@c  COPYRIGHT (c) 1988-1998.
@c  On-Line Applications Research Corporation (OAR).
@c  All rights reserved.
@c
@c  $Id$
@c


@section Getting Started

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


@subsection 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.


@subsection 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.


@subsection 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.