The project adds native Fortran debugging support to LLDB, addressing a gap in tooling as Flang matures. Previously, LLDB could resolve basic breakpoints from line tables but could not interpret Fortran types and values. The implementation introduces a Fortran type system, a DWARF parser, and a language plugin, with support for INTEGER, REAL, LOGICAL, and COMPLEX values, functions and subroutines, pointers, and explicit arrays. It can display variables in Fortran-aware formats, including complex numbers as real-and-imaginary pairs, and parse function signatures and frame bounds so local variables can be found. Pointer output works, though symbols may remain mangled because LLDB does not yet use Flang’s demangler.
The design keeps Fortran-specific behavior inside the language plugin rather than changing LLDB’s core: arrays use synthetic children, and case handling relies on DWARF attributes. Array support must account for custom bounds and strides, column-major storage, and Fortran’s restriction against partially indexing multidimensional arrays. Expression evaluation through Flang is deferred, and LLDB does not link directly to Flang; tests need only an installed Fortran compiler. Development was divided into reviewable changes, backed by C++ unit tests and Python API tests, with planned buildbot coverage on x86_64 and AArch64. The implementation is available on a personal branch while upstream integration continues.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.