I'm working on getting a basic LLDB python extension up and running for use in VSCode.
Most things work, like I mentioned in the gist above, but I can't find type information for enums and tuples. Enum fields are currently just displayed as integers and tuple field names are missing altogether. This info used to be available in the NTI C variables using refc, but it is no longer generated for enums and tuples. I can get object type info using --deepcopy, but tuples and enums are ignored.
Is there a way I can get this information or modify the compiler to give me this information? I had a look in the compiler sources and found a line here that seemed promising, but even if I modify it to include tyEnum/tyTuple, it does not output RTTI for enums or tuples.
Maybe this means patching the generated object files. :-)
How does that work? Does Nim currently do this for other things?
How does that work? Does Nim currently do this for other things?
No, but there is no real alternative. A variable of type enum for example is just mapped to a numeric type and there is no RTTI involved. Or take closures for a better example. What is myvar in Nim is "really" env->myvar. We need a mechanism to patch the debug information.