This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Misc/gdbinit: Expose command documentation to gdb help
Type: enhancement Stage: resolved
Components: Demos and Tools Versions: Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: belopolsky, dmalcolm, ned.deily, pitrou, skip.montanaro, zach.ware
Priority: normal Keywords: patch

Created on 2012-08-29 23:33 by belopolsky, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
gdbinit.diff belopolsky, 2012-08-29 23:33 review
Pull Requests
URL Status Linked Edit
PR 6384 merged skip.montanaro, 2018-04-05 09:35
PR 15021 merged The Compiler, 2019-07-30 11:24
PR 15744 merged zach.ware, 2019-09-09 09:22
Messages (7)
msg169424 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2012-08-29 23:33
Currently "help user-defined" lists commands defined in Misc/gdbinit without explanations


(gdb) help user-defined
User-defined commands.
The commands in this class are those defined by the user.
Use the "define" command to define a command.

List of commands:

lineno -- User-defined
printframe -- User-defined
pu -- User-defined
pyframe -- User-defined
pyframev -- User-defined
pyg -- User-defined

With attached patch, you get


List of commands:

lineno -- User-defined
printframe -- User-defined
pu -- Generally useful macro to print a Unicode string
pyframe -- User-defined
pyframev -- Print the current frame - verbose
pyg -- Prints a representation of the object to stderr
pylocals -- Print the local variables of the current frame
pyo -- Prints a representation of the object to stderr
pystack -- Print the entire Python call stack
pystackv -- Print the entire Python call stack - verbose mode

This should be further polished, but I wanted to hear from others before spending more effort.
msg199991 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-10-15 10:27
This looks like a good idea.
Of course, since we now have the python-gdb pluging which provides much more powerful diagnostics on modern gdbs, the usefulness of gdbinit is a bit reduced.
msg314973 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2018-04-05 09:42
This looks good to me. I added a pull request with a couple minor tweaks. Unfortunately, I can't tell how to add a "skip news" label. This doesn't seem "big" enough to warrant it.
msg314996 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-04-05 17:34
New changeset 7286dbd8b20bd0a26fabe1a07ff368082a9c5ed6 by Ned Deily (Skip Montanaro) in branch 'master':
bpo-15817: Expose command documentation to gdb help (GH-6384)
https://github.com/python/cpython/commit/7286dbd8b20bd0a26fabe1a07ff368082a9c5ed6
msg314997 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-04-05 17:35
Thanks everyone!
msg351368 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2019-09-09 09:06
New changeset 1f86fdcfc57270ee569cc58269a4e08afe7608ec by Zachary Ware (Florian Bruhin) in branch 'master':
bpo-15817: gdbinit: Document commands after defining them (GH-15021)
https://github.com/python/cpython/commit/1f86fdcfc57270ee569cc58269a4e08afe7608ec
msg351395 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2019-09-09 09:56
New changeset 14f7de72b62ec8e73a8a57b25ad8fef230dc6a3c by Zachary Ware in branch '3.8':
[3.8] bpo-15817: gdbinit: Document commands after defining them (GH-15021) (#15744)
https://github.com/python/cpython/commit/14f7de72b62ec8e73a8a57b25ad8fef230dc6a3c
History
Date User Action Args
2022-04-11 14:57:35adminsetgithub: 60021
2019-09-09 09:56:41zach.waresetmessages: + msg351395
2019-09-09 09:22:47zach.waresetpull_requests: + pull_request15398
2019-09-09 09:06:40zach.waresetnosy: + zach.ware
messages: + msg351368
2019-07-30 11:24:52The Compilersetpull_requests: + pull_request14782
2018-04-05 17:35:47ned.deilysetstatus: open -> closed
versions: + Python 3.8, - Python 3.7
messages: + msg314997

assignee: dmalcolm ->
resolution: fixed
stage: patch review -> resolved
2018-04-05 17:34:46ned.deilysetnosy: + ned.deily
messages: + msg314996
2018-04-05 09:45:12skip.montanarosetversions: + Python 3.7, - Python 3.4
2018-04-05 09:42:11skip.montanarosetnosy: + skip.montanaro
messages: + msg314973
2018-04-05 09:35:11skip.montanarosetstage: patch review
pull_requests: + pull_request6094
2013-10-15 10:27:03pitrousetnosy: + pitrou
messages: + msg199991
2013-10-14 14:00:28georg.brandlsetassignee: dmalcolm

nosy: + dmalcolm
2012-08-29 23:33:04belopolskycreate