[#5564] kgdb test over extended uart can't stop at breakproint

Document created by Aaronwu Employee on Sep 4, 2013
Version 1Show Document
  • View in full screen mode

[#5564] kgdb test over extended uart can't stop at breakproint

Submitted By: Mingquan Pan

Open Date

2009-09-27 05:41:33     Close Date

2009-11-18 03:47:24

Priority:

Medium     Assignee:

Sonic Zhang

Status:

Closed     Fixed In Release:

N/A

Found In Release:

2010R1     Release:

Category:

N/A     Board:

N/A

Processor:

BF527     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Not reproducible

Uboot version or rev.:

    Toolchain version or rev.:

09r1-rc9

App binary format:

N/A     

Summary: kgdb test over extended uart can't stop at breakproint

Details:

 

kgdb test over extended uart can't stop at breakproint on bf527-ezkit.

 

bfin> bootm

## Booting kernel from Legacy Image at 02000000 ...

   Image Name:   bf527-2.6.31-ADI-2010R1-pre-svn7

   Created:      2009-09-26  20:33:26 UTC

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    4652072 Bytes =  4.4 MB

   Load Address: 00001000

   Entry Point:  001eaacc

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 001eaacc

console [ttyBF1] enabled, bootconsole disabled

Calibrating delay loop... 1046.52 BogoMIPS (lpj=2093056)

Security Framework initialized

Mount-cache hash table entries: 512

Blackfin Scratchpad data SRAM: 4 KB

Blackfin L1 Data A SRAM: 16 KB (15 KB free)

Blackfin L1 Data B SRAM: 16 KB (16 KB free)

Blackfin L1 Instruction SRAM: 48 KB (42 KB free)

NET: Registered protocol family 16

Blackfin DMA Controller

ezkit_init(): registering device resources

bio: create slab <bio-0> at 0

SCSI subsystem initialized

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

musb_hdrc: version 6.0, musb-dma, host, debug=0

musb_hdrc: USB Host mode controller at ffc03800 using DMA, IRQ 59

musb_hdrc musb_hdrc.0: MUSB HDRC host driver

musb_hdrc musb_hdrc.0: new USB bus registered, assigned bus number 1

usb usb1: configuration #1 chosen from 1 choice

hub 1-0:1.0: USB hub found

dma_alloc_init: dma_page @ 0x0209a000 - 256 pages at 0x03f00000

hub 1-0:1.0: 1 port detected

NET: Registered protocol family 2

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

TCP established hash table entries: 2048 (order: 2, 16384 bytes)

TCP bind hash table entries: 2048 (order: 1, 8192 bytes)

TCP: Hash tables configured (established 2048 bind 2048)

TCP reno registered

NET: Registered protocol family 1

msgmni has been set to 107

io scheduler noop registered

io scheduler anticipatory registered (default)

io scheduler cfq registered

bfin-t350mcqb: 320x240 24-bit RGB FrameBuffer initializing...

bfin-otp: initialized

Serial: Blackfin serial driver

bfin-uart.0: ttyBF0 at MMIO 0x0 (irq = 29) is a BFIN-UART

bfin-uart.1: ttyBF1 at MMIO 0x0 (irq = 31) is a BFIN-UART

kgdb: Registered I/O driver kgdboc.

brd: module loaded

bfin_mii_bus: probed

bfin_mac: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:03, irq=-1, mdc_clk=2500000Hz(mdc_div=25)@sclk=131MHz)

bfin_mac bfin_mac.0: Blackfin on-chip Ethernet MAC driver, Version 1.1

m25p80 spi0.1: m25p16 (2048 Kbytes)

Creating 2 MTD partitions on "m25p80":

0x000000000000-0x000000040000 : "bootloader(spi)"

0x000000040000-0x000000200000 : "linux kernel(spi)"

bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@7

Initializing USB Mass Storage driver...

usbcore: registered new interface driver usb-storage

USB Mass Storage support registered.

rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0

usbcore: registered new interface driver usbhid

usbhid: v2.6:USB HID core driver

TCP cubic registered

NET: Registered protocol family 17

rtc-bfin rtc-bfin: setting system clock to 1970-01-04 14:10:30 UTC (310230)

Freeing unused kernel memory: 7196k freed

                           _____________________________________

        a8888b.           / Welcome to the uClinux distribution \

       d888888b.         /       _     _                         \

       8P"YP"Y88        /       | |   |_|            __  __ (TM)  |

       8|o||o|88  _____/        | |    _ ____  _   _ \ \/ /       |

       8'    .88       \        | |   | |  _ \| | | | \  /        |

       8`._.' Y8.       \       | |__ | | | | | |_| | /  \        |

      d/      `8b.       \      \____||_|_| |_|\____|/_/\_\       |

     dP   .    Y8b.       \   For embedded processors including   |

    d8:'  "  `::88b        \    the Analog Devices Blackfin      /

   d8"         'Y88b        \___________________________________/

  :8P    '      :888

   8a.   :     _a88P         For further information, check out:

._/"Yaa_:   .| 88P|            - http://blackfin.uclinux.org/

\    YP"    `| 8P  `.          - http://docs.blackfin.uclinux.org/

/     \.___.d|    .'           - http://www.uclinux.org/

`--..__)8888P`._.'  jgs/a:f    - http://www.analog.com/blackfin

 

Have a lot of fun...

 

 

BusyBox v1.15.1 (2009-09-27 04:31:08 CST) hush - the humble shell

 

root:/> SysRq : DEBUG

Entering KGDB

ttyBF1: 1 input overrun(s)

 

root:/>

root:/>

root:/> cat /proc/kgdbtest

kgdb name(12): hello world!, 85, 16

L1(before change) : data variable addr = 0xff800000, data value is 0

L1 : code function addr = 0xffa00430

L1(after change) : data variable addr = 0xff800000, data value is 10

root:/>

root:/>

root:/> init: /bin/watchdogd respawning too fast

init: /bin/watchdogd respawning too fast

init: /bin/watchdogd respawning too fast

init: /bin/watchdogd respawning too fast

 

root:/>

root:/> cat /proc/kgdbtest

kgdb name(12): hello world!, 85, 16

L1(before change) : data variable addr = 0xff800000, data value is 10

L1 : code function addr = 0xffa00430

L1(after change) : data variable addr = 0xff800000, data value is 20

root:/>

root:/>

 

On host:

test@linux-nand:~/work/cruise/checkouts/uclinux-dist/testsuites> bfin-uclinux-gdb /tftpboot/vmlinux

GNU gdb 6.6

Copyright (C) 2006 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=bfin-uclinux"...

(gdb) set remotebaud 57600

(gdb) target remote /dev/ttyUSB0

Remote debugging using /dev/ttyUSB0

0x0002dcca in kgdb_ebin2mem (buf=0x1cdc50 "\002", mem=0x1 <Address 0x1 out of bounds>, count=43121664) at kernel/kgdb.c:407

407                     if (err)

(gdb) break kgdb_test

Breakpoint 1 at 0x8dc0: file arch/blackfin/kernel/kgdb_test.c, line 58.

(gdb) c

Continuing.

 

The bootargs set for the kernel is:

Default bootloader kernel arguments (CMDLINE_BOOL) [N/y] Y^M

  Initial kernel command string (CMDLINE) [console=ttyBF0,57600] (NEW) console=ttyBF1,57600 kgdboc=ttyBF0,57600n8

 

Follow-ups

 

--- Mingquan Pan                                             2009-10-16 06:30:40

With the image of Oct 14, when kgdb through uart on bf527 ezkit 0.2 , it even

stucks when connect to target board at :

 

target remote /dev/ttyUSB0

Remote debugging using /dev/ttyUSB0

 

--- Sonic Zhang                                              2009-11-11 22:56:07

Can't replicate with kernel config provided by Grace and kernel rev. 7784 built

by svn trunk gcc 4.1.

 

......

Case 51 ...PASS

(gdb) c

Continuing.

L2(after change) : data variable addr = 0xfeb00084, data value is 120

root:/> [New Thread -2]

 

Program received signal SIGTRAP, Trace/breakpoint trap.

[Switching to Thread -2]

 

Case 53 ...PASS

kgdb_breakpoint () at kernel/kgdb.c:1779

1779            atomic_set(&kgdb_setting_breakpoint, 0);

(gdb) detach

Ending remote debugging.

 

Case 54 ...PASS

(gdb)

root:/>

Case 55 ...PASS

Ending ./kgdb_test.exp

 

--- Mingquan Pan                                             2009-11-18 03:47:24

Yes, it looks good on trunk kernel head now. And the part of target remote is

updated:

 

set remotebaud 57600^M

(gdb)

Case 2 ...PASS

 

Case 2 ...PASS

target remote /dev/ttyUSB0^M

Remote debugging using /dev/ttyUSB0^M

sysrq_handle_gdb (key=<value optimized out>, tty=0x3f) at

kernel/kgdb.c:1779^M

 

Case 2 ...PASS

 

Case 2 ...PASS

1779            atomic_set(&kgdb_setting_breakpoint, 0);^M

(gdb) break kgdb_test^M

Breakpoint 1 at 0x8866: file arch/blackfin/kernel/kgdb_test.c, line 57.^M

 

Case 3 ...PASS

 

Case 3 ...PASS

(gdb) c^M

 

Close.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes