This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS 5.2 debugger not recognizing Linux kernel source code / line number table

Other Parts Discussed in Thread: AM3359

I'm trying to use CCS 5.2.1.00018 (Windows version) to debug a Linux kernel on the BeagleBone's AM3359. However, I'm unable to perform source-level debugging with CCS because I can't get the debugger to recognize the locations in the source code corresponding to my kernel in memory.

I've been using the wiki page Linux Debug in CCSv5 as my guide here; I've set up a project for my kernel pointing to the Linux source tree that I used, and I've specified my vmlinux image containing debug symbols in the Debug Configurations dialog:

And I did double check that this kernel image contains the DWARF line number table:

% readelf --debug-dump bin/am335x/debug/vmlinux | grep 'DW_AT_name.*init\/main\.c'
<a78e> DW_AT_name : (indirect string, offset: 0x5677): init/main.c

Additionally, my toolchain's GDB is able to resolve function names to line numbers using the same kernel image:

% gdb bin/am335x/debug/vmlinux
GNU gdb (Linaro GDB) 7.2-2011.03-0
Copyright (C) 2010 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=x86_64-linux-gnu --target=arm-openwrt-linux-uclibcgnueabi".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /home/mshroyer/work/XXXX/bin/am335x/debug/vmlinux...done.
(gdb) l start_kernel
463 pgtable_cache_init();
464 vmalloc_init();
465 }
466
467 asmlinkage void __init start_kernel(void)
468 {
469 char * command_line;
470 extern const struct kernel_param __start___param[], __stop___param[];
471
472 smp_setup_processor_id();
(gdb)

But when I try to debug with CCS, e.g. by manually setting a hardware breakpoint at the address of start_kernel as identified in System.map, I run into the following problem:

As shown above, CCS has correctly identified the address at which it's halted as the start_kernel() function and can show me a disassembly, however it won't allow me to do source-level debugging here: No source available for "start_kernel() at..." This is despite the fact that I've imported the kernel's source into CCS as a C project:

I still have this problem even if I also manually specify my Linux source directory as a source lookup path within the debug configuration. Any idea what I'm missing here?

Thanks in advance...