1*99523d1dSchristos# $NetBSD: modload,v 1.3 2020/05/02 12:58:46 christos Exp $ 2a4e10439Schristos# Load the symbol files for all active modules 3a4e10439Schristosdefine modload 4a4e10439Schristos set $h = module_list 5a4e10439Schristos set $e = $h.tqh_first 6a4e10439Schristos while ($e != 0) 7a4e10439Schristos if ($e->mod_kobj != 0) 8a4e10439Schristos set $ko = $e->mod_kobj 9a4e10439Schristos set $n = $e->mod_info.mi_name 10a4e10439Schristos eval "add-symbol-file %s/%s/%s.kmod -s .text 0x%lx -s .data 0x%lx -s .rodata 0x%lx\n", module_base, $n, $n, $ko->ko_text_address, $ko->ko_data_address, $ko->ko_rodata_address 11a4e10439Schristos end 12a4e10439Schristos set $e = $e->mod_chain.tqe_next 13a4e10439Schristos end 14a4e10439Schristosend 15