[Lldb-commits] [PATCH] D131083: [lldb] Add assertStopReason helper	function
    Jonas Devlieghere via Phabricator via lldb-commits 
    lldb-commits at lists.llvm.org
       
    Wed Aug  3 11:41:55 PDT 2022
    
    
  
JDevlieghere marked an inline comment as done.
JDevlieghere added inline comments.
================
Comment at: lldb/packages/Python/lldbsuite/test/lldbutil.py:269-272
+    elif enum == lldb.eStopReasonInstrumentation:
+        return "instrumentation"
+    elif enum == lldb.eStopReasonProcessorTrace:
+        return "processortrace"
----------------
mib wrote:
> This is more a general comment, but I'm very annoyed at how C/C++ enums are exposed to Python ... Now every time we add a new value to the enum we need to remember to update these helper function. The comment is not related specifically to this patch but I think we can do a better job here.
I'm sure there's some kind of introspection API that would allow us to have the equivalent of a static_assert in C++. I'll add it to my list of nice-to-haves :-) 
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131083/new/
https://reviews.llvm.org/D131083
    
    
More information about the lldb-commits
mailing list