Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
kgdb(1) script for clearing VV_TEXT flag from every vnode in kFreeBSD
# This file has no copyright assigned and is placed in the Public Domain.
# No warranty is given.
# Usage: kgdb -w < clear-all-vnodes-text-flag.gdb
set $p = mountlist.tqh_first
while $p != 0
set $v = $p->mnt_nvnodelist.tqh_first
while $v != 0
if $v->v_type == VREG
#set $v->v_vflag &= ~VV_TEXT
set $v->v_vflag &= ~0x20
end
set $v = $v->v_nmntvnodes.tqe_next
end
set $p = $p->mnt_list.tqe_next
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.