Skip to content

Instantly share code, notes, and snippets.

@sbz
Created April 17, 2023 20:02
Show Gist options
  • Save sbz/094015398ab58e8cd4976f3b609cdf2b to your computer and use it in GitHub Desktop.
Save sbz/094015398ab58e8cd4976f3b609cdf2b to your computer and use it in GitHub Desktop.
FreeBSD kernel list devices in kgdb
define lsdev
set $dev = bus_data_devices->tqh_first
while ($dev != 0)
printf "%-20s ", $dev->nameunit
printf " %p", $dev->softc
print "\n"
set $dev = $dev->devlink.tqe_next
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment