Re: [PATCH] dump_stack() based on prologue code analysis (take 2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Atsushi Nemoto wrote:
> On Mon, 31 Jul 2006 10:59:03 +0200, Franck Bui-Huu <vagabon.xyz@xxxxxxxxx> wrote:
>>
>> I pass regs to unwind_stack(), that simplify the caller because
>> it needn't to deal with leaf or nested case. Simply test for pc
>> is 0.
> 
> It seems a bit fragile.  The regs->regs[31] can be used for top of
> stack, but we should consider that get_frame_info() might return wrong
> result (again, get_frame_info() is not perfect).  If get_frame_info()
> returned 0 on middle level of the stack, taking regs->regs[31] leads
> wrong trace.  Maybe you can use NULL value as regs for non-toplevel.
> 

Yes get_frame_info() is not perfect in sense where it can't analyses
_all_ possible frames. But it should be able to detect these case at 
least.

		Franck


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux