Why Trace32 failed to show the source/prototype information of some of linux kernel symbols?

372 views
Skip to first unread message

Charles

unread,
Apr 20, 2011, 11:02:02 PM4/20/11
to Lauterbach Trace32
Dear All,

I am trying to debug linux kernel with Trace32 with stop mode on my
ARM9 target board, But I found a strange things that some of the
kernel symbols, such as start_kernel, __do_user_fault/
__do_kernel_fault canot be presented properly: there are just address
information and no source code/prototype information available, while
some other symbols can be shown properly, likes __arm_ioremap and a
lot of other symbols.

I didn't find any different of command line used for building those
different files, so I firstly guess that is because some source file
loading issues. I am loading the elf file with following command:
Data.Load.elf Z:\dev\linux\2.6.32.15\kernel\vmlinux /nocode /gnu /PATH
"Z:\" /STRIPPART "/home/charles".

All sources were in same tree in my home as /home/charles/myandroid/
kernel, and the /home/charles path weas mapped to Z: driver under
windows, I think there shouldn't have any difference.

I tried to use an older version of gcc to avoid the case that trace32
sw cannot support new toolchain generated elf file. but even the
codesourcery 2006q3 version of gcc failed with the same case.

The trace32 software is of July 18 2008 version, so its support
already expired. I have to turn to network but no any findings yet.
Could anyone help me or give me some good trace32 user forum? Thanks
in advance!

Charles

Kris

unread,
Apr 21, 2011, 12:07:50 AM4/21/11
to Lauterbach Trace32
Hi,

Can you tell the kenel configuration options used. You need to enable
Kernel debug info option and Optimization level should be "-O2".

Is it possible to send the screenshot of the window and "view->symbols-
>Functions" menu list also.

Regards

Kris

Charles

unread,
Apr 21, 2011, 12:23:59 PM4/21/11
to Lauterbach Trace32
Yes, I have enabled the "compile kernel with debugging symbols" option
and the optimization level set to -O1 to make the code easier to
understand when I have to debug by asm instructions.. In fact, the elf
file can be load by gdb and show symbols information very well, that
makes me quite confusing..

Charles

unread,
Apr 21, 2011, 10:25:49 PM4/21/11
to Lauterbach Trace32
Hi Kris,

Please see the screen shot at :
https://picasaweb.google.com/lh/photo/LW9k0aCpDL9MC0mbCios19y7w-y9eh9hEvycm7KFm14?feat=directlink

Thanks and Regards,

Charles.

Kris

unread,
Apr 22, 2011, 12:34:16 AM4/22/11
to tra...@googlegroups.com
Hi,
 
From the screenshot, it is very clear the symbol information is not available for start_kernel. Please ensure in the Makefile "CFLAGS" having " -g -O2" and also ensure that these are not overwritten by any other options. i.e see anywhere -Os option etc.,
 
Let me know the version of cross-compiler and trace32 version.
 
Regards
 
Kris

Message has been deleted
Message has been deleted

Kris

unread,
Apr 22, 2011, 12:30:47 PM4/22/11
to tra...@googlegroups.com
Hi Charles,
 
If so, I recommend you to take backup of your existing trace32 installed directyory(c:\t32). Download the latest software patch from below link.
 
 
Extrace these contents to your trace32 installed directory(C:\t32). This will work for 30 minutes and you can check whether this version of software solves your problem.
 
Best regards
 
Kris

On Fri, Apr 22, 2011 at 4:57 PM, Charles <fakev...@gmail.com> wrote:
Hi Kris,

I just double confirmed that the command line arguments should be fine
with the output from make V=1. And I attached two command lines below
at the bottom of this reply.
My toolchain is the arm-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-
gnu.tar.bz2 package from codesourcery.
T32 version if of July 18 2008, Build 13751-14337. I have tried some
older version of T32, the result is same but I haven't got any chance
to try newer version because my license..

(sample command lines: one for main.c includes start_kernel, another
for ioremap.c with __arm_ioremap..)
 arm-none-eabi-gcc -Wp,-MD,init/.main.o.d            -nostdinc -
isystem /home/charles/dev/linux/crosstool/arm-2008q3/bin/../lib/gcc/
arm-none-eabi/4.3.2/include -Iinclude  -I/home/charles/myandroid/
kernel/arch/arm/include -include include/linux/autoconf.h -I/home/
charles/myandroid/kernel/ms/middleware/pm/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/audio/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/bus/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/clkgen/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/drvutil/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/emi/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/int/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/io/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/kernel/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/keypad/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/pll/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/pm/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/pmu/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/power/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/timer/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/tscr/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/wrapper/pub -I/home/charles/
myandroid/kernel/ms/drivers/drv/backlight/pub -I/home/charles/
myandroid/kernel/ms/drivers/drv/bus/pub -I/home/charles/myandroid/
kernel/ms/drivers/drv/chip/pub -I/home/charles/myandroid/kernel/ms/
drivers/drv/clkgen/pub -I/home/charles/myandroid/kernel/ms/drivers/drv/
cpu/pub -I/home/charles/myandroid/kernel/ms/drivers/drv/int/pub -I/
home/charles/myandroid/kernel/ms/drivers/drv/io/pub -I/home/charles/
myandroid/kernel/ms/drivers/drv/pm/pub -I/home/charles/myandroid/
kernel/ms/drivers/drv/power/pub -I/home/charles/myandroid/kernel/ms/
drivers/drv/tscr/pub -I/home/charles/myandroid/kernel/ms/drivers/drv/
wrapper/pub -D__KERNEL__ -mlittle-endian -Iarch/arm/mach-msw8533x/
include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-
aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-
security -fno-delete-null-pointer-checks -O1 -marm -mabi=aapcs-linux -
mno-thumb-interwork -funwind-tables -D__LINUX_ARM_ARCH__=5 -
march=armv5te -mtune=arm9tdmi -msoft-float -Uarm -fno-stack-protector -
fomit-frame-pointer -g -Wdeclaration-after-statement -Wno-pointer-sign
-fno-strict-overflow   -D"KBUILD_STR(s)=#s" -
D"KBUILD_BASENAME=KBUILD_STR(main)"  -
D"KBUILD_MODNAME=KBUILD_STR(main)"  -c -o init/main.o init/main.c
 arm-none-eabi-gcc -Wp,-MD,arch/arm/mm/.ioremap.o.d  -nostdinc -
isystem /home/charles/dev/linux/crosstool/arm-2008q3/bin/../lib/gcc/
arm-none-eabi/4.3.2/include -Iinclude  -I/home/charles/myandroid/
kernel/arch/arm/include -include include/linux/autoconf.h -I/home/
charles/myandroid/kernel/ms/middleware/pm/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/audio/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/bus/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/clkgen/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/drvutil/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/emi/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/int/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/io/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/kernel/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/keypad/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/pll/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/pm/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/pmu/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/power/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/timer/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/tscr/pub -I/home/charles/
myandroid/kernel/ms/drivers/hal/msw8533x/wrapper/pub -I/home/charles/
myandroid/kernel/ms/drivers/drv/backlight/pub -I/home/charles/
myandroid/kernel/ms/drivers/drv/bus/pub -I/home/charles/myandroid/
kernel/ms/drivers/drv/chip/pub -I/home/charles/myandroid/kernel/ms/
drivers/drv/clkgen/pub -I/home/charles/myandroid/kernel/ms/drivers/drv/
cpu/pub -I/home/charles/myandroid/kernel/ms/drivers/drv/int/pub -I/
home/charles/myandroid/kernel/ms/drivers/drv/io/pub -I/home/charles/
myandroid/kernel/ms/drivers/drv/pm/pub -I/home/charles/myandroid/
kernel/ms/drivers/drv/power/pub -I/home/charles/myandroid/kernel/ms/
drivers/drv/tscr/pub -I/home/charles/myandroid/kernel/ms/drivers/drv/
wrapper/pub -D__KERNEL__ -mlittle-endian -Iarch/arm/mach-msw8533x/
include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-
aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-
security -fno-delete-null-pointer-checks -O1 -marm -mabi=aapcs-linux -
mno-thumb-interwork -funwind-tables -D__LINUX_ARM_ARCH__=5 -
march=armv5te -mtune=arm9tdmi -msoft-float -Uarm -fno-stack-protector -
fomit-frame-pointer -g -Wdeclaration-after-statement -Wno-pointer-sign
-fno-strict-overflow   -D"KBUILD_STR(s)=#s" -
D"KBUILD_BASENAME=KBUILD_STR(ioremap)"  -
D"KBUILD_MODNAME=KBUILD_STR(ioremap)"  -c -o arch/arm/mm/ioremap.o
arch/arm/mm/ioremap.c



On Apr 22, 12:34 pm, Kris <krishna.mogalipu...@gmail.com> wrote:
> Hi,
>
> From the screenshot, it is very clear the symbol information is not
> available for start_kernel. Please ensure in the Makefile "CFLAGS" having
> " -g -O2" and also ensure that these are not overwritten by any other
> options. i.e see anywhere -Os option etc.,
>
> Let me know the version of cross-compiler and trace32 version.
>
> Regards
>
> Kris
>
>
>
> On Fri, Apr 22, 2011 at 7:55 AM, Charles <fakev.zh...@gmail.com> wrote:
> > Hi Kris,
>
> > Please see the screen shot at :
>

Charles

unread,
Apr 23, 2011, 12:32:18 PM4/23/11
to Lauterbach Trace32
:( With the latest version trace32, all things go on well..So seems
the only solution for me is to renew the license and get the new
software...
Or perhaps I can build my own toolchain to have a trial. It's so hard
to believe that the trace32 version I am using didn't tested with
debugging linux kernel build with arm gcc..

Kris

unread,
Apr 23, 2011, 10:53:43 PM4/23/11
to tra...@googlegroups.com
Hi,
 
Yes, you will be required to purchase the s/w maintenance. Can you give the sl.no of the debug license cable. It starts with Cxxxxxxxx.
 
With the purchase of the license, you will get one year s/w maintenance free of cost. If the version of the compiler you are using is support within that period you can request your vendor to provide the suitable patch.
 
If the patch release to support this verison of the compiler is out of your maintenance,need to purchase s/w maintenance. Lauterbach can't support all the future version compiler in the current version itself, as the debug information keeps changing from version to version.
 
I hope you understood this and give me the sl.no. of the debug license cable(i.e flat ribbon cable connector).
 
BTW, you are from which country and where are you working.
 
Regards
 
Kris

Charles

unread,
Apr 25, 2011, 8:11:21 PM4/25/11
to Lauterbach Trace32
Finally I found it's just a compatible issue of T32 with some newer
toolchain. I have made some mistake in my previous testing,and caused
older version of gcc not really used in building-test. GCC 4.2 and
before can work well with the T32 of version July 18 2008.

Many thanks to Kris for your guidance :)

Charles.
Reply all
Reply to author
Forward
0 new messages