RETOUR MOT_VERS TITRE_DOC_KERNEL
Gdb debugging using BDI device
See also :
Do not configure KGDB support into the kernel along with BDI support, theses are mutually exclusive !
If that is right so far, let's proceed. First, get ready with a three terminals displays on your screen, one with minicom (target view), second with your telnet session to access BDI-monitor (monitor view), third with GDB debugging session (gdb view). Second when your minicom will be set, check you're linked up with BDI device (Here BDI is at 192.168.0.225), and check-stop your target :$telnet 192.168.0.225
Trying 192.168.0.225...
Connected to 192.168.0.225.
Escape character is '^]'.
BDI Debugger for Embedded PowerPC
=================================
[...]
Elite>reset halt
- TARGET: processing user reset request
- BDI asserts HRESET
- Reset JTAG controller passed
- Bypass check: 0x00000001 => 0x00000001
- JTAG exists check passed
- COP status is 0x01
- Check running state passed
- BDI scans COP freeze command
- BDI removes HRESET
- Target PVR is 0x80822014
- Target SVR is 0x00000000
- COP status is 0x05
- Check stopped state passed
- Check LSRL length passed
- BDI sets breakpoint at 0xFFF00100
- BDI resumes program execution
- Waiting for target stop passed
- TARGET: Target PVR is 0x80822014
- TARGET: resetting target passed
- TARGET: processing target startup ....
- TARGET: processing target startup passed
Elite>
$ ${CROSS_COMPILE}gdb
GNU gdb 6.0 (MontaVista 6.0-8.0.4.0300532 2003-12-24)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=powerpc-hardhat-linux".
(gdb)
If you experience problems to break at a precise location, try to lower number of breakpoint, try to
specify mon break hard.
Remember don't specify new breakpoints when running, also
usually don't break on function, variables, macros declarations.
$insmod -m serial_cs >serial_cs.map
$grep .text serial_cs.map
.text 00001a54 c3116060 2**2
c3116060 T __insmod_serial_cs_S.text_L6740
c3116060 t .text
$
(gdb) file linux-2.4.20_mvl31/vmlinux
Reading symbols from linux-2.4.20_mvl31/vmlinux...done.
(gdb) add-symbol-file solutions/pcmcia-cs-3.2.8/clients/serial_cs.o 0xc3116060
add symbol table from file "solutions/pcmcia-cs-3.2.8/clients/serial_cs.o" at
.text_addr = 0xc3116060
(y or n) y
Reading symbols from solutions/pcmcia-cs-3.2.8/clients/serial_cs.o...done.
bi 0xc0005eb4
reset run
target remote 192.168.0.225:2001
continue
cat serial_cs.map | grep config
c3124f80 t multi_config
c312486c t simple_config
c31243b0 t serial_config
b simple_config
Breakpoint 2 at 0xc312486c