kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: miloody@gmail.com (loody)
To: kernelnewbies@lists.kernelnewbies.org
Subject: functions about dump backtrace function names in mips arch
Date: Mon, 3 Jan 2011 22:39:28 +0800	[thread overview]
Message-ID: <AANLkTimNYmzzx9QJLM+vAkRjR9aNPi3f0YpbGELXH-MT@mail.gmail.com> (raw)
In-Reply-To: <AANLkTi=B+bKGDDXxAXT3OEC0jD0GskxkB6Vq2x_z7xqd@mail.gmail.com>

hi:

2011/1/3 loody <miloody@gmail.com>:
> hi all:
>
> 2011/1/3 Sowmya Sridharan <sowmya.sridharan@tcs.com>:
>>
>> Hi,
>>
>> I was able to check it in 2.6.36 version of kernel, and it is defined in
>> traps.c.
>> http://lxr.linux.no/linux+v2.6.36/arch/mips/kernel/traps.c#L205
>>
>> dump_stack() calls show_backtrace function which had been show_trace in the
>> earlier kernel versions.
>> I compared between 2.6.14 and the latest version, and here are the
>> differences:
>> -------------------------------------------------------------------------------
>> http://lxr.linux.no/linux+v2.6.14/arch/mips/kernel/traps.c#L110
>> function: show_trace
>> ? ? ?while (!kstack_end(stack)) {
>> ? ? ? ? ? ? ? ? addr = *stack++;
>> ? ? ? ? ? ? ? ? if (__kernel_text_address(addr)) {
>> ? ? ? ? ? ? ? ? ? ? ? ? printk(" [<%0*lx>] ", field, addr);
>> ? ? ? ? ? ? ? ? ? ? ? ? print_symbol("%s\n", addr);
>> ? ? ? ? ? ? ? ? }
>> ? ? ? ? }
>> ---------------------------------------------------------------------------------
>> In the latest kernel, show_backtrace function is used, which does the same
>> thing, but through different functions
>> http://lxr.linux.no/linux+v2.6.36/arch/mips/kernel/traps.c#L126
>> function: show_backtrace
>> ? ? ? ? printk("Call Trace:\n");
>> ? ? ? ? ?do {
>> ? ? ? ? ? ? ? ? ?print_ip_sym(pc);
>> ? ? ? ? ? ? ? ? ?pc = unwind_stack(task, &sp, pc, &ra);
>> ? ? ? ? ?} while (pc);
>>
>>
>> Regards,
>> Sowmya
> thanks for your kind help, that is what I want.
> previously, I only see the address instead of function name, but after
> I select CONFIG_KALLSYMS as Y, I can see the function names also.
> BTW, what is the mechanism that kernel take to find out the function name?
from log such as:
<80128580>] do_softirq+0x48/0x68
i know 0x48 is the offset of do_softirq, but how can I locate precise
what the offset 0x48 of do_softirq is? "objdump -s"?
Regards,
miloody

  reply	other threads:[~2011-01-03 14:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AANLkTims5ejcB8hmH5nE3zR5R_57oF88x=NS438ZOM3V@mail.gmail.com>
2011-01-02  8:26 ` functions about dump backtrace function names in mips arch loody
2011-01-02  8:27   ` loody
2011-01-02 11:01   ` Mulyadi Santosa
2011-01-03  7:43     ` Sowmya Sridharan
2011-01-03 14:32       ` loody
2011-01-03 14:39         ` loody [this message]
2011-01-04  6:44         ` nilesh

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=AANLkTimNYmzzx9QJLM+vAkRjR9aNPi3f0YpbGELXH-MT@mail.gmail.com \
    --to=miloody@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /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;
as well as URLs for NNTP newsgroup(s).