Skip to content

Document GDB source-level debugging for JIT mode on Linux#196

Merged
ASDAlexander77 merged 1 commit into
mainfrom
docs/gdb-jit-debugging
Jul 10, 2026
Merged

Document GDB source-level debugging for JIT mode on Linux#196
ASDAlexander77 merged 1 commit into
mainfrom
docs/gdb-jit-debugging

Conversation

@ASDAlexander77

Copy link
Copy Markdown
Owner

Summary

  • Adds a README section explaining how to attach GDB to tslang and get source-level breakpoints/stepping in JIT-compiled TypeScript on Linux, using the existing GDB JIT registration in the LLJIT object linking layer.
  • Documents the two requirements (--di for debug info, no --opt since GDB registration is only enabled without optimizations) and notes the debugger; statement as an alternative trap-based breakpoint.

Test plan

  • Manually verified the documented workflow: gdb --args tslang --di hello.ts, set a pending breakpoint on a .ts line, ran, and confirmed GDB stopped at the correct TypeScript source line with line context shown.

Explains the required flags (--di, no --opt) and walks through
attaching GDB to breakpoint on TypeScript source lines in JIT'd code,
using the existing GDB JIT registration already wired into the LLJIT
object linking layer.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ASDAlexander77
ASDAlexander77 merged commit 4a8d9e0 into main Jul 10, 2026
2 checks passed
@ASDAlexander77
ASDAlexander77 deleted the docs/gdb-jit-debugging branch July 10, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant