I'm trying to implement a GUI client for the GDB remote serial protocol. So far I'm just reading the documentation, but I couldn't find how to get threads' stack frame and local variable informations. How can I get this informations?
I am implementing UI. I think it's GDB (local) part.
It sounds like your quesiton is:
Given that I have stopped a process (controlled by gdbserver) somewhere, how do I find out where (in which function) it is stopped (i.e. what is the current stack frame), what local variables are live at that point (where are they in memory)?
The bad news: to answer above questions, you'll have to re-implement 30-50% of GDB. You could start here ("Finding variables" section in particular), but should probably read the entire series.