1 1.2 christos # $NetBSD: modload,v 1.2 2020/05/01 17:00:42 christos Exp $ 2 1.1 christos # Load the symbol files for all active modules 3 1.2 christos # Note that you need to re-run add-symbol-file netbsd.gdb after you 4 1.2 christos # load the modules. 5 1.1 christos define modload 6 1.1 christos set $h = module_list 7 1.1 christos set $e = $h.tqh_first 8 1.1 christos while ($e != 0) 9 1.1 christos if ($e->mod_kobj != 0) 10 1.1 christos set $ko = $e->mod_kobj 11 1.1 christos set $n = $e->mod_info.mi_name 12 1.1 christos 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 13 1.1 christos end 14 1.1 christos set $e = $e->mod_chain.tqe_next 15 1.1 christos end 16 1.1 christos end 17