Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

84.4. gef-2026.01

GDB extension with context, heap and ROP views

2026.01-2 · MIT · 0.1 SBU · 1.2 MiB, 4 files · 41_system, 374 of 1047 · ports/core/devtools/gef

Homepage: https://hugsy.github.io/gef/

Why it is in KDOS. The comment above it in script/phases/41_system/packages.d/devtools.txt:

A single .py file that makes a gdb crash readable; the ported gdb is already --with-python, so it costs one file and nothing else.

Depends on: gdb, python3.

Required by: no port names it.

Sources: gef-2026.01.py. Every step kpkg takes applies to this port.

Install: script/chroot/exec.sh bash -c 'source script/phases/41_system/phase.env && kpkg install gef'

build.sh:

install -Dm644 "$PORT_SRC/$name-$version.py" $PKG/usr/share/gef/gef.py
install -d $PKG/usr/share/licenses/$name
head -n 50 "$PORT_SRC/$name-$version.py" > $PKG/usr/share/licenses/$name/LICENSE

install -d $PKG/usr/share/doc/gef
cat > $PKG/usr/share/doc/gef/README.kdos << 'EOF'
gef is installed at /usr/share/gef/gef.py and is NOT enabled by default,
because it replaces gdb's entire prompt and a session that wanted plain gdb
would have no way back.

To use it once:      gdb -q -x /usr/share/gef/gef.py <program>
To use it always:    echo 'source /usr/share/gef/gef.py' >> ~/.gdbinit
EOF

Directories: /usr/share/doc/gef, /usr/share/gef, /usr/share/licenses/gef.