[Lldb-commits] [lldb] [lldb] Parse and display register field enums (PR #95768)

Alex Langford via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 24 15:23:06 PDT 2024


https://github.com/bulbazord commented:

I'm a bit late to the party, I was out sick last week. :p

I think I understand this change and it looks fine to me overall.
One thing I noticed is that a lot of things that could be considered errors are only written to the logs and then are silently glossed over. That information is contained only within these parse functions, so it can't really be percolated back up and displayed to developers in any meaningful way. From a developer's perspective, something may just not work because the debug stub gave you invalid data and only by hunting in the logs can you determine what went wrong. Perhaps this could be changed (not in this PR) to return not only the parsed data but also some error information? Like some union of (ParsedData, ParsingErrors) and the callers can determine what to do with the error? The error could then be surfaced back in a meaningful way, like "hey the server gave me some bunk data so pretty-printing registers might look weird". What do you think?

https://github.com/llvm/llvm-project/pull/95768


More information about the lldb-commits mailing list