OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [i386/] [shared/] [comm/] [GDB.HOWTO] - Blame information for rev 773

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
1. Add GDB initilization to your target's code:
2
 
3
a) include file:
4
 
5
#include 
6
 
7
b) declare this variable:
8
 
9
extern int BSPConsolePort;
10
 
11
c) To start-up GDB, run this:
12
 
13
 /* Init GDB glue  */
14
 
15
  if(BSPConsolePort != BSP_UART_COM2)
16
    {
17
      /*
18
       * If com2 is not used as console use it for
19
       * debugging
20
       */
21
      i386_stub_glue_init(BSP_UART_COM2);
22
    }
23
  else
24
    {
25
      /* Otherwise use com1 */
26
      i386_stub_glue_init(BSP_UART_COM1);
27
    }
28
 
29
  /* Init GDB stub itself */
30
  set_debug_traps();
31
 
32
  /*
33
   * Init GDB break in capability,
34
   * has to be called after
35
   * set_debug_traps
36
   */
37
  i386_stub_glue_init_breakin();
38
 
39
  /* Put breakpoint in */
40
  breakpoint();
41
 
42
d) This is all you need to do for the target.
43
 
44
2. Edit cmds: specify path to current directory and device used for debugging
45
   example of cmds is attached below.  Make sure your paths are correct.
46
3. type 'make'
47
4. Boot o-pc386/.exe on target computer, where  has the code from step 1. ( I modified and recompiled base_sp as the  )
48
5. run 'i396-rtems-gdb --nx --command=./cmds o-pc386/.coff
49
 
50
=========================== example cmds ==============================
51
dir /home/cross-19980908/tools/rtems-980923
52
dir /home/cross-19980908/tools/rtems-980923/aclocal
53
dir /home/cross-19980908/tools/rtems-980923/c
54
dir /home/cross-19980908/tools/rtems-980923/c/build-tools
55
dir /home/cross-19980908/tools/rtems-980923/c/build-tools/os
56
dir /home/cross-19980908/tools/rtems-980923/c/build-tools/os/msdos
57
dir /home/cross-19980908/tools/rtems-980923/c/build-tools/scripts
58
dir /home/cross-19980908/tools/rtems-980923/c/build-tools/src
59
dir /home/cross-19980908/tools/rtems-980923/c/src
60
dir /home/cross-19980908/tools/rtems-980923/c/src/exec
61
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/posix
62
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/posix/base
63
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/posix/headers
64
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/posix/inline
65
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/posix/macros
66
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/posix/optman
67
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/posix/src
68
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/posix/sys
69
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/sapi
70
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/sapi/headers
71
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/sapi/src
72
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/sapi/inline
73
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/sapi/macros
74
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/sapi/optman
75
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/rtems
76
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/rtems/headers
77
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/rtems/src
78
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/rtems/inline
79
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/rtems/macros
80
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/rtems/optman
81
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score
82
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/cpu
83
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/cpu/a29k
84
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/cpu/hppa1.1
85
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/cpu/i386
86
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/cpu/i960
87
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/cpu/m68k
88
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/cpu/mips64orion
89
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/cpu/no_cpu
90
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/cpu/powerpc
91
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/cpu/sh
92
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/cpu/sparc
93
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/cpu/unix
94
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/headers
95
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/inline
96
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/macros
97
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/src
98
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/tools
99
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/tools/generic
100
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/tools/unix
101
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/score/tools/hppa1.1
102
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/wrapup
103
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/wrapup/posix
104
dir /home/cross-19980908/tools/rtems-980923/c/src/exec/wrapup/rtems
105
dir /home/cross-19980908/tools/rtems-980923/c/src/lib
106
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/include
107
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/include/motorola
108
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/include/rtems++
109
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/include/sys
110
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/include/zilog
111
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libc
112
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libbsp
113
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libbsp/i386
114
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libbsp/i386/pc386
115
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libbsp/i386/pc386/clock
116
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libbsp/i386/pc386/console
117
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libbsp/i386/pc386/include
118
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libbsp/i386/pc386/start
119
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libbsp/i386/pc386/startup
120
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libbsp/i386/pc386/timer
121
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libbsp/i386/pc386/tools
122
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libbsp/i386/pc386/wrapup
123
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libbsp/i386/shared/comm
124
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libbsp/i386/shared/pci
125
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu
126
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/hppa1.1
127
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/hppa1.1/clock
128
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/hppa1.1/include
129
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/hppa1.1/milli
130
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/hppa1.1/runway
131
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/hppa1.1/semaphore
132
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/hppa1.1/timer
133
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/m68k
134
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/m68k/m68040
135
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/m68k/m68040/fpsp
136
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/mips64orion
137
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/mips64orion/clock
138
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/mips64orion/include
139
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/mips64orion/timer
140
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/powerpc
141
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/powerpc/ppc403
142
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/powerpc/ppc403/clock
143
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/powerpc/ppc403/console
144
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/powerpc/ppc403/include
145
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/powerpc/ppc403/timer
146
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/powerpc/ppc403/vectors
147
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/sh
148
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/sh/sh7032
149
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/sh/sh7032/clock
150
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/sh/sh7032/null
151
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/sh/sh7032/console
152
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/sh/sh7032/include
153
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/sh/sh7032/timer
154
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/sparc
155
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libcpu/sparc/reg_win
156
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libnetworking
157
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libmisc
158
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libmisc/assoc
159
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libmisc/cpuuse
160
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libmisc/error
161
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libmisc/monitor
162
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libmisc/rtmonuse
163
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libmisc/stackchk
164
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/libmisc/wrapup
165
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/librtems++
166
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/start
167
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/start/a29k
168
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/start/i960
169
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/start/m68k
170
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/start/mips64orion
171
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/start/sh
172
dir /home/cross-19980908/tools/rtems-980923/c/src/lib/wrapup
173
dir /home/cross-19980908/tools/rtems-980923/c/src/tests
174
dir /home/cross-19980908/tools/rtems-980923/c/src/tests/samples
175
dir /home/cross-19980908/tools/rtems-980923/c/src/tests/samples/base_sp
176
set remotebaud 38400
177
target remote /dev/ttyS1

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.