Elektrine lite

← Feed

@ole@chaos.social

Post #2419294

2026-03-19 09:23 UTC

I didn’t know binaries could embed LLDB-specific bytecode for formatting custom data types nicely in the debugger, as shown in this swift-collections PR: https://github.com/apple/swift-collections/pull/607. The code also uses fancy new Swift features to place the bytecode in a specific linker section: @⁠section(".lldbformatters") @⁠used let __BasicContainers___RigidArray______formatter: (UInt8, UInt8, …, UInt8) = …

Replies (1)

  • @gfoster@hachyderm.io 2026-03-19 13:52

    @ole@chaos.social It looks like this is what the @DebugDescription macro ends up adding, which is pretty neat when I can get it to work correctly...

    Open ##2753900