linux-mips
[Top] [All Lists]

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

To: vagabon.xyz@gmail.com
Subject: Re: [PATCH] dump_stack() based on prologue code analysis
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Sat, 29 Jul 2006 01:01:37 +0900 (JST)
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org
In-reply-to: <cda58cb80607271203u70b26e23o65b71d3d0c900f94@mail.gmail.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20060726.232231.59465336.anemo@mba.ocn.ne.jp> <44C8CEA4.20000@innova-card.com> <cda58cb80607271203u70b26e23o65b71d3d0c900f94@mail.gmail.com>
Sender: linux-mips-bounce@linux-mips.org
On Thu, 27 Jul 2006 21:03:07 +0200, "Franck Bui-Huu" <vagabon.xyz@gmail.com> 
wrote:
> > > +     info.func = (void *)(pc - ofs);
> > > +     info.func_size = ofs;   /* analyze from start to ofs */
> 
> in get_frame_info(), there is the following condition to stop the
> prologue analysis
> 
>               if (info->func_size && i >= info->func_size / 4)
>                       break;
> 
> Setting info.func_size = ofs may trigger this stop condition very
> early, specially if "ofs" is small...I would simply remove this
> condition since it's very empirical and IMHO not very usefull.

Yes, that is what I wanted.  Imagine if a exception happened on first
place on non-leaf function.  In this case, we must assume the function
is leaf since RA is not saved to the stack.

---
Atsushi Nemoto

<Prev in Thread] Current Thread [Next in Thread>