[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: how to debug kernel on etrax-uclinux


Currently you can't debug the kernel using GDB. So I think
printk is one of your best friends. There exist malloc
libraries (e.g. ccmaloc) that can help you to find wild
pointers. Note that you can't use malloc libraries that
depends on a MMU to detect memory overwrites.


-----Original Message-----
From: owner-dev-etrax@xxxxxxx.com]On">mailto:owner-dev-etrax@xxxxxxx.com]On
Behalf Of Prabhat Avasare
Sent: Tuesday, November 14, 2000 9:39 PM
To: dev-etrax
Subject: how to debug kernel on etrax-uclinux

Hi everyone.

For past few days, I am trying to port a free software
FreeS/WAN on etrax-uclinux. This software(http://www.freeswan.org)
implements IPSEC security protocol for linux i.e.
it patches linux kernel to add an IPSEC protocol
inside every IP packet sent across the network.

Compiling it under etrax-uclinux was not a major problem.
But, when I try to ping(or send small <5k packets) across
the network under IPSEC, it goes fine for some time and
then etrax-uclinux reboots itself! This happens approx
at a point after when the kernel does an skb_copy() call.
Same happens if I try to send a large packet.

The first guess I had was that the problem was due to
a smaller default stack size, so I increased it to 100K,
but the effect is still the same.

I realise that the description of my problem is not at
all a good, detailed one. But the reason for that is that
I havent yet got a good clue of the problem! As I am a
newcomer on etrax board,I thought of writing to get
people's opinions on how to solve such kernel-level problems.

How do you people debug such problems(kernel patches)
on etrax-uclinux? The only way which I am doing now is
the good old printfs :-(

One more small thing to add. I had read on freeswan
newsgroup that these same freeswan kernel patches worked
well for uclinux on Motorola(I think it was Coldfire).

I am using the latest etrax software release 1.0.2.

'hope to get some pointers to solve my problem.
best wishes,
-- prabhat

Prabhat Avasare    IMEC (DESICS)          email: avasare@xxxxxxx.be
                   Kapeldreef 75            Tel: +32-16-281525
                   B3001 Leuven             Fax: +32-16-281515