[Top] [All Lists]

Re: remote GDB debugging and the __init macro of init.h

To: Steve Kranz <>
Subject: Re: remote GDB debugging and the __init macro of init.h
From: Keith Owens <>
Date: Sat, 28 Oct 2000 12:54:18 +1100
In-reply-to: Your message of "Fri, 27 Oct 2000 09:24:17 MDT." <>
On Fri, 27 Oct 2000 09:24:17 -0600, 
Steve Kranz <> wrote:
>  I had to make a change to allow remote MIPS kernel
>  debugging (GDB). The change I found necessary was in the
>  file:
>    include/linux/init.h     (2.4.0-test9)
>  As you can see from the snippet below the change
>  involves conditionally defining the "__init" macro as
>  a function of whether remote debugging is enabled or
>  not. Am I missing something, or does this seem like a
>  reasonable change?

It would be better to teach kgdb that the kernel has symbols in
sections other than .text.  Even with your patch, you do not get all
the symbols, there is also code in sections .setup.init, .initcall.init
and .exitcall.exit, with similar sections for data.  You cannot remove
.initcall.init without destroying the kernel initialization procedure.

Recent versions of kgdb for ix86 use a modified version of gdb that
knows about multiple sections for modules.  I do not know if they have
the same functionality for the kernel.

<Prev in Thread] Current Thread [Next in Thread>