bpo-15817: gdbinit: Document commands after defining them by The-Compiler · Pull Request #15021 · python/cpython (original) (raw)
The gdb manual says the following for "document":
The command commandname must already be defined.
And indeed when trying to use the gdbinit file with gdb 8.3, I get:
.../cpython/Misc/gdbinit:17: Error in sourced command file:
Undefined command: "pyo". Try "help".
Fix this by moving all documentation blocks after the define blocks.
This was introduced in GH-6384 (cc @smontanaro / @abalkin).
(Note that the diff algorithm gets a bit confused by those changes - try running git diff --histogram
for a more understandable output. Also, note I took the freedom to re-use the issue number of the original implementation, hope that's okay.)