diff options
author | Alan Wu <[email protected]> | 2024-11-11 22:04:12 -0500 |
---|---|---|
committer | Alan Wu <[email protected]> | 2024-11-11 22:24:32 -0500 |
commit | c028bf0c7b97584bd4d104375b3f12aa55c240f9 (patch) | |
tree | 44ef2470cdedd5296befee5210fb08147e5ca7ab | |
parent | c7c73b22bb42ffae15211b8b9a4b5e0da2407271 (diff) |
.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
-rw-r--r-- | .gdbinit | 20 |
1 files changed, 3 insertions, 17 deletions
@@ -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 |