feat: lunadbg GDB plugin to ease kernel debugging process.
[lunaix-os.git] / lunaix-os / scripts / gdb / lunadbg / utils.py
diff --git a/lunaix-os/scripts/gdb/lunadbg/utils.py b/lunaix-os/scripts/gdb/lunadbg/utils.py
new file mode 100644 (file)
index 0000000..b48adee
--- /dev/null
@@ -0,0 +1,6 @@
+
+def pid_argument(argument):
+    if not argument:
+        return "__current"
+    else:
+        return f"sched_ctx._procs[({argument})]"
\ No newline at end of file