Re: Kernel Debugging

From: George Anzinger (george@pioneer.net)
Date: Thu Apr 27 2000 - 06:46:20 EST


Mani Manoharan Balaraman wrote:
>
> Hi Amit / All
>
> Yes we enabled the gdb support option while compiling the kernel.
> Actually the kernel which we using is 2.2.12-20. and the kernel patch which
> we used is for 2.2.12 and was downloaded from oss.sgi.com
>
> The url is ftp://oss.sgi.com/www/projects/kgdb/download/
> It'll be really helpful for us to get the problem solved in this regard as
> we are breaking our heads for 3 days.
>
> Thanks and regards
> Mani
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.rutgers.edu
> Please read the FAQ at http://www.tux.org/lkml/

I just downloaded the patch and looked at it. It looks ok as far as it
goes. How are you passing "gdb"? It wants to be on the lilo command
line. During boot lilo pauses the computer to allow you to input the
system name to boot. I would enter: test gdb where the system name
is "test".

Note that this will break the system just before it forks off "init".
This is fairly late in the boot as things go. The problem with most of
the kgdb code that I have looked at is that, for what I was doing, this
was WAY too late. I have a patch for 2.2.14 that grabs the system in
the call to parse in main.c. If you look at "start_kernel" you will see
parse_options about 25 listing lines down.

To check if your patch is correct, look at init/main.c in the
parse_options() routine. You should see the test for "gdb" here if the
patch was correctly aplied.

George

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 30 2000 - 21:00:12 EST