From f0f12d4294e8a291bb290e5e1d880b746b927ece Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Fri, 13 Aug 2021 18:22:27 +0530 Subject: [PATCH] fish: Add helpers for easing work with gdb --- fish/.config/fish/config.fish | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/fish/.config/fish/config.fish b/fish/.config/fish/config.fish index 6c19917..613182e 100644 --- a/fish/.config/fish/config.fish +++ b/fish/.config/fish/config.fish @@ -340,6 +340,19 @@ function dotg --description "Generate gstreamer dot graph for selected file" mv "$result".svg ~/Pictures/gstreamer end +function gdba --description "Attach to a process" + gdb attach -p (ps -e | fzf | awk '{print $1}' | head -1) +end + +function gdbp --description "Attach to a python process" + gdb python3 (ps -e | fzf | awk '{print $1}' | head -1) +end + +function pst --description "Show process tree of a process" + set proc (ps -e | fzf | awk '{print $1}' | head -1) + pstree -H $proc $proc +end + fzf_key_bindings starship init fish | source