Repository navigation
Conversation
A native node being debugged is held, not marked down, when a breakpoint stops it answering ticks: the rest of the run goes on and it catches up when let go. An emulated board is restarted with the emulator's GDB stub (QEMU -gdb on loopback, Renode StartGdbServer), optionally held at reset. The answer gives the attach command and a VS Code configuration; the row menu gains Debug this node. For #191.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For #191. This covers the three steps in the plan, except catching a native node at boot.
Native nodes
node.debug {node}returns the PID, the binary, whether it has symbols (debug,symbolsorstripped), agdb -pcommand line and a VS Codeattachconfiguration.engine/debug.go.sim.statereports the run as not reproducible after this, because the node's clock jumps.Emulated boards
node.debug {node, wait?, port?}restarts the board with the emulator's GDB stub: QEMU-gdb tcp:127.0.0.1:PORT(plus-Swithwait), Renodemachine StartGdbServer. It returns the gdb for the board's architecture and a VS Codelaunchconfiguration.offundoes either case.UI and docs
docs/debugging-firmware.md.Tested
waitthe PC is 0xa80 (held at reset), and it runs on after gdb detaches.?withT05.I used this to find #565: a breakpoint after the SoftDevice's
svc 0x28showedNRF_ERROR_FORBIDDEN.Not done: holding a native node before
setup(). It runs as soon as the process connects, so that needs a flag in meshcore-native.