Created
February 1, 2013 23:48
-
-
Save bholt/4694985 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source ~/grappa/system/grappa_gdb.macros | |
# blue (gdb) prompt | |
set prompt \033[0;34m(gdb)\033[0m | |
shell mkfifo /tmp/bholt_gdb_color_pipe | |
define hook-backtrace | |
shell cat /tmp/bholt_gdb_color_pipe | sed -e 's/\(^#[0-9]*.*in \|^#[0-9]*\) \(.*\) \((.*)\)/\1 '$(echo -e '\033[0;33m')'\2 '$(echo -e '\033[0;36m')'\3'$(echo -e '\033[0m')'/' | sed -e 's/\/sampa\/home\/bholt\(\/.*:[0-9]*\)/'$(echo -e '\033[0;32m')'~\1'$(echo -e '\033[0m')'/' & | |
set logging redirect on | |
set logging on /tmp/bholt_gdb_color_pipe | |
end | |
define hookpost-backtrace | |
set logging off | |
set logging redirect off | |
shell sleep 0.1s | |
end | |
define hook-quit | |
shell rm /tmp/bholt_gdb_color_pipe | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment