On Fri, 27 Oct 2000 09:24:17 -0600,
Steve Kranz <firstname.lastname@example.org> wrote:
> I had to make a change to allow remote MIPS kernel
> debugging (GDB). The change I found necessary was in the
> 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.