Home | History | Annotate | Line # | Download | only in gdbscripts
      1  1.3  christos # $NetBSD: modload,v 1.3 2020/05/02 12:58:46 christos Exp $
      2  1.1  christos # Load the symbol files for all active modules
      3  1.1  christos define modload
      4  1.1  christos 	set $h = module_list
      5  1.1  christos 	set $e = $h.tqh_first
      6  1.1  christos 	while ($e != 0)
      7  1.1  christos 		if ($e->mod_kobj != 0)
      8  1.1  christos 			set $ko = $e->mod_kobj
      9  1.1  christos 			set $n = $e->mod_info.mi_name
     10  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
     11  1.1  christos 		end
     12  1.1  christos 		set $e = $e->mod_chain.tqe_next
     13  1.1  christos 	end
     14  1.1  christos end
     15