functions about dump backtrace function names in mips arch
loody
miloody at gmail.com
Mon Jan 3 09:39:28 EST 2011
hi:
2011/1/3 loody <miloody at gmail.com>:
> hi all:
>
> 2011/1/3 Sowmya Sridharan <sowmya.sridharan at 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
More information about the Kernelnewbies
mailing list