This patch adds parts of the stack that should be useful for unwinding to the jThreadsInfo reply from lldb-server. We return the top of the stack (12 words), and we also try to walk the frame pointer linked list and return the memory containing frame pointer and return address pairs. The idea is to cover the cases with and without frame pointer omission.
Here are some questions:
- Does this approach sound reasonable?
- How do we test this?
- Is it fine if we do not handle the big-endian and 32-bit word cases? (There we will be basically never generate the frame list.)
I think it would be cleaner if this returned the json::Object as a return value (much like GetStackMemoryAsJSON returns a json::Array).