lkml.org 
[lkml]   [2017]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 7/7] DWARF: add the config option
From
On May 8, 2017 7:40:49 AM PDT, Josh Poimboeuf <jpoimboe@redhat.com> wrote:
>On Sun, May 07, 2017 at 10:35:28PM -0700, Andy Lutomirski wrote:
>> I think that, if the code were sufficiently robust, it would be handy
>> if the unwinder displayed function arguments. DWARF can do that to a
>> limited extent.
>
>Honestly I get the feeling that displaying function arguments wouldn't
>be realistic (DWARF or no DWARF). On x86-64, arguments are passed in
>registers, so tracking down their values is a lot more involved than
>just looking at the stack.
>
>The DWARF CFI only shows you the callee-saved registers. To figure out
>the other registers you'd have to dive into the other DWARF sections
>and
>examine previous stack frames for clues. I think it's not a
>deterministic process, based on how often I see gdb complain with
>'<value optimized out>'. I'd bet it's a lot harder than a basic stack
>dump.
>
>Also, most kernel functions rely on pointer arguments, which are pretty
>much useless without dumping the contents of the structs they point to.
>But then doing that properly would be a whole new level of difficulty.

At some point you are just reinventing k(g)db...
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

\
 
 \ /
  Last update: 2017-05-10 21:16    [W:0.142 / U:1.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site