diff options
| author | nthnluu <nate1299@me.com> | 2024-01-28 21:20:27 -0500 |
|---|---|---|
| committer | nthnluu <nate1299@me.com> | 2024-01-28 21:20:27 -0500 |
| commit | c63f340d90800895f007de64b7d2d14624263331 (patch) | |
| tree | 2c0849fa597dd6da831c8707b6f2603403778d7b /kernel/vm/vmmap.gdb | |
Created student weenix repository
Diffstat (limited to 'kernel/vm/vmmap.gdb')
| -rw-r--r-- | kernel/vm/vmmap.gdb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/kernel/vm/vmmap.gdb b/kernel/vm/vmmap.gdb new file mode 100644 index 0000000..528dd1d --- /dev/null +++ b/kernel/vm/vmmap.gdb @@ -0,0 +1,24 @@ +define vmmap + if $argc > 0 + set $proc = proc_lookup($arg0) + if $proc != NULL + printf "Process %i (%s):\n", $proc->p_pid, $proc->p_name + set $vmmap = $proc->p_vmmap + else + printf "No process with PID %i exists\n", $arg0 + set $vmmap = NULL + end + else + printf "Current process %i (%s):\n", curproc->p_pid, curproc->p_name + set $vmmap = curproc->p_vmmap + end + + if $vmmap != NULL + kinfo vmmap_mapping_info $vmmap + end +end +document pagetable +Without arguments displays current mappings. Takes an optional integer +argument to specify the PID of a process whose mappings should be +printed instead. +end |
