-
Notifications
You must be signed in to change notification settings - Fork 856
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
Check if override built-in command #543
Conversation
Hey, thanks for the PR! I haven't yet looked into the code (will probably do it tomorrow) but I am up for a whitelist of commands that we accept to override. If something doesn't fill into the whitelist, I think we could just fail (i.e. raise an exception or even exit gdb?). |
Great, I updated the PR with the described behaviour. Any attempts to override anything other than the currently overridden commands: up, down, search, pwd and start will raise an exception. This is done with a hard-coded whitelist in the command class. If you prefer a more sophisticated way of doing it, please let me know. |
The TravisCI check fails due to unrelated whitespace issues fixed separately in #544 |
Uhm, I messed up with my git:ing, please hold. |
Ok, this should address all the points discussed. The solution for saving the pagination value is not beautiful but I didn't find a better way. |
Co-Authored-By: ZetaTwo <calle.svensson@zeta-two.com>
Thanks! |
Thanks for the merge and for a great project! |
This PR aims to start a discussion on #230
This code fetches current gdb command on start-up and stores them in a list in the Command class.
The question is what to do with this list. As an example, I simply print out a warning but this is not really desirable since it prints out warnings for intended behaviour and is not actionable for the end-user. Another way to go would be to have a whitelist of the currently overridden commands: up, down, search, pwd and start and abort/exit if you try to override any other.
Thoughts?