Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/gdbscripts add a script to load the symbol files of all ...



details:   https://anonhg.NetBSD.org/src/rev/f6d429a1c87a
branches:  trunk
changeset: 971582:f6d429a1c87a
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Apr 28 19:45:58 2020 +0000

description:
add a script to load the symbol files of all the modules in the kernel

diffstat:

 sys/gdbscripts/modload |  14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diffs (18 lines):

diff -r 54bc51c3d3d7 -r f6d429a1c87a sys/gdbscripts/modload
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/gdbscripts/modload    Tue Apr 28 19:45:58 2020 +0000
@@ -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



Home | Main Index | Thread Index | Old Index