lkml.org 
[lkml]   [2005]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: kswapd0 oops -> debug information
Date
On Sunday 02 January 2005 07:41, Herbert Poetzl wrote:

> > The book I have re the make /dir/file.s states that it will produce
> > assembler with _line_ numbers to corresponding C code. That is where I
> > got lost, as it doesn't.
>
> hmm, sorry for the late reply, but better late
> than not at all ...
>
> if you do
>
> make fs/file.s V=1
>
> you'll see what make actually does to compile
> the source code into assembler code ...
>
> make -f scripts/Makefile.build obj=scripts/basic
> make -f scripts/Makefile.build obj=scripts
> make -f scripts/Makefile.build obj=fs fs/file.s
> gcc -Wp,-MD,fs/.file.s.d -nostdinc -iwithprefix include -D__KERNEL__
> -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing
> -fno-common -O2 -fomit-frame-pointer -g -pipe -msoft-float
> -mpreferred-stack-boundary=2 -march=i586 -Iinclude/asm-i386/mach-default
> -DKBUILD_BASENAME=file -DKBUILD_MODNAME=file -S -o fs/file.s fs/file.c
>
> and if that final gcc command does include a -g
> (which can be controlled by CONFIG_DEBUG_INFO, or
> simply added by hand), then the output will contain
> lines like this:
>
> .loc 1 45 0
> .loc 1 46 0
>
> which reference the file and line number in the
> source code. files are 'declared' with lines:
>
> .file "file.c"
> .file 1 "fs/file.c"
> .file 2 "include/linux/posix_types.h"
>
> so you can pretty easy find the code in the
> source. a different, but sometimes easier approach
> is to use 'addr2line' on the kernel binary (if it
> was compiled with CONFIG_DEBUG_INFO) to get the
> source line from a kernel address ...
>
> addr2line -e vmlinux c0123456
>
> HTH,
> Herbert

Hi Herbert,

Thanks for reply.

I will file this for when needed again for future reference, as I have moved
back to 2.6.4 kernel, as that tree never once produces a kswapd oops and just
runs and runs and runs.

I just don't know why > 2.6.4 kernels produce oops on my system - I have been
through change log looking at all the relevant stuff, but can't really see
anything obvious. I have built kernels 'clean' from bottom up, but all
produce kswapd oops within a few days - except 2.6.4.

I wish this box wasn't my LAN gateway, otherwise I wouldn't mine when it does
go AWOL and I could debug at my leisure.

Thanks for help,

Nick
--
"When you're chewing on life's gristle,
Don't grumble, Give a whistle..."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:09    [W:0.097 / U:0.624 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site