Skip to contentSkip to conversation

BDI kernel debug

DISCUSSION Marco Schramel 3 participants 5 messages Jul 6, 2004 – Jul 7, 2004

lore
Share & tools
lore
#0 lore raw

Hi all,

i have some problems with debugging my kernel. This is the first time i use bdi for kernel debugging. ELDK 3.0 is my toolchain (Target 8270).
My bdi2000 can sync with the gdb (ddd) debugger.
I let the kernel run until "start_here", at example. Then i try to step through the source. I see the source and i can step in it. Sometimes it happens that i spend a lot of time in linux/kernel/timer.c. Then the output of gdb is "
(gdb) next
Single stepping until exit from function __cli,
which has no line number information.

Program received signal SIGSTOP, Stopped (signal). 0xc0007dec in __cli ()"

The same output with "step". "Cont" ends also there, although i had set a breakpoint later in the source.

Are there some options in the kernel or in the gdb to set ?

Thanks in advance
Marco

---------
Marco Schramel
R&D
Bartec GmbH
Schulstr. 30
94239 Gotteszell, Germany
www.bartec.de
[email protected]

Phone:  +49 (0)9929/301332
Fax:    +49 (0)9929/301112

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#1 lore raw
Quoted 2 lines · In message <[email protected]> you wrote:

i have some problems with debugging my kernel. This is the first time i use bdi for kernel debugging. ELDK 3.0 is my toolchain (Target 8270).

...

Quoted 1 line

Are there some options in the kernel or in the gdb to set ?

Did you enable CONFIG_DEBUG_KERNEL in your kernel configuration?

Did you read the FAQ section of the DULG, especially
http://www.denx.de/twiki/bin/view/DULG/HowToDebugLinuxExceptions
and
http://www.denx.de/twiki/bin/view/DULG/HowToSingleStepThroughRFIInstruction

Best regards,

Wolfgang Denk

--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] Death, when unnecessary, is a tragic thing.
-- Flint, "Requiem for Methuselah", stardate 5843.7

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#2 lore raw

Hello,

Quoted 4 lines
Quoted 2 lines

Are there some options in the kernel or in the gdb to set ?

Did you enable CONFIG_DEBUG_KERNEL in your kernel configuration?

Yes it is enabled, furthermore the "Include BDI-2000 user context switcher" is set and compiler options "Additional compile arguments: "-g -ggdb -fno-schedule-insns -fno-schedule-insns2" are set

Quoted 4 lines

Did you read the FAQ section of the DULG, especially
http://www.denx.de/twiki/bin/view/DULG/HowToDebugLinuxExceptions
and
http://www.denx.de/twiki/bin/view/DULG/HowToSingleStepThroughRFIInstruction

In my case i try to step through m8260_setup_arch() function to debug m8260_find_bridges() for pci support. Is there the MMU already on ? I think it is.

When the bdi runs through the code the most time it comes to the __delay() function. Then i try "step" or "next" and it often hangs forever.

Quoted 3 lines

Best regards,

Wolfgang Denk

Thank you for your reply.

Best regards,
Marco

---------
Marco Schramel
R&D
Bartec GmbH
Schulstr. 30
94239 Gotteszell, Germany
www.bartec.de
[email protected]

Phone:  +49 (0)9929/301332
Fax:    +49 (0)9929/301112

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#3 lore raw
In reply to Marco Schramel

Marco,

Please look online at the Ultimate Solutions website, I documented this issue a little while ago, http://www.ultsol.com/faq-P305.htm. Wolfgang made the right suggestion, using BDI_CONFIG_SWITCH will cure this problem.

Fahd

-----Original Message-----
From: Marco Schramel [mailto:[email protected]]
Sent: Tuesday, July 06, 2004 6:31 AM
Subject: BDI kernel debug

i have some problems with debugging my kernel. This is the first time i use bdi for kernel debugging. ELDK 3.0 is my toolchain (Target 8270). My bdi2000 can sync with the gdb (ddd) debugger. I let the kernel run until "start_here", at example. Then i try to step through the source. I see the source and i can step in it. Sometimes it happens that i spend a lot of time in linux/kernel/timer.c. Then the output of gdb is " (gdb) next
Single stepping until exit from function __cli,
which has no line number information.

Program received signal SIGSTOP, Stopped (signal). 0xc0007dec in __cli ()"

The same output with "step". "Cont" ends also there, although i had set a breakpoint later in the source.

Are there some options in the kernel or in the gdb to set ?

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#4 lore raw

Fahd,

thank you for your answer

Quoted 4 lines

Please look online at the Ultimate Solutions website, I documented this issue a little while ago, http://www.ultsol.com/faq-P305.htm. Wolfgang made the right suggestion, using BDI_CONFIG_SWITCH will cure this problem.

But my kernel has this option.

Best regards
Marco

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/