aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/load_kstd.py
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2026-05-01 20:46:21 +0200
committerFelix Morgner <felix.morgner@ost.ch>2026-05-01 20:46:21 +0200
commit61949538ad6d114c1c2a788928a0b9706b4efc76 (patch)
treea1cf47e160d040ea4b199b6ca089e4580a810a7f /scripts/gdb/load_kstd.py
parentb1405c44434fbfa535348d310aa3243203aefb06 (diff)
downloadkernel-61949538ad6d114c1c2a788928a0b9706b4efc76.tar.xz
kernel-61949538ad6d114c1c2a788928a0b9706b4efc76.zip
debug: add support for kstd pretty printing
Diffstat (limited to 'scripts/gdb/load_kstd.py')
-rw-r--r--scripts/gdb/load_kstd.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/gdb/load_kstd.py b/scripts/gdb/load_kstd.py
new file mode 100644
index 0000000..f3adce1
--- /dev/null
+++ b/scripts/gdb/load_kstd.py
@@ -0,0 +1,14 @@
+import sys
+import os
+import gdb
+
+script_dir = os.path.dirname(os.path.abspath(__file__))
+
+if script_dir not in sys.path:
+ sys.path.insert(0, script_dir)
+
+import kstd
+
+kstd.register_printers(gdb.current_objfile())
+
+gdb.write("Loaded kstd pretty printers.\n")