Re: how to build kernel in debug mode?

From: George Anzinger (george@pioneer.net)
Date: Thu Jun 01 2000 - 15:32:34 EST


Dear Nasser,

You want to modify CFLAGS. HOSTCFLAGS is used to compile
stuff needed to do the make (i.e. some of the tools), not
the made items (the kernel itself).

To do more than just look at a kernel i.e. actually debug
it, see the archives. A patch is needed to modify several
things, including the make file.

George

Nasser Abbasi wrote:
>
> hello linux experts,
>
> this seems like a simple thing, but how to build linux in debug (-g) mode?
>
> I need to do this:
>
> $ cd /usr/src/linux ; gdb vmlinux /proc/kcore
>
> but I think kernel needs to be build with -g for the kernel symbols
> to be there.
>
> the obvious thing (edit /usr/src/linux/Makefile) and added -g to the
> HOSTCFLAGS (near the top of the file), and recompile, did not do it.
>
> what is the best way to do it?
>
> thanks,
> Nasser
>
> -
> 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/

-
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 : Wed Jun 07 2000 - 21:00:13 EST