linux-mips
[Top] [All Lists]

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

To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Subject: Re: [PATCH] dump_stack() based on prologue code analysis (take 2)
From: Franck Bui-Huu <vagabon.xyz@gmail.com>
Date: Tue, 01 Aug 2006 10:37:17 +0200
Cc: vagabon.xyz@gmail.com, linux-mips@linux-mips.org, ralf@linux-mips.org
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:reply-to:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:from; b=SPD8GsOvpgwP9Yqh9BUahGkELItC+lGVGI2Plu9qQqJ82qIejXcjbOLhKacQlnEhc7hVRq4clSBGOJZYwFv62xiVMlBG/w7b48/qRHQaa5gPlixZ5gDScX/zIyWBCaV307NsuAePgElm95oskVbkxFEQvT3BKw5+tcZAUWasWRo=
In-reply-to: <20060731.235626.86888625.anemo@mba.ocn.ne.jp>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20060729.232720.108740310.anemo@mba.ocn.ne.jp> <44CDC657.9090403@innova-card.com> <20060731.235626.86888625.anemo@mba.ocn.ne.jp>
Reply-to: Franck <vagabon.xyz@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Thunderbird 1.5.0.4 (X11/20060614)
Atsushi Nemoto wrote:
> On Mon, 31 Jul 2006 10:59:03 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> 
> 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

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [PATCH] dump_stack() based on prologue code analysis (take 2), Franck Bui-Huu <=