Home | History | Annotate | Line # | Download | only in gdbscripts
      1 #	$NetBSD: devs,v 1.2 2019/05/09 07:59:49 mrg Exp $
      2 
      3 define devs
      4 	set $i = 0
      5 
      6 	while ($i < 2)
      7 		if ($i == 0)
      8 			set $d = alldevs.tqh_first
      9 		end
     10 		if ($d)
     11 			printf "        device_t            parent           private  dv_xname\n"
     12 		end
     13 		while ($d)
     14 			printf "%16lx  %16lx  %16lx  %s\n", \
     15 				$d, $d->dv_parent, $d->dv_private, $d->dv_xname
     16 			set $d = $d->dv_list.tqe_next
     17 		end
     18 		set $i++
     19 	end
     20 end
     21 document devs
     22 dump a list of all devices known on the system with their name,
     23 and these pointers: this device, parent device, device private.
     24 end
     25