* functions about dump backtrace function names in mips arch
@ 2011-01-02 8:12 loody
2011-01-02 8:26 ` loody
2011-01-02 9:59 ` Deng-Cheng Zhu
0 siblings, 2 replies; 9+ messages in thread
From: loody @ 2011-01-02 8:12 UTC (permalink / raw)
To: Linux MIPS Mailing List
Dear all:
If i remember correctly, when kernel panic there is a function I can
use to dump all the names of backtrace functions.
I have searched arch/mips/traps.c, but I only can see the dump
functions of cpu registers,
If my assumption is true, would anyone tell me what the name is or
what Doc I can looking for?
appreciate your help,
miloody
^ permalink raw reply [flat|nested] 9+ messages in thread
* functions about dump backtrace function names in mips arch
2011-01-02 8:12 functions about dump backtrace function names in mips arch loody
@ 2011-01-02 8:26 ` loody
2011-01-02 8:27 ` loody
2011-01-02 11:01 ` Mulyadi Santosa
2011-01-02 9:59 ` Deng-Cheng Zhu
1 sibling, 2 replies; 9+ messages in thread
From: loody @ 2011-01-02 8:26 UTC (permalink / raw)
To: kernelnewbies
?Dear all:
?If i remember correctly, when kernel panic there is a function I can
?use to dump all the names of backtrace functions.
?I have searched arch/mips/traps.c, but I only can see the dump
?functions of cpu registers,
?If my assumption is true, would anyone tell me what the name is or
?what Doc I can looking for?
?appreciate your help,
miloody
^ permalink raw reply [flat|nested] 9+ messages in thread
* functions about dump backtrace function names in mips arch
2011-01-02 8:26 ` loody
@ 2011-01-02 8:27 ` loody
2011-01-02 11:01 ` Mulyadi Santosa
1 sibling, 0 replies; 9+ messages in thread
From: loody @ 2011-01-02 8:27 UTC (permalink / raw)
To: kernelnewbies
?Dear all:
?If i remember correctly, when kernel panic there is a function I can
?use to dump all the names of backtrace functions.
?I have searched arch/mips/traps.c, but I only can see the dump
?functions of cpu registers,
?If my assumption is true, would anyone tell me what the name is or
?what Doc I can looking for?
?appreciate your help,
miloody
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: functions about dump backtrace function names in mips arch
2011-01-02 8:12 functions about dump backtrace function names in mips arch loody
2011-01-02 8:26 ` loody
@ 2011-01-02 9:59 ` Deng-Cheng Zhu
1 sibling, 0 replies; 9+ messages in thread
From: Deng-Cheng Zhu @ 2011-01-02 9:59 UTC (permalink / raw)
To: loody; +Cc: Linux MIPS Mailing List
stacktrace.c?
在 2011年1月2日星期日,loody <miloody@gmail.com> 写道:
> Dear all:
> If i remember correctly, when kernel panic there is a function I can
> use to dump all the names of backtrace functions.
> I have searched arch/mips/traps.c, but I only can see the dump
> functions of cpu registers,
>
> If my assumption is true, would anyone tell me what the name is or
> what Doc I can looking for?
> appreciate your help,
> miloody
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* functions about dump backtrace function names in mips arch
2011-01-02 8:26 ` loody
2011-01-02 8:27 ` loody
@ 2011-01-02 11:01 ` Mulyadi Santosa
2011-01-03 7:43 ` Sowmya Sridharan
1 sibling, 1 reply; 9+ messages in thread
From: Mulyadi Santosa @ 2011-01-02 11:01 UTC (permalink / raw)
To: kernelnewbies
On Sun, Jan 2, 2011 at 15:26, loody <miloody@gmail.com> wrote:
> ?Dear all:
> ?If i remember correctly, when kernel panic there is a function I can
> ?use to dump all the names of backtrace functions.
> ?I have searched arch/mips/traps.c, but I only can see the dump
> ?functions of cpu registers,
In x86, it's dump_stack(). The definition can be read here online:
http://lxr.linux.no/#linux+v2.6.36/arch/x86/kernel/dumpstack.c#L198
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* functions about dump backtrace function names in mips arch
2011-01-02 11:01 ` Mulyadi Santosa
@ 2011-01-03 7:43 ` Sowmya Sridharan
2011-01-03 14:32 ` loody
0 siblings, 1 reply; 9+ messages in thread
From: Sowmya Sridharan @ 2011-01-03 7:43 UTC (permalink / raw)
To: kernelnewbies
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
kernelnewbies-bounces at kernelnewbies.org wrote on 01/02/2011 04:31:08 PM:
> [image removed]
>
> Re: functions about dump backtrace function names in mips arch
>
> Mulyadi Santosa
>
> to:
>
> loody
>
> 01/02/2011 04:33 PM
>
> Sent by:
>
> kernelnewbies-bounces at kernelnewbies.org
>
> Cc:
>
> Kernel Newbies
>
> On Sun, Jan 2, 2011 at 15:26, loody <miloody@gmail.com> wrote:
> > Dear all:
> > If i remember correctly, when kernel panic there is a function I can
> > use to dump all the names of backtrace functions.
> > I have searched arch/mips/traps.c, but I only can see the dump
> > functions of cpu registers,
>
> In x86, it's dump_stack(). The definition can be read here online:
> http://lxr.linux.no/#linux+v2.6.36/arch/x86/kernel/dumpstack.c#L198
>
> --
> regards,
>
> Mulyadi Santosa
> Freelance Linux trainer and consultant
>
> blog: the-hydra.blogspot.com
> training: mulyaditraining.blogspot.com
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110103/de8495d7/attachment.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* functions about dump backtrace function names in mips arch
2011-01-03 7:43 ` Sowmya Sridharan
@ 2011-01-03 14:32 ` loody
2011-01-03 14:39 ` loody
2011-01-04 6:44 ` nilesh
0 siblings, 2 replies; 9+ messages in thread
From: loody @ 2011-01-03 14:32 UTC (permalink / raw)
To: kernelnewbies
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?
Regards,
miloody
^ permalink raw reply [flat|nested] 9+ messages in thread
* functions about dump backtrace function names in mips arch
2011-01-03 14:32 ` loody
@ 2011-01-03 14:39 ` loody
2011-01-04 6:44 ` nilesh
1 sibling, 0 replies; 9+ messages in thread
From: loody @ 2011-01-03 14:39 UTC (permalink / raw)
To: kernelnewbies
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* functions about dump backtrace function names in mips arch
2011-01-03 14:32 ` loody
2011-01-03 14:39 ` loody
@ 2011-01-04 6:44 ` nilesh
1 sibling, 0 replies; 9+ messages in thread
From: nilesh @ 2011-01-04 6:44 UTC (permalink / raw)
To: kernelnewbies
On Mon, 2011-01-03 at 22:32 +0800, loody wrote:
> 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.
[...]
> >
> >
[...]
> > 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?
Enabling the config option, it allows to build the symbol table for
kernel. It uses /proc/kallsyms.
Below links could help:
http://tldp.org/HOWTO/Module-HOWTO/x627.html
http://fixunix.com/kernel/134739-proc-kallsyms-symbol-size.html
> Regards,
> miloody
--
Thanks,
Nilesh
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-01-04 6:44 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-02 8:12 functions about dump backtrace function names in mips arch loody
2011-01-02 8:26 ` 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
2011-01-04 6:44 ` nilesh
2011-01-02 9:59 ` Deng-Cheng Zhu
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.