From: Hui Zhu <teawater@gmail.com>
To: Hushan Jia <hushan.jia@gmail.com>
Cc: Paul Pluzhnikov <ppluzhnikov@google.com>,
gdb@sourceware.org, Jie Zhang <jie.zhang@analog.com>
Subject: Re: gdb symbol problem
Date: Mon, 28 Dec 2009 07:37:00 -0000 [thread overview]
Message-ID: <daef60380912272336l8c41a78p74783233fdbb2654@mail.gmail.com> (raw)
In-Reply-To: <4B385274.1000100@analog.com>
Maybe your address is a part of a LKM.
If so, find it out with "cat /proc/modules", and use gdb cmd
"add-symbol-file module_dir_name address" add symbol message to gdb.
Hui
On Mon, Dec 28, 2009 at 14:38, Jie Zhang <jie.zhang@analog.com> wrote:
> On 12/28/2009 01:09 PM, Hushan Jia wrote:
>>
>> On Mon, Dec 28, 2009 at 12:21 PM, Jie Zhang<jie.zhang@analog.com> wrote:
>>>
>>> On 12/28/2009 12:14 PM, Hushan Jia wrote:
>>>>
>>>> On Mon, Dec 28, 2009 at 10:38 AM, Jie Zhang<jie.zhang@analog.com>
>>>> wrote:
>>>>>
>>>>> On 12/27/2009 11:45 AM, Hushan Jia wrote:
>>>>>>
>>>>>> On Sun, Dec 27, 2009 at 11:36 AM, Paul Pluzhnikov
>>>>>> <ppluzhnikov@google.com> wrote:
>>>>>>>
>>>>>>> On Sat, Dec 26, 2009 at 6:16 PM, Hushan Jia<hushan.jia@gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> I invoke gdb like this:
>>>>>>>>
>>>>>>>> [hushan@hushan-t linux-2.6.31.3]$ gdb ./vmlinux
>>>>>>>
>>>>>>> Oh, you are not debugging a regular application. You probably should
>>>>>>> have mentioned that in your initial message.
>>>>>>
>>>>>> Sorry for forget the important information.
>>>>>>
>>>>> What's the output of "readelf -S vmlinux"?
>>>>
>>>> Hi, The output is:
>>>>
>>>> # readelf -S vmlinux
>>>> There are 77 section headers, starting at offset 0x3b569cc:
>>>>
>>>> Section Headers:
>>>> [Nr] Name Type Addr Off Size ES Flg
>>>> Lk
>>>> Inf Al
>>>> [ 0] NULL 00000000 000000 000000 00
>>>> 0
>>>> 0 0
>>>> [ 1] .text.head PROGBITS c1000000 001000 0000a9 00 AX
>>>> 0
>>>> 0 4
>>>> [ 2] .rel.text.head REL 00000000 3b575d4 000070 08
>>>> 75 1 4
>>>> [ 3] .text PROGBITS c10000c0 0010c0 291284 00 AX
>>>> 0
>>>> 0 32
>>>
>>> It seems the machine was not executing code of your vmlinux. The code in
>>> your vmlinux starts from 0xc1000000. But when you connected with GDB, the
>>> stopped PC was 0xc0467118, which was just ahead of code sections of your
>>> vmlinux. Is it possbile the linux kernel running in your qemu was not the
>>> one you told GDB?
>>
>> Hi, I compiled the kernel on the host machine, and then copy kernel
>> and modules files to the qemu virtual machine, they are the same
>> files.
>
> OK. Then you need to find out what's at the address 0xc0467118. GDB cannot
> show you the symbol and source line which it doesn't know. /proc/kallsyms
> might be helpful if that address is in kernel.
>
>> and the kgdb seems does not work, if I run c in gdb, then I cannot
>> interrupt it using CTRL-C, and the breakpoints are never hit.
>> The attached file is the kernel config, and kernel is
>> linux-2.6.31.3.tar.bz2, downloaded from kernel.org.
>>
> I have no idea about kgdb.
>
>
> Jie
>
next prev parent reply other threads:[~2009-12-28 7:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-23 4:48 Hushan Jia
2009-12-26 8:55 ` Paul Pluzhnikov
2009-12-27 2:16 ` Hushan Jia
2009-12-27 3:36 ` Paul Pluzhnikov
2009-12-27 3:45 ` Hushan Jia
2009-12-28 2:38 ` Jie Zhang
2009-12-28 4:14 ` Hushan Jia
2009-12-28 4:22 ` Jie Zhang
[not found] ` <e38b6a940912272109i48efc394u9985327575437f0f@mail.gmail.com>
2009-12-28 6:44 ` Jie Zhang
2009-12-28 7:37 ` Hui Zhu [this message]
2009-12-28 10:28 ` Hushan Jia
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=daef60380912272336l8c41a78p74783233fdbb2654@mail.gmail.com \
--to=teawater@gmail.com \
--cc=gdb@sourceware.org \
--cc=hushan.jia@gmail.com \
--cc=jie.zhang@analog.com \
--cc=ppluzhnikov@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox