Lines Matching refs:the
7 port. This permits GDB to single step through the kernel, set breakpoints and
9 permits the NMI interrupt button or serial port events to jump the kernel into
10 the debugger.
12 On the CPUs that have on-chip UARTs (FR400, FR403, FR405, FR555), the
14 generate level 15 interrupts (NMI). The kernel proper cannot see the serial
17 On the MB93091-VDK CPU boards, the GDB stub uses UART1, which would otherwise
18 be /dev/ttyS1. On the MB93093-PDK, the GDB stub uses UART0. Therefore, on the
19 PDK there is no externally accessible serial port and the serial port to
20 which the touch screen is attached becomes /dev/ttyS0.
22 Note that the GDB stub runs entirely within CPU debug mode, and so should not
24 that the clock will lose time since it is implemented in software.
31 Firstly, a debuggable kernel must be built. To do this, unpack the kernel tree
32 and copy the configuration that you wish to use to .config. Then reconfigure
33 the following things on the "Kernel Hacking" tab:
42 Set this to "Y". This causes the GDB stub to be compiled into the
47 Set this to "Y" if you want the GDB stub to activate as soon as possible
49 the beginning of start_kernel() in init/main.c.
53 Set this to "Y" if you wish to be able to use "console=gdb0" on the
54 command line. That tells the kernel to pass system console messages to
56 debugging the serial drivers that'd otherwise be used to pass console
57 messages to the outside world.
59 Then build as usual, download to the board and execute. Note that if
60 "Immediate activation" was selected, then the kernel will wait for GDB to
61 attach. If not, then the kernel will boot immediately and GDB will have to
63 the kernel.
70 Set the serial port on the computer that's going to run GDB to the appropriate
71 baud rate. Assuming the board's debug port is connected to ttyS0/COM1 on the
72 computer doing the debugging:
76 Then start GDB in the base of the kernel tree:
84 When the prompt appears:
88 GDB is free software, covered by the GNU General Public License, and you are
90 Type "show copying" to see the conditions.
95 Attach to the board like this:
102 This should show the appropriate lines from the source too. The kernel can
110 The kernel can be interrupted whilst it is running, causing a jump back to the
111 GDB stub and the debugger:
113 (*) Pressing Ctrl-C in GDB. This will cause GDB to try and interrupt the
114 kernel by sending an RS232 BREAK over the serial line to the GDB
115 stub. This will (mostly) immediately interrupt the kernel and return it
116 to the debugger.
118 (*) Pressing the NMI button on the board will also cause a jump into the
121 (*) Setting a software breakpoint. This sets a break instruction at the
122 desired location which the GDB stub then traps the exception for.
124 (*) Setting a hardware breakpoint. The GDB stub is capable of using the IBAR
127 Furthermore, the GDB stub will intercept a number of exceptions automatically