You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a lldb and gdb pretty printer for cuda::std::array.
The printer should live under libcudacxx/share/libcudacxx/<debugger>/array.py for each debugger.
In addition, the pretty printers should be exhaustively tested, with tests living under libcudacxx/test/debugging/array. See the existing tests in that directory for inspiration.
I hit a name collision implementing the LLDB side. array is a builtin in LLDB's embedded Python, so import array in lldb/__init__.py resolves to the stdlib module instead of the local file:
(lldb) script import sys; print("array" in sys.builtin_module_names)
True
sys.path.insert (as gdb/__init__.py does) does not help here; I checked, and the script directory is already ahead of stdlib on sys.path. GDB is unaffected.
The resulting AttributeError aborts __lldb_init_module before type category enable cccl, so all LLDB formatters go inactive, not just this one.
I have it working by naming the LLDB module std_array.py, with gdb/array.py as specified. Let me know if you would rather it were handled differently.
Activity
pieroevcc commentedon Jul 28, 2026
Hi, I'd like to take a shot at this!
pieroevcc commentedon Jul 28, 2026
Hi, @Jacobfaib,
I hit a name collision implementing the LLDB side.
arrayis a builtin in LLDB's embedded Python, soimport arrayinlldb/__init__.pyresolves to the stdlib module instead of the local file:sys.path.insert(asgdb/__init__.pydoes) does not help here; I checked, and the script directory is already ahead of stdlib onsys.path. GDB is unaffected.The resulting AttributeError aborts
__lldb_init_modulebeforetype category enable cccl, so all LLDB formatters go inactive, not just this one.I have it working by naming the LLDB module
std_array.py, withgdb/array.pyas specified. Let me know if you would rather it were handled differently.