| To: | Atsushi Nemoto <anemo@mba.ocn.ne.jp> |
|---|---|
| Subject: | Re: [PATCH] Remove mfinfo[64] used by get_wchan() |
| From: | Franck Bui-Huu <vagabon.xyz@gmail.com> |
| Date: | Fri, 18 Aug 2006 14:17:29 +0200 |
| Cc: | vagabon.xyz@gmail.com, ralf@linux-mips.org, linux-mips@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=jTDSFxNY/3aCam8F0JKxzjgzh4cxwznoSMvK6URqKuArkf9Tll34opK0jkPngE2hgVJmQ1GGhD5t6/XCOaqhLXfRWnq6dbic7Etg2nDpkmdSoQejG+Gy32rNswlLiiUCxeD/tlrvLqA5Ciwk95OV8NOhLK6Yjm9MPHERHtm7GcA= |
| In-reply-to: | <20060818.181136.85412687.nemoto@toshiba-tops.co.jp> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <44E57161.5060104@innova-card.com> <20060818.171558.89065994.nemoto@toshiba-tops.co.jp> <44E57F39.2020009@innova-card.com> <20060818.181136.85412687.nemoto@toshiba-tops.co.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 Fri, 18 Aug 2006 10:50:01 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com>
> wrote:
>> Does something like this seem correct ? If an exception occured on a first
>> instruction of a function, show_backtrace() will call get_frame_info()
>> with info->func_size != 0 but very small. In this case it returns 1.
>
> Why get_frame_info() will be called with info->func_size != 0 ? The
> offset of a _first_ instruction is 0, so "ofs" of this line in
> unwind_stack() will be 0.
>
> info.func_size = ofs; /* analyze from start to ofs */
>
because in unwind_stack(), before the line you showed, we do:
if (!kallsyms_lookup(pc, &size, &ofs, &modname, namebuf))
return 0;
if (ofs == 0)
return 0;
Maybe we should do instead:
if (!kallsyms_lookup(pc, &size, &ofs, &modname, namebuf))
return 0;
/* return ra if an exception occured at the first instruction */
if (ofs == 0)
return ra;
And in any cases, if we pass info->func_size = 0 to get_frame_info(),
then it will consider the function size as unknown.
Franck
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH] Remove mfinfo[64] used by get_wchan(), Atsushi Nemoto |
|---|---|
| Next by Date: | Re: [PATCH] Image capturing driver for Basler eXcite smart camera, Bill Davidsen |
| Previous by Thread: | Re: [PATCH] Remove mfinfo[64] used by get_wchan(), Atsushi Nemoto |
| Next by Thread: | Re: [PATCH] Remove mfinfo[64] used by get_wchan(), Atsushi Nemoto |
| Indexes: | [Date] [Thread] [Top] [All Lists] |