From: Franck Bui-Huu <vagabon.xyz@gmail.com>
To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: vagabon.xyz@gmail.com, ralf@linux-mips.org, linux-mips@linux-mips.org
Subject: Re: [PATCH] Remove mfinfo[64] used by get_wchan()
Date: Fri, 18 Aug 2006 14:17:29 +0200 [thread overview]
Message-ID: <44E5AFD9.1050101@innova-card.com> (raw)
In-Reply-To: <20060818.181136.85412687.nemoto@toshiba-tops.co.jp>
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
next prev parent reply other threads:[~2006-08-18 12:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-17 13:57 [PATCH] Remove mfinfo[64] used by get_wchan() Franck Bui-Huu
2006-08-18 2:52 ` Atsushi Nemoto
2006-08-18 7:50 ` Franck Bui-Huu
2006-08-18 8:15 ` Atsushi Nemoto
2006-08-18 8:50 ` Franck Bui-Huu
2006-08-18 9:11 ` Atsushi Nemoto
2006-08-18 12:17 ` Franck Bui-Huu [this message]
2006-08-18 14:04 ` Atsushi Nemoto
2006-08-18 14:13 ` Franck Bui-Huu
2006-08-18 14:41 ` Atsushi Nemoto
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44E5AFD9.1050101@innova-card.com \
--to=vagabon.xyz@gmail.com \
--cc=anemo@mba.ocn.ne.jp \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox