https://github.com/plusls/gdb-fzf
Replace gdb default history searcher and auto complete with fzf fuzzy finder
https://github.com/plusls/gdb-fzf
gdb
Last synced: 12 months ago
JSON representation
Replace gdb default history searcher and auto complete with fzf fuzzy finder
- Host: GitHub
- URL: https://github.com/plusls/gdb-fzf
- Owner: plusls
- Created: 2023-04-13T08:50:57.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-14T07:28:55.000Z (about 3 years ago)
- Last Synced: 2025-04-12T09:53:40.399Z (about 1 year ago)
- Topics: gdb
- Language: Python
- Homepage:
- Size: 4.88 MB
- Stars: 21
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GDB with fzf python plugin
This is a patch for GDB that integrates [FZF fuzzy finder](https://github.com/junegunn/fzf) with GDB's history search and auto complete.

## Installation
1. install fzf
+ For Debian/Ubuntu: `apt install fzf`
2. Add `source {Your download path}/gdb-fzf.py` to `~/.gdbinit`
You can turn off feature by commenting out
```python
assert (libreadline.rl_bind_keyseq(b"\\C-r", fzf_search_history) == 0)
assert (libreadline.rl_bind_keyseq(b"\\t", fzf_auto_complete) == 0)
```
And you also can add your key binding.
## Better GDB auto complete
Add to `~/.inputrc`
Warning: **It will effect all programs that use libreadline**
```
"\e[A": "\e[A": history-search-backward
"\e[B": history-search-forward
```
## Infinite GDB history
Set up infinite GDB history. Should be added to `~/.gdbinit`.
```gdb
# https://stackoverflow.com/a/3176802/6824752
set history save on
set history size unlimited
set history remove-duplicates unlimited
set history filename ~/.gdb_eternal_history
```
## More completions
Set up GDB `max-completions`. Should be added to `~/.gdbinit`.
```
set max-completions 0x10000
```
## Reference
+ https://github.com/filipkilibarda/gdb_fzf_patch