From: Derek Atkins <warlord@MIT.EDU>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: kgdb-bugreport@lists.sourceforge.net,
Kexec Mailing List <kexec@lists.infradead.org>,
Vivek Goyal <vgoyal@in.ibm.com>,
Dave Anderson <anderson@redhat.com>,
Jason Wessel <jason.wessel@windriver.com>,
pete@bluelane.com
Subject: Re: [Kgdb-bugreport] Problem getting kgdb to read kernel symbols. addresses shifted?
Date: Fri, 28 Sep 2007 19:29:46 -0400 [thread overview]
Message-ID: <sjm641uid1x.fsf@pgpdev.ihtfp.org> (raw)
In-Reply-To: <m18x6qbfip.fsf@ebiederm.dsl.xmission.com> (Eric W. Biederman's message of "Fri\, 28 Sep 2007 16\:18\:22 -0600")
ebiederm@xmission.com (Eric W. Biederman) writes:
> Pete/Piet Delaney <pete@bluelane.com> writes:
>
>> Jason Wessel wrote:
>>
>> Shouldn't crash, kdump and kgdb take into consideration a
>> shift in the kernel so that gdb works normally?
>>
>> Seems that having the kgdb stub knowledgeable of a shift
>> in the kernel might be easy to compensate for. Perhaps
>> just mapping all reads and writes that lie within the
>> original kernel segments to the shifted addresses.
>
> Good question.
>
> I remember hearing some oddball reports about something like this.
> My memory says what little tracking that happened pointed in
> the direction of a confused gdb.
Well, gdb agrees with System.map, so I'm sure that gdb itself is
okay. It's certainly possible that that the kgdb stub is weird,
but /proc/kallsyms doesn't match System.map, and THAT'S what's
confusing me most of all.
> In particular unless you deliberately run a kernel at a different
> address linux kernels should run at the addresses they were built
> for so there should be nothing that has to be done.
In my case I'm not doing anything special; the bzImage is definitely
built from the vmlinux, but the symbols are definitely offset.
Granted, I'm using the Fedora RPM build, so it's possible that THAT is
doing something weird. Unlikely, but possible. Using the
add-symbol-file seems to have mostly worked for me, and adding the
symbol file of my module seems to work, too.
Hopefully this will all get merged into the mainline sometime
soon and the gdb patches will get fed up into the gdb mainline
and everyone can be happy.. :)
> I'm running on foggy memories so something may have changed
> since last time I looked.
Which was how long ago? ;)
-derek
> Eric
>
>
>>
>> -piet
>>
>>> Derek Atkins wrote:
>>>> Quoting Jason Wessel <jason.wessel@windriver.com>:
>>>>
>>>>>> Um, okay..... How do I do that? My GDB Fu is weak here; how do I
>>>>>> tell gdb that the symbols in vmlinux are all offset? Or how do I
>>>>>> manipulate the vmlinux binary to offset the symbols?
>>>>>>
>>>>> Start gdb with no file. And do something like: add-symbol-file vmlinux
>>>>> 0xBFA00000
>>>> Um, where did you get "0xBFA0000" from? Unfortunately this didn't
>>>> work at all. I would think to get my numbers to work I'd need to
>>>> use 0xC0400000 to get sys_close to appear at 0xc047d341. And
>>>> viola, that seems to work! Or at least I got a reasonable breakpoint
>>>> from the 'target remote'
>>>
>>> It was an example. You had previously stated it was an offset of
>>> 0x600000 so it was a subtraction of 0x600000 from 0xc0000000.
>>>
>>> Jaosn.
>>>
>>> -------------------------------------------------------------------------
>>> This SF.net email is sponsored by: Microsoft
>>> Defy all challenges. Microsoft(R) Visual Studio 2005.
>>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>>> _______________________________________________
>>> Kgdb-bugreport mailing list
>>> Kgdb-bugreport@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport
>>>
>
>
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord@MIT.EDU PGP key available
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2007-09-28 23:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <sjmabr8j6d7.fsf@pgpdev.ihtfp.org>
[not found] ` <46FD03CD.9060404@windriver.com>
[not found] ` <sjmve9uj3d2.fsf@pgpdev.ihtfp.org>
[not found] ` <46FD1B6A.3000500@windriver.com>
[not found] ` <20070928114522.n0cdrcebykkgg408@webmail.mit.edu>
[not found] ` <46FD2CFB.9010404@windriver.com>
2007-09-28 21:45 ` [Kgdb-bugreport] Problem getting kgdb to read kernel symbols. addresses shifted? Pete/Piet Delaney
2007-09-28 22:18 ` Eric W. Biederman
2007-09-28 23:29 ` Derek Atkins [this message]
2007-09-28 23:40 ` Eric W. Biederman
2007-09-28 23:58 ` Derek Atkins
2007-09-29 0:32 ` Pete/Piet Delaney
2007-09-30 5:38 ` Vivek Goyal
2007-10-01 13:35 ` Dave Anderson
2007-10-01 18:44 ` Derek Atkins
2007-10-01 19:03 ` Dave Anderson
2007-10-01 20:35 ` Derek Atkins
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sjm641uid1x.fsf@pgpdev.ihtfp.org \
--to=warlord@mit.edu \
--cc=anderson@redhat.com \
--cc=ebiederm@xmission.com \
--cc=jason.wessel@windriver.com \
--cc=kexec@lists.infradead.org \
--cc=kgdb-bugreport@lists.sourceforge.net \
--cc=pete@bluelane.com \
--cc=vgoyal@in.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.