godebug
godebug copied to clipboard
Return and quit commands
- Return from the current function
- Quit the program
Any plans for these?
Sure. Quit is really easy, so I've already added it. Return shouldn't be much harder, and is also useful.
Return from current function: what should the command be called? @glycerine says that it is "fin" in gdb. pdb calls this "return". pdb also has "up" and "down" commands that let you move up and down the stack, so that "up" and then "next" does almost the same thing as "return".
Thoughts? I think I prefer pdb's scheme.
I would name it "return" because it's self-documenting, and on the off-chance this is ever localized, it doesn't make sense to use a French word where English is used everywhere else.
It's been a while since I used pdb, but I thought up and down let you examine other stack frames, but didn't affect execution?
Right, up and down don't affect execution, which is cool. I mentioned them because "up" followed by "next" is similar to "return".
I prefer "return", too. @glycerine, does that sound good to you?
@jeremyschlatter I don't mind 'return' -- as long as the short to type abbreviation 'r' also suffices to the same effect!
@glycerine Of course :)