Skip to content

Instantly share code, notes, and snippets.

@shihyu
Forked from KevinKu/gdb_python_command_example
Created September 29, 2016 18:22
Show Gist options
  • Save shihyu/6b99fe4094a2d655338662e22cc8253b to your computer and use it in GitHub Desktop.
Save shihyu/6b99fe4094a2d655338662e22cc8253b to your computer and use it in GitHub Desktop.
import gdb
import string
class test_gdb_python_command(gdb.Command):
"test help"
def __init__(self):
super(test_gdb_python_command,self).__init__("test_gdb_python_command",gdb.COMMAND_USER)
def invoke(self,arg,from_tty):
print("gdb test")
test_gdb_python_command()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment