Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Jun 2002 23:38:23 -0700
From:      Arun Sharma <arun@sharma-home.net>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Kernel hacking questions
Message-ID:  <20020613063823.GA31427@sharma-home.net>
In-Reply-To: <XFMail.20020611043647.jhb@FreeBSD.org>
References:  <20020610033520.GA7795@sharma-home.net> <XFMail.20020611043647.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jun 11, 2002 at 04:36:47AM -0400, John Baldwin wrote:
> > 2. How do I trace back funcname+offset to a particular line of C code ?
> >    I tried objdump -d and gcc -S, but it's not easy to read. I thought
> >    there was a way to get gcc to interleave the C code and the generated
> >    assembly.
> 
> gdb's 'l *foo+0x34' works wonders. :)  If you are stuck with a kernel.debug
> on current that gdb doesn't grok, you can use nm to extract the address of
> the function, add the offset, and use 'addr2line -e kernel.debug 0xc0yyyyyy'.

I was looking for

objdump -S foo.o

	-Arun

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020613063823.GA31427>