[PATCH] arm: show_regs dump stack when ARM_UNWIND enable

ye janboe janboe.ye at gmail.com
Tue Jul 20 11:54:17 EDT 2010


Yes. both are same.

Is it ok to remove backtrace.S if ARM_UNWIND is enable?

Catalin

Is it ok to merge this patch first and then try replace __bactrace in
next patch?

Janboe

2010/7/20 Catalin Marinas <catalin.marinas at arm.com>:
> On Tue, 2010-07-20 at 23:24 +0800, janboe wrote:
>> __backtrace is empty when ARM_UNWIND enable, so instead dump_stack
>>
>> Signed-off-by: janboe <janboe.ye at gmail.com>
>> ---
>>  arch/arm/kernel/process.c |    4 ++++
>>  1 files changed, 4 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
>> index acf5e6f..e7ad878 100644
>> --- a/arch/arm/kernel/process.c
>> +++ b/arch/arm/kernel/process.c
>> @@ -271,7 +271,11 @@ void show_regs(struct pt_regs * regs)
>>       printk("\n");
>>       printk("Pid: %d, comm: %20s\n", task_pid_nr(current), current->comm);
>>       __show_regs(regs);
>> +#ifdef CONFIG_ARM_UNWIND
>> +     dump_stack();
>> +#else
>>       __backtrace();
>> +#endif
>>  }
>
> It looks like both dump_stack() and __backtrace() (with FRAME_POINTER)
> have pretty much the same semantics. Maybe we could define __backtrace()
> to just call dump_stack() when ARM_UNWIND.
>
> --
> Catalin
>
>



More information about the linux-arm-kernel mailing list