|To:||David Daney <firstname.lastname@example.org>|
|Subject:||Re: [PATCH] dump_stack() based on prologue code analysis|
|From:||Nigel Stephens <email@example.com>|
|Date:||Fri, 28 Jul 2006 18:34:27 +0100|
|Cc:||Atsushi Nemoto <firstname.lastname@example.org>, email@example.com, firstname.lastname@example.org, email@example.com, firstname.lastname@example.org|
|References:||<20060727170305.GB4505@networkno.de> <email@example.com> <20060727191245.GD4505@networkno.de> <firstname.lastname@example.org> <44CA43EC.email@example.com>|
|User-agent:||Thunderbird 126.96.36.199 (X11/20060619)|
David Daney wrote:
Atsushi Nemoto wrote:On Thu, 27 Jul 2006 20:12:45 +0100, Thiemo Seufer <firstname.lastname@example.org> wrote:IOW, binary analysis can't be expected to provide full accuracy, but we can live with a reasonable approximation, I think.Yes, this is a starting point. The patch (and current mips get_wchan() implementation) tries to do is what I used to do to analyze stack dump by hand. 1. Determine PC and SP. 2. Disassemble a function containing the PC address. 3. If the function is leaf, make use RA for new PC.This was always the tricky part for me. How do you know if the function is a leaf?
I think that if you cannot find a store instruction which saves RA to the stack -- either because it's a real leaf and there is no such store, or because the PC hasn't yet reached the store instruction -- then in both cases it can be treated as a leaf.
|<Prev in Thread]||Current Thread||[Next in Thread>|
|Previous by Date:||Re: [PATCH] dump_stack() based on prologue code analysis, David Daney|
|Next by Date:||Re: [PATCH] dump_stack() based on prologue code analysis, David Daney|
|Previous by Thread:||Re: [PATCH] dump_stack() based on prologue code analysis, David Daney|
|Next by Thread:||Re: [PATCH] dump_stack() based on prologue code analysis, David Daney|
|Indexes:||[Date] [Thread] [Top] [All Lists]|