jasonmolenda wrote:

btw @labath I was thinking about "sigtramp routines" and fault / trap / 
interrupt handlers in general, and how lldb has this list of function names 
that it treats as fault handlers (`target.trap-handler-names`).  And in the 
unwinder we have the same idea of "the frame above a designed 
sigtramp/fault/trap/interrupt function can retrieve all registers".  

But what if the unwinder had a method saying "Do you have an unwind rule to 
give me a value for register n, without iterating down the stack?"   e.g. frame 
5 is interrupted and frame 4 is sigtramp, with full eh_frame.  From frame 5, I 
can say "does frame 4 have an unwind rule to provide x0, without iterating down 
to frame 3, etc."   This also means if we have a sigtramp which is missing its 
eh_frame, we won't apply our "all registers available" rules to the frame above.

An interesting case for a return-address target like aarch64 where normally 
when we ask for a caller frame's pc, we fetch the link register.  But above a 
fault/trap/interrupt frame, we can retrieve both the pc and the link register 
and they are different values.

Just something I started kicking around in my head, I don't have concrete plans 
to implement an overhaul like this but the more I think about it, the more I 
like it.

https://github.com/llvm/llvm-project/pull/92503
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to