FAQ: [#6341] kgdb test fail for xenomai kernel(2010)

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

[#6341] kgdb test fail for xenomai kernel

Submitted By: Vivi Li

Open Date

2010-11-15 22:13:41     Close Date

2010-11-19 02:42:38

Priority:

Medium     Assignee:

Sonic Zhang

Status:

Closed     Fixed In Release:

N/A

Found In Release:

2010R1     Release:

Category:

N/A     Board:

N/A

Processor:

BF537     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Fixed

Uboot version or rev.:

    Toolchain version or rev.:

2010r1-rc4

App binary format:

N/A     

Summary: kgdb test fail for xenomai kernel

Details:

 

kgdb test fail for xenomai kernel in trunk and branch.

 

--

Starting Kernel at = 00201834

console [ttyBF0] enabled, bootconsole disabled

Calibrating delay loop... 991.23 BogoMIPS (lpj=1982464)

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 (34 KB free)

NET: Registered protocol family 16

Blackfin DMA Controller

stamp_init(): registering device resources

bio: create slab <bio-0> at 0

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

Switching to clocksource bfin_cs_cycles

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

UDP hash table entries: 256 (order: 0, 4096 bytes)

UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)

NET: Registered protocol family 1

I-pipe: Domain Xenomai registered.

Xenomai: hal/blackfin started.

Xenomai: scheduling class idle registered.

Xenomai: scheduling class rt registered.

Xenomai: real-time nucleus v2.5.3 (Hordes Of Locusts) loaded.

Xenomai: starting native API services.

Xenomai: starting POSIX services.

Xenomai: starting RTDM services.

msgmni has been set to 93

io scheduler noop registered

io scheduler cfq registered (default)

bfin-uart: Blackfin serial driver

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

brd: module loaded

bfin_mii_bus: probed

bfin_mac: attached PHY driver [SMSC LAN83C185] (mii_bus:phy_addr=0:01, irq=-1, mdc_clk=2500000Hz(mdc_div=24)@sclk=125MHz)

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

console [netcon0] enabled

netconsole: network logging started

kgdboe: local port 6443

kgdboe: local IP 10.100.4.50

kgdboe: interface 'eth0'

kgdboe: remote port 6442

kgdboe: remote IP 10.100.4.174

kgdboe: remote ethernet address ff:ff:ff:ff:ff:ff

kgdboe: device eth0 not up yet, forcing it

kgdboe: carrier detect appears untrustworthy, waiting 4 seconds

PHY: 0:01 - Link is Up - 100/Full

kgdb: Registered I/O driver kgdboe.

kgdboe: debugging over ethernet enabled

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

TCP cubic registered

NET: Registered protocol family 17

rtc-bfin rtc-bfin: setting system clock to 1972-09-13 10:29:41 UTC (85228181)

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

Freeing unused kernel memory: 7116k 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.16.2 (2010-11-09 22:44:56 GMT-8) hush - the humble shell

 

root:/> ^[[6nversion

kernel:    Linux release 2.6.34.7-ADI-2010R1-svn9479, build #4 Wed Nov 10 05:33:23 GMT-8 2010

toolchain: bfin-uclinux-gcc release gcc version 4.3.5 (ADI-2010R1-RC4)

user-dist: release svn-9913, build #9 Wed Nov 10 05:31:47 GMT-8 2010

root:/> ^[[6nsuccessful boot attempt

************** STEP 3: Start KGDB TEST (ethernet)

 

ifconfig eth0 10.100.4.50

root:/> ^[[6nspawn bfin-uclinux-gdb /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/vmlinux

^[[?1034hGNU 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)

Case 1 ...PASS

 

Case 1 ...PASS

target remote udp:10.100.4.50:6443

warning: The remote protocol may be unreliable over UDP.

Some events may be lost, rendering further debugging impossible.

Remote debugging using udp:10.100.4.50:6443

 

Case 2 ...PASS

 

Case 2 ...PASS

kgdb_breakpoint ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/irqflags.h:29

29              asm volatile("cli %0;" : "=d" (flags));

(gdb) break kgdb_test

Breakpoint 1 at 0x84da: file arch/blackfin/kernel/kgdb_test.c, line 56.

 

Case 3 ...PASS

 

Case 3 ...PASS

(gdb) c

Continuing.

 

Case 4 ...PASS

 

Case 4 ...PASS

 

root:/> ^[[6n[New Thread 214]

[Switching to Thread 214]

 

Breakpoint 1, kgdb_test (name=0x14cdd0 "hello world!", len=12, count=85, z=16)

    at arch/blackfin/kernel/kgdb_test.c:56

56              pr_alert("kgdb name(%d): %s, %d, %d\n", len, name, count, z);

 

Case 5 ...PASS

 

Case 5 ...PASS

(gdb) hbreak 58

Hardware assisted breakpoint 2 at 0x8500: file arch/blackfin/kernel/kgdb_test.c, line 58.

(gdb)

Case 6 ...PASS

 

Case 6 ...PASS

info b

Num Type           Disp Enb Address    What

1   breakpoint     keep y   0x000084da in kgdb_test

                                       at arch/blackfin/kernel/kgdb_test.c:56

        breakpoint already hit 1 time

2   hw breakpoint  keep y   0x00008500 in kgdb_test

                                       at arch/blackfin/kernel/kgdb_test.c:58

 

Case 7 ...PASS

 

Case 7 ...PASS

(gdb) list

51      #endif

52

53

54      int kgdb_test(char *name, int len, int count, int z)

55      {

56              pr_alert("kgdb name(%d): %s, %d, %d\n", len, name, count, z);

57              count = z;

58              return count;

59      }

60

(gdb)

Case 8 ...PASS

 

Case 8 ...PASS

bt

#0  kgdb_test (name=0x14cdd0 "hello world!", len=12, count=85, z=16)

    at arch/blackfin/kernel/kgdb_test.c:56

 

Case 9 ...PASS

 

Case 9 ...PASS

#1  0x00008530 in kgdb_test_proc_read (file=0x2085d20, buf=0x2c69e80 "",

    count=4096, ppos=0x2b51eec) at arch/blackfin/kernel/kgdb_test.c:65

#2  0x000a0b30 in proc_reg_read (file=0x2085d20,

    buf=0xc <Address 0xc out of bounds>, count=85, ppos=0x2b51eec)

    at fs/proc/inode.c:163

#3  0x000767d2 in vfs_read (file=0x2085d20, buf=0x2c69e80 "",

    count=<value optimized out>, pos=0x2b51eec) at fs/read_write.c:293

#4  0x000768f8 in sys_read (fd=<value optimized out>, buf=0x2c69e80 "",

    count=4096) at fs/read_write.c:383

#5  0xffa00a64 in system_call () at include/linux/thread_info.h:86

(gdb) c

Continuing.

 

Breakpoint 1, kgdb_test (name=0x14cdd0 "hello world!", len=12, count=85, z=16)

    at arch/blackfin/kernel/kgdb_test.c:56

56              pr_alert("kgdb name(%d): %s, %d, %d\n", len, name, count, z);

(gdb) spawn /bin/sh

^[[?1034huclinux82-537-adeos:~/work/cruise/checkouts/uclinux-dist/testsuites/kgdb> ps aux  | grep bfin-uclinux-gdb

test      7713  2.0  3.3  40136 34400 pts/2    Ss+  05:34   0:00 bfin-uclinux-gdb /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/vmlinux

test      7724  0.0  0.0   3064   728 pts/3    S+   05:35   0:00 grep bfin-uclinux-gdb

uclinux82-537-adeos:~/work/cruise/checkouts/uclinux-dist/testsuites/kgdb> kill - 9 `pidof  bfin-uclinux-gdb`

uclinux82-537-adeos:~/work/cruise/checkouts/uclinux-dist/testsuites/kgdb>

 

Case 10 ...FAIL

 

Case 10 ...FAIL

 

KGDB TEST (ethernet) FAIL

KGDB TEST (ethernet) ............[FAIL]

--

 

Follow-ups

 

--- Sonic Zhang                                              2010-11-17 01:20:16

When ADEOS and kgdb are both enabled, single step in linux kernel may be

scheduled to Xenomai core after return from interrupt hanlders. This

blocks gdb continue operation after a break point is hit. So, disable

interrupt when running gdb single step.

 

--- Vivi Li                                                  2010-11-19 02:42:37

OK now. Close it.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

config.linux.kgdb    application/octet-stream    40478    Vivi Li

config.config.kgdb    application/octet-stream    49226    Vivi Li

Outcomes