-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-120769: Add pdb meta command to print frame status. #120770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hi @iritkatriel , sorry about the back and forth on this matter. I thought |
Do you think it's worth it to backport this and fully remove the |
Yes, might as well. |
Using
w 0
is a neat trick but it messed up withcmd.Cmd
. We lost the last command with executing a valid command.I came up with a way to sneak in secret commands (what I call a meta command) without changing too much of the current structure. The meta commands will not be recorded by
cmd.Cmd
and we can do whatever we want with it.With this feature, we can unify the way to print the stack entry with or without the commands in
cmdqueue
.I also renamed
preloop
- that's only used for display and it is only supposed to be displayed when user input is expected ("stops in the current frame" according to the docs). The test coverage is not great but for now it will display while commands fromcmdqueue
are executing.The reason I changed
display
in a seemingly unrelated fix is because this is the way to ensure display still shows after stack entry print, not before.By unifying the way to print frame status, we can print more stuff per stop, like async/thread info.
Meta commands could be useful in the future for us to sneak in other secret commands without messing with the core cmdloop and the command completion.
w 0
on empty line when there are commands incmdqueue
#120769