aboutsummaryrefslogtreecommitdiff
path: root/sys/tools/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'sys/tools/gdb')
-rw-r--r--sys/tools/gdb/README.txt5
-rw-r--r--sys/tools/gdb/acttrace.py6
-rw-r--r--sys/tools/gdb/pcpu.py2
-rw-r--r--sys/tools/gdb/vnet.py2
4 files changed, 9 insertions, 6 deletions
diff --git a/sys/tools/gdb/README.txt b/sys/tools/gdb/README.txt
index 8c31565ddc42..ad1544912c3c 100644
--- a/sys/tools/gdb/README.txt
+++ b/sys/tools/gdb/README.txt
@@ -8,6 +8,9 @@ be automatically loaded by kgdb when opening a vmcore, so if you add new GDB
commands or functions, that script should be updated to import them, and you
should document them here.
+When improving these scripts, you can use the "kgdb-reload" command to reload
+them from /usr/lib/debug/boot/kernel/gdb/*.
+
To provide some rudimentary testing, selftest.py tries to exercise all of the
commands and functions defined here. To use it, run selftest.sh to panic the
system. Then, create a kernel dump or attach to the panicked kernel, and invoke
@@ -15,6 +18,8 @@ the script with "python import selftest" in (k)gdb.
Commands:
acttrace Display a backtrace for all on-CPU threads
+kgdb-reload Reload all gdb modules, useful when developing the modules
+ themselves.
Functions:
$PCPU(<field>[, <cpuid>]) Display the value of a PCPU/DPCPU field
diff --git a/sys/tools/gdb/acttrace.py b/sys/tools/gdb/acttrace.py
index 147effbbddf1..fdd18a4833cd 100644
--- a/sys/tools/gdb/acttrace.py
+++ b/sys/tools/gdb/acttrace.py
@@ -13,10 +13,8 @@ from pcpu import *
class acttrace(gdb.Command):
"""
- Register an acttrace command with gdb.
-
- When run, acttrace prints the stack trace of all threads that were on-CPU
- at the time of the panic.
+ Print the stack trace of all threads that were on-CPU at the time of
+ the panic.
"""
def __init__(self):
super(acttrace, self).__init__("acttrace", gdb.COMMAND_USER)
diff --git a/sys/tools/gdb/pcpu.py b/sys/tools/gdb/pcpu.py
index aadc4b2d42df..94c451e6eca5 100644
--- a/sys/tools/gdb/pcpu.py
+++ b/sys/tools/gdb/pcpu.py
@@ -9,7 +9,7 @@ from freebsd import *
class pcpu(gdb.Function):
"""
- Register a function to lookup PCPU and DPCPU variables by name.
+ A function to look up PCPU and DPCPU fields by name.
To look up the value of the PCPU field foo on CPU n, use
$PCPU("foo", n). This works for DPCPU fields too. If the CPU ID is
diff --git a/sys/tools/gdb/vnet.py b/sys/tools/gdb/vnet.py
index 36b4d512a3eb..5f416b2a515a 100644
--- a/sys/tools/gdb/vnet.py
+++ b/sys/tools/gdb/vnet.py
@@ -10,7 +10,7 @@ from freebsd import *
class vnet(gdb.Function):
"""
- Register a function to look up VNET variables by name.
+ A function to look up VNET variables by name.
To look at the value of a VNET variable V_foo, print $V("foo"). The
currently selected thread's VNET is used by default, but can be optionally