Wind River Support Network

HomeDefectsLIN6-3866
Fixed

LIN6-3866 : [5.0.1] kgdboc test can NOT stopped at breakpoint by using path module_debug_example to add symbols

Created: Dec 31, 2012    Updated: Mar 10, 2016
Resolved Date: Nov 30, 2013
Previous ID: LIN5-909, LIN6-3081
Found In Version: 6.0
Fix Version: 6.0
Severity: Severe
Applicable for: Wind River Linux 6
Component/s: Toolchain

Description

Problem Description
======================
kgdboc test can NOT stopped at breakpoint by using path module_debug_example to add symbols.

Expected Behavior
======================
works well.
 

Observed Behavior
======================
None

Logs(Key error logs)
======================
host:
-------------------
GNU gdb (Wind River Linux Sourcery CodeBench 4.6a-95) 7.4.50.20120716-cvs
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=mips-wrs-linux-gnu".
For bug reporting instructions, please see:
<support@windriver.com>...
Reading symbols from /source_code/project/cav-octeon2/bitbake_build/tmp/work/cav_octeon2-wrs-linux-gnun32/linux-windriver-3.4-r0/linux-cav-octeon2-standard-build/vmlinux...done.
(gdb) path /source_code/project/cav-octeon2/build/kernel-test-modules-0.1-r0
path /source_code/project/cav-octeon2/build/kernel-test-modules- 
0.1-r0
Executable and object file path: /source_code/project/cav-octeon2/build/kernel-test-modules-0.1-r0:/bin:/android/android-sdk-linux/tools:/android/android-sdk-linux/platform-tools:/android/phonegap/android-phonegap/lib/android/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
(gdb) target remote localhost:6661
target remote localhost:6661
Remote debugging using localhost:6661
warning: Could not load shared library symbols for 6 libraries, e.g. jbd2.
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?
0xffffffff8113524c in arch_kgdb_breakpoint ()
    at /source_code/project/cav-octeon2/bitbake_build/tmp/work/cav_octeon2-wrs-linux-gnun32/linux-windriver-3.4-r0/linux/arch/mips/kernel/kgdb.c:223
223		__asm__ __volatile__(
(gdb) list
list
218	#endif
219	};
220	
221	void arch_kgdb_breakpoint(void)
222	{
223		__asm__ __volatile__(
224			".globl breakinst\n\t"
225			".set\tnoreorder\n\t"
226			"nop\n"
227			"breakinst:\tbreak\n\t"
(gdb) info break
info break
No breakpoints or watchpoints.
(gdb) info register
info register
                  zero               at               v0               v1
 R0   0000000000000000 ffffffff811cb9b8 0000000000000001 0000000000000000 
                    a0               a1               a2               a3
 R4   0000000000000001 ffffffff8114d750 ffffffffffffffff 0000000000000000 
                    a4               a5               a6               a7
 R8   000000000000000a ffffffff81a3f468 000000000001ffff 0000000000000000 
                    t0               t1               t2               t3
 R12  0000000000000000 000000001000001f a80000008ed90000 0000000010040000 
                    s0               s1               s2               s3
 R16  ffffffff81a90000 0000000000000067 ffffffff818dcc28 ffffffff81b00000 
                    s4               s5               s6               s7
 R20  0000000000000000 0000000000000007 ffffffff818f0000 0000000000000001 
                    t8               t9               k0               k1
 R24  000000001003c4c4 000000002c1cf7b0 0000000000000000 0000000000000007 
                    gp               sp               s8               ra
 R28  ffffffff818ac000 ffffffff818af950 ffffffff818af950 ffffffff811cb9b8 
                    sr               lo               hi              bad
      0000000010008ce2 0000000000000004 0000000000326c8e ffffffff818d0000 
                 cause               pc
      0000000000800024 ffffffff8113524c 
                   fsr              fir
              00000000         00000000 
(gdb) where
where
#0  0xffffffff8113524c in arch_kgdb_breakpoint ()
    at /source_code/project/cav-octeon2/bitbake_build/tmp/work/cav_octeon2-wrs-linux-gnun32/linux-windriver-3.4-r0/linux/arch/mips/kernel/kgdb.c:223
#1  0xffffffff811cb9b8 in kgdb_breakpoint ()
    at /source_code/project/cav-octeon2/bitbake_build/tmp/work/cav_octeon2-wrs-linux-gnun32/linux-windriver-3.4-r0/linux/kernel/debug/debug_core.c:1010
#2  0xffffffff811cbca8 in sysrq_handle_dbg (key=<optimized out>)
    at /source_code/project/cav-octeon2/bitbake_build/tmp/work/cav_octeon2-wrs-linux-gnun32/linux-windriver-3.4-r0/linux/kernel/debug/debug_core.c:764
#3  0xffffffff814fdd1c in __handle_sysrq (key=<optimized out>, 
    check_mask=<optimized out>)
    at /source_code/project/cav-octeon2/bitbake_build/tmp/work/cav_octeon2-wrs-linux-gnun32/linux-windriver-3.4-r0/linux/drivers/tty/sysrq.c:525
#4  0xffffffff814fdf08 in handle_sysrq (key=<optimized out>)
    at /source_code/project/cav-octeon2/bitbake_build/tmp/work/cav_octeon2-wrs-linux-gnun32/linux-windriver-3.4-r0/linux/drivers/tty/sysrq.c:553
#5  0xffffffff81504bf0 in uart_handle_sysrq_char (ch=<optimized out>, 
    port=<optimized out>)
    at /source_code/project/cav-octeon2/bitbake_build/tmp/work/cav_octeon2-wrs-linux-gnun32/linux-windriver-3.4-r0/linux/include/linux/serial_core.h:521
---Type <return> to continue, or q <return> to quit---q
q
Quit
(gdb) continue
continue
Continuing.
^CInterruptingInterrupting
Program received signal SIGTRAP, Trace/breakpoint trap.
break bpHere.c:putABreakPointHere
0xffffffff8113524c in arch_kgdb_breakpoint ()
    at /source_code/project/cav-octeon2/bitbake_build/tmp/work/cav_octeon2-wrs-linux-gnun32/linux-windriver-3.4-r0/linux/arch/mips/kernel/kgdb.c:223
223		__asm__ __volatile__(
(gdb) break bpHere.c:putABreakPointHere
No source file named bpHere.c.
Make breakpoint pending on future shared library load? (y or [n]) y
y

Breakpoint 1 (bpHere.c:putABreakPointHere) pending.
(gdb) list
list
218	#endif
219	};
220	
221	void arch_kgdb_breakpoint(void)
222	{
223		__asm__ __volatile__(
224			".globl breakinst\n\t"
225			".set\tnoreorder\n\t"
226			"nop\n"
227			"breakinst:\tbreak\n\t"
(gdb) info break
info break
Num     Type           Disp Enb Address    What
1       breakpoint     keep y   <PENDING>  bpHere.c:putABreakPointHere
(gdb) info register
info register
                  zero               at               v0               v1
 R0   0000000000000000 ffffffff811cb9b8 0000000000000001 0000000000000000 
                    a0               a1               a2               a3
 R4   0000000000000067 ffffffff8114d750 ffffffffffffffff 0000000000000000 
                    a4               a5               a6               a7
 R8   000000000000000a ffffffff81a3f468 000000000001ffff 0000000000000000 
                    t0               t1               t2               t3
 R12  0000000000000000 000000001000001f a80000008ed90000 0000000010040000 
                    s0               s1               s2               s3
 R16  ffffffff81a90000 0000000000000067 ffffffff818dcc28 ffffffff81b00000 
                    s4               s5               s6               s7
 R20  0000000000000000 0000000000000007 ffffffff818f0000 0000000000000001 
                    t8               t9               k0               k1
 R24  000000001003c4c4 000000002c1cf7b0 ffffffff818dcc28 ffffffff81b00000 
                    gp               sp               s8               ra
 R28  ffffffff818ac000 ffffffff818af950 ffffffff818af950 ffffffff811cb9b8 
                    sr               lo               hi              bad
      0000000010008ce2 333333333333333b 0000000000000005 0000000000000005 
                 cause               pc
      0000000000800024 ffffffff8113524c 
                   fsr              fir
              00000000         00000000 
(gdb) where
where
#0  0xffffffff8113524c in arch_kgdb_breakpoint ()
    at /source_code/project/cav-octeon2/bitbake_build/tmp/work/cav_octeon2-wrs-linux-gnun32/linux-windriver-3.4-r0/linux/arch/mips/kernel/kgdb.c:223
#1  0xffffffff811cb9b8 in kgdb_breakpoint ()
    at /source_code/project/cav-octeon2/bitbake_build/tmp/work/cav_octeon2-wrs-linux-gnun32/linux-windriver-3.4-r0/linux/kernel/debug/debug_core.c:1010
#2  0xffffffff811cbca8 in sysrq_handle_dbg (key=<optimized out>)
    at /source_code/project/cav-octeon2/bitbake_build/tmp/work/cav_octeon2-wrs-linux-gnun32/linux-windriver-3.4-r0/linux/kernel/debug/debug_core.c:764
#3  0xffffffff814fdd1c in __handle_sysrq (key=<optimized out>, 
    check_mask=<optimized out>)
    at /source_code/project/cav-octeon2/bitbake_build/tmp/work/cav_octeon2-wrs-linux-gnun32/linux-windriver-3.4-r0/linux/drivers/tty/sysrq.c:525
#4  0xffffffff814fdf08 in handle_sysrq (key=<optimized out>)
    at /source_code/project/cav-octeon2/bitbake_build/tmp/work/cav_octeon2-wrs-linux-gnun32/linux-windriver-3.4-r0/linux/drivers/tty/sysrq.c:553
#5  0xffffffff81504bf0 in uart_handle_sysrq_char (ch=<optimized out>, 
    port=<optimized out>)
    at /source_code/project/cav-octeon2/bitbake_build/tmp/work/cav_octeon2-wrs-linux-gnun32/linux-windriver-3.4-r0/linux/include/linux/serial_core.h:521
---Type <return> to continue, or q <return> to quit---q
q
Quit
(gdb) continue
continue
Continuing.                    -------------> can NOT stop at here. (putABreakPointHere)

target:
-------------------
root@localhost:~# moduleTest thread woke up. Global is GLOBAL !
in putABreakPointHere(), siLocal = 2
moduleTest thread woke up. Global is GLOBAL !
in putABreakPointHere(), siLocal = 3
SysRq : DEBUG
$T05thread:fffffffe;#d5+$0000000000000000ffffffff811cb9b8000000000000000100000000000000000000000000000067ffffffff8114d750ffffffffffffffff0000000000000000000000000000000affffffff81a3f468000000000001ffff00000000000000000000000000000000000000001000001fa80000008ed900000000000010040000ffffffff81a900000000000000000067ffffffff818dcc28ffffffff81b0000000000000000000000000000000000007ffffffff818f00000000000000000001000000001003c4c4000000002c1cf7b0ffffffff818dcc28ffffffff81b00000ffffffff818ac000ffffffff818af950ffffffff818af950ffffffff811cb9b80000000010008ce2333333333333333b000000000000000500000000000000050000000000800024ffffffff8113524c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000#be+$0000000d#b4+$00000000#80+$#00+$0000010f#b7+$00000000#80+$00000000000000000000000000000000ffffffff818af960ffffffff818af9600000000000000008ffffffff818d0000ffffffff818af980ffffffff811cbca8#2f+$03c0e82d#29+$00000000#80+$ffffffff818af990ffffffff814fdd1c0000000000000001ffffffff818dd180ffffffff81b054f00000000000000101ffffffff818b0000a80000008d4ce800#04+$666454a0#d0+$0220202d#bc+$fffffffffffffff3000000000000001400000000000000000000000000000067ffffffff818af9f0ffffffff814fdf08ffffffff818afa00ffffffff81504bf0#8e+$03c0e82d#29+$24050001#8c+$085412db#fa+$02e0202d#ef+$0000000000000000000000000000007dffffffff818afa60ffffffff8150676cffffffff818dd180ffffffff81b054f0a80000008ee6d514000000000000007d#24+$0000000d#b4+$#00+moduleTest thread woke up. Global is GLOBAL !
in putABreakPointHere(), siLocal = 4
moduleTest thread woke up. Global is GLOBAL !
in putABreakPointHere(), siLocal = 5
moduleTest thread woke up. Global is GLOBAL !
in putABreakPointHere(), siLocal = 6
moduleTest thread woke up. Global is GLOBAL !
in putABreakPointHere(), siLocal = 7           ---------> always print similar messages.

Steps to Reproduce

/source_code/xxxx/wrlinux-x/wrlinux/configure --enable-jobs=8 --enable-parallel-pkgbuilds=4 --enable-kernel=standard --enable-rootfs=glibc_std --enable-board=cav-octeon2 --enable-test=yes --with-layer=/source_code/xxxx/wr-testing/bts,/source_code/xxxx/wr-testing/kts,/source_code/xxxx/wr-testing/ltp --with-rcpl-version=auto
Live chat
Online