diff --git a/Makefile b/Makefile index 6aafa22..10e5dd7 100644 --- a/Makefile +++ b/Makefile @@ -9,3 +9,10 @@ gui/fix_signals.so: gui/fix-signals.c clean: -rm SourceMe.py gui/fix_signals.so + +hack-gdbinit: + if test -f $$HOME/.gdbinit && `grep -q SourceMe $$HOME/.gdbinit`; then \ + :; \ + else \ + echo "source `pwd`/SourceMe.py" >> $$HOME/.gdbinit; \ + fi diff --git a/README b/README index 28e6e05..625ef2a 100644 --- a/README +++ b/README @@ -25,7 +25,9 @@ On Fedora I think this suffices: sudo yum install gdb python-devel gtksourceview3 pygobject3 After you install this, type "make". Now, start gdb and source the -"SourceMe.py" file. This sets everything up. +"SourceMe.py" file. This sets everything up. If you want it to +always be available, you can use "make hack-gdbinit", which will add +the appropriate "source" line to your ~/.gdbinit. This adds a new "gui" command to gdb. Currently the only subcommand is "gui source", which pops up a source window. The source window