gdb is particularly troubled with our nix setup. This issue will document the known issues as well as the current workarounds until a permanent fix is implemented.
There's decent odds I do not fully understand the underlying issues, so take the explanations with a grain of salt.
gdb lacks debug information
A default dojo install gdb will fail to break at libc symbols and will silently fail to run simple gdb scripts.
Fix: Add the following line to .gdbinit
set debug-file-directory /tmp/debug
gdb is not referencing the correct libc
Some libc symbols (example rev 19.0, memcpy), gdb will set a breakpoint, but it is at the incorrect address. As an immediate workaround a breakpoint can be set at the call site, or some other related location, but this functionality should behave as expected.
Fix: Specify the correct shared library path in .gdbinit
gdb
is particularly troubled with our nix setup. This issue will document the known issues as well as the current workarounds until a permanent fix is implemented.There's decent odds I do not fully understand the underlying issues, so take the explanations with a grain of salt.
gdb lacks debug information A default dojo install
gdb
will fail to break at libc symbols and will silently fail to run simple gdb scripts.Fix: Add the following line to
.gdbinit
gdb is not referencing the correct libc Some libc symbols (example rev 19.0,
memcpy
),gdb
will set a breakpoint, but it is at the incorrect address. As an immediate workaround a breakpoint can be set at the call site, or some other related location, but this functionality should behave as expected.Fix: Specify the correct shared library path in
.gdbinit