Argentum got a Debugger v0

In the first version of the Debugger :

  • it handles break points,
  • it allows to step by program,
  • it inspects call stacks,
  • it shows all kinds of local variables,
  • including lambda capture blocks.
Argentum got a Debugger.

So far debugger is available only in Argentum compiler built from sources.

This is the way to build *.ag application with debug info (and with no optimizations):

agc -g -src D:\argentum-demo\src -start graph -o graph.obj
lld-link.exe -debug -libpath:"argentum-demo\libs" graph.obj ag_runtime.lib

This debug info is lldb/dwarf compatible, so it can be used with most of the debuggers.

lldb graph.exe
(lldb) b
(lldb) r
   25           getOrCreateNode = () {
-> 26               name = in.getCh();
   27               byNames[name] : {
(lldb) v
(cap_ag_m_graph_Graph_graph_fromStr *) parent_closure = 0x0000005c606ffcd8
(long long) name = 396754943216

VSCode integration requires CodeLLDB or similar extension.

So far debug info doesn't include object inspector data. It's still work in progress, so Debugger Part 2 is coming.

Leave a Reply

Your email address will not be published. Required fields are marked *