mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
.gdbinit: Have rp() work without a target [ci skip]
Useful for core dumps. It used to not work because: (gdb) p !"" evaluation of this expression requires the target program to be active (gdb) p 0 == "" evaluation of this expression requires the target program to be active
This commit is contained in:
parent
c7c73b22bb
commit
c028bf0c7b
1 changed files with 3 additions and 17 deletions
20
.gdbinit
20
.gdbinit
|
@ -1,21 +1,7 @@
|
|||
define hook-run
|
||||
set $color_type = 0
|
||||
set $color_highlite = 0
|
||||
set $color_end = 0
|
||||
end
|
||||
|
||||
define ruby_gdb_init
|
||||
if !$color_type
|
||||
set $color_type = "\033[31m"
|
||||
end
|
||||
if !$color_highlite
|
||||
set $color_highlite = "\033[36m"
|
||||
end
|
||||
if !$color_end
|
||||
set $color_end = "\033[m"
|
||||
end
|
||||
if ruby_dummy_gdb_enums.special_consts
|
||||
end
|
||||
init-if-undefined $color_type = "\033[31m"
|
||||
init-if-undefined $color_highlite = "\033[36m"
|
||||
init-if-undefined $color_end = "\033[m"
|
||||
end
|
||||
|
||||
# set prompt \033[36m(gdb)\033[m\040
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue