Skip to content

de-ugglify missing else if #38

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 30 additions & 37 deletions gdbinit
Original file line number Diff line number Diff line change
Expand Up @@ -127,47 +127,40 @@ set $COLOR_CPUFLAGS = $RED

# this is ugly but there's no else if available :-(
define color
if $USECOLOR == 1
# BLACK
if $arg0 == 0
echo \033[30m
else
# RED
if $USECOLOR == 1
# BLACK
if $arg0 == 0
echo \033[30m
end
# RED
if $arg0 == 1
echo \033[31m
else
# GREEN
if $arg0 == 2
echo \033[32m
else
# YELLOW
if $arg0 == 3
echo \033[33m
else
# BLUE
if $arg0 == 4
echo \033[34m
else
# MAGENTA
if $arg0 == 5
echo \033[35m
else
# CYAN
if $arg0 == 6
echo \033[36m
else
# WHITE
if $arg0 == 7
echo \033[37m
end
end
end
end
end
end
end
# GREEN
if $arg0 == 2
echo \033[32m
end
# YELLOW
if $arg0 == 3
echo \033[33m
end
# BLUE
if $arg0 == 4
echo \033[34m
end
# MAGENTA
if $arg0 == 5
echo \033[35m
end
# CYAN
if $arg0 == 6
echo \033[36m
end
# WHITE
if $arg0 == 7
echo \033[37m
end
end
end
end

define color_reset
Expand Down