diff options
Diffstat (limited to 'sys/tools/gdb/pcpu.py')
| -rw-r--r-- | sys/tools/gdb/pcpu.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/tools/gdb/pcpu.py b/sys/tools/gdb/pcpu.py index aadc4b2d42df..08ae81e5121e 100644 --- a/sys/tools/gdb/pcpu.py +++ b/sys/tools/gdb/pcpu.py @@ -7,15 +7,17 @@ import gdb 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 omitted, and the currently selected thread is on-CPU, that CPU is used, otherwise an error is raised. """ + def __init__(self): super(pcpu, self).__init__("PCPU") @@ -73,5 +75,6 @@ class pcpu(gdb.Function): obj = gdb.Value(pcpu_base + pcpu_entry_addr - start + base) return obj.cast(pcpu_entry.type.pointer()).dereference() + # Register with gdb. pcpu() |
