[lldb] Dynamically generate enum names in lldbutil

Change the `<enum>_to_str` functions in lldbutil to be dynamic.

Instead of a manually maintained if/elif switch, the functions now perform
lookup in a dynamically generated dict. The names are determined by stripping
the enum's prefix, and then lowercasing the remaining suffix, ex:

    eStateRunning -> "running"

Differential Revision: https://reviews.llvm.org/D131138

GitOrigin-RevId: e49c1568b6160f9a02da3295ac0d5c684fb64201
1 file changed