Skip to content

Current status of debugging on flambda‐backend

Mark Shinwell edited this page Jan 9, 2025 · 2 revisions

Each feature is classified as follows with respect to its behaviour in the version of lldb under the ocaml-flambda org on Github:

  • Prod = Should work reliably without extra build settings, may be minor bugs
  • Beta = Should work but extra build settings needed, with likely increased build artifact size, together with a much higher risk of bugs (but no changes to code generation)
  • Alpha = worse than Beta, potential large artifact size increases, likely very buggy
  • POC fb = a proof-of-concept on flambda-backend exists
  • POC old = a proof-of-concept on mshinwell's old (2018 vintage) branch exists
  • Zero = nothing done for the feature yet at all

A question mark means that the feature is probably in the given classification, but needs checking. Footnote numbers are explained below the table.

Feature Prod Beta Alpha POC fb POC old Zero
Run, interrupt and continue execution x
Set a breakpoint on a function by mangled name x
...with tab completion ? x
Set a breakpoint on a function by demangled name x[1]
...with tab completion x[1][3] x
Set a breakpoint by source file and line number x
...with tab completion
Column numbers may be used when setting breakpoints ?
Get a backtrace with mangled names, OCaml frames x
Get a backtrace with mangled names, mixed C/OCaml frames x
Get a backtrace with demangled names, OCaml frames x[1]
Get a backtrace with demangled names, mixed C/OCaml frames x
OCaml inlined frames are shown in backtraces x[1]
Column numbers are shown in backtraces x
See names and raw values of available variables x[2]
...with tab completion ?
See names and raw values of only those variables in scope x
...with tab completion ?
See statically-allocated values x
...with tab completion ?
Values of simple types can be printed properly x x
Values of complex types can be printed properly kinda
Installation of user-provided printers in the debugger x
Set a watchpoint on an OCaml mutable value kinda
Evaluate a simple OCaml expression kinda
Evaluate an arbitrary OCaml expression x
Use OCaml expressions as break/watchpoint conditions
Rebuild optimized-out values so they can be shown x
Extend live ranges so more variables can be seen x
Use previous frames to deduce poly type instantiation kinda
Use known tail call information to improve backtraces x

[1] Needs -gdwarf-inlined-frames. Some functions still appear with mangled names which is a bug.

[2] Needs -gno-upstream-dwarf

[3] Has some limitations, e.g. no disambiguation between anon functions