On May 8, 2017 7:40:49 AM PDT, Josh Poimboeuf <jpoim...@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.

Reply via email to