Module Name: src Committed By: christos Date: Tue Apr 28 19:45:58 UTC 2020
Added Files: src/sys/gdbscripts: modload Log Message: add a script to load the symbol files of all the modules in the kernel To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/gdbscripts/modload Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Added files: Index: src/sys/gdbscripts/modload diff -u /dev/null src/sys/gdbscripts/modload:1.1 --- /dev/null Tue Apr 28 15:45:58 2020 +++ src/sys/gdbscripts/modload Tue Apr 28 15:45:58 2020 @@ -0,0 +1,14 @@ +# $NetBSD: modload,v 1.1 2020/04/28 19:45:58 christos Exp $ +# Load the symbol files for all active modules +define modload + set $h = module_list + set $e = $h.tqh_first + while ($e != 0) + if ($e->mod_kobj != 0) + set $ko = $e->mod_kobj + set $n = $e->mod_info.mi_name + 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 + end + set $e = $e->mod_chain.tqe_next + end +end