Thursday, May 26, 2011

GDB: Disassembly Syntax highlighting + CPP demangle

Here is a little GDB Skript, which enables syntax highlighting for disassemblings and demangles cpp-names:

shell mkfifo /tmp/colorPipe

define hook-disassemble
echo \n
shell cat /tmp/colorPipe | c++filt | highlight --syntax=asm -Oxterm256 &
set logging redirect on
set logging on /tmp/colorPipe
end

define hookpost-disassemble
set logging off
set logging redirect off
shell sleep 0.1s
end

define hook-quit
shell rm /tmp/colorPipe
end


It uses highlight and c++filt and is based on Expermintal GDB syntax highlighting by Michael Kelleher

No comments:

Post a Comment