[lldb-dev] [RFC] OS awareness in LLDB

Alexander Polyakov via lldb-dev lldb-dev at lists.llvm.org
Tue Apr 9 10:25:39 PDT 2019


Gentle ping.

On Wed, Apr 3, 2019 at 8:05 PM Alexander Polyakov <polyakov.alx at gmail.com>
wrote:

> Hi lldb-dev,
>
> Currently I'm working on an OS plug-in for multiple operating systems and
> architectures, during my work, I noted a few moments I want to discuss with
> the community.
>
> 1) Adding RegisterContext to SB API:
>     if you want your OS plug-in to support multiple architectures you need
> to implement
>     things like *get_register_info, get_register_data...* for each
> architecture.
>     In my mind, we could do that using RegisterContext, for example:
>     *get_register_info* could just call
> RegisterContext::GetRegisterContextAtIndex(idx), the number
>     of registers could be obtained from
> RegisterContext::GetRegisterCount();
>     *get_register_data *could return SBRegisterContext instead of just
> bytes, then the process of
>     fetching the register values might look as: for each register
>     SBRegisterContext::WriteRegister(reg_info, reg_value).
>     Please correct me if I'm missing something.
>
> 2) New lldb-mi command: -info-os
>     the gdb-mi documentation defines this command and there is a problem
> with it. To fully
>     implement it, we should be able to get CPU ID a thread is running on,
> but lldb
>     does not have an abstraction for CPU ID at all, so it becomes unreal
> at least for now.
>     I'm going to partly implement this command for Zephyr (e.g. return
> some value to indicate
>     that the CPU ID is undefined) and I want to know if the community is
> interested in implementing
>     that command inside lldb-mi (at least in part).
>
> --
> Alexander
>


-- 
Alexander
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20190409/45a64c21/attachment.html>


More information about the lldb-dev mailing list