summaryrefslogtreecommitdiffstats
path: root/doc/started/gdb.t
blob: dfcc4558fc0ba7097ebbb22d805ac4da1fe65065 (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
@c
@c  COPYRIGHT (c) 1988-1998.
@c  On-Line Applications Research Corporation (OAR).
@c  All rights reserved.
@c
@c  $Id$
@c

@chapter Building the GNU Debugger

GDB is not currently RTEMS aware. The following configurations have been
successfully used with RTEMS applications. 

@section GDB with Sparc Instruction Simulation (SIS)

@subsection Unarchive the gdb distribution (SIS)

Use the following commands to unarchive the gdb distribution:

@example
cd tools
tar xzf ../arc/gdb-980122.tar.gz
@end example

The directory gdb-980122 is created under the tools directory.

@subsection Make the build directory (SIS)

Create a build directory for the SIS Debugger

@example
cd tools
mkdir build-sis
@end example

@subsection Configure for the build (SIS)

Configure the general gdb distribution for Sparc Instruction Simulation

@example
cd tools/build-sis
../gdb-980122/configure --target-sparc-erc32-aout \
--program-prefix=sparc-rtems- \
--disable-gdbtk \
--with-targets=all \
--prefix=<INSTALL_POINT_FOR_SIS>
@end example

Where:

<INSTALL_POINT_FOR_SIS> is a unique location where the gdb with SIS will be
created. 

@subsection Make the debugger (SIS)

From tools/build-sis run:

@example
gmake
@end example


@section GDB with PowerPC Instruction Simulator (PSIM)

@subsection Unarchive the gdb distribution (PSIM)

Use the following commands to unarchive the gdb distribution:

@example
cd tools
tar xzf ../arc/gdb-980122.tar.gz
@end example

The directory gdb-980122 is created under the tools directory.


@subsection Make the build directory (PSIM)

Create a build directory for the SIS Debugger

@example
cd tools
mkdir build-ppc
@end example

@subsection Configure for the build

Configure the general gdb distribution for PowerPC Instruction Simulation

@example
cd tools/build-ppc
../gdb-980122/configure --host=i486-linux \
      --target=powerpc-unknown-eabi \
      --program-prefix=powerpc-rtems- \
      --enable-sim-powerpc \
      --enable-sim-timebase \
      --enable-sim-inline \
      --enable-sim-hardware \
--prefix=<INSTALL_POINT_FOR_PPC>
@end example

Where:

<INSTALL_POINT_FOR_PPC> is a unique location where the gdb with PSIM will
be created. 


@subsection Make the debugger (PSIM)

From tools/build-ppc run:

@example
gmake
@end example


@section GDB with Dink32

@subsection Unarchive the gdb distribution (DINK32)

Use the following commands to unarchive the gdb distribution:

@example
cd tools
tar xzf ../arc/gdb-980122.tar.gz
@end example

The directory gdb-980122 is created under the tools directory.


@subsection Make the build directory (DINK32)

Create a build directory for the DINK32 Debugger

@example
cd tools
mkdir build-dink32
@end example

@subsection Replace dink32-rom.c

Obtain a valid copy of dink32-rom.c from RTEMS site.

Replace the copy of dink32-rom.c that came with the gdb-980122
distribution. It is located in:

@example
tools/gdb-980122/gdb/dink32-rom.c
@end example


@subsection Configure for the build (DINK32)

Configure the general gdb distribution for Sparc Instruction Simulation

@example
cd tools/build-dink32
../gdb-980122/configure --target-powerpc-elf \
--program-prefix=powerpc-rtems- \
--prefix=<INSTALL_POINT_FOR_DINK32>
--with-targets=all \
@end example

Where:

<INSTALL_POINT_FOR_DINK32> is a unique location where the gdb Dink32 will
be created. 

@subsection Make the debugger (DINK32)

From tools/build-dink32 run:

@example
gmake
@end example