aboutsummaryrefslogtreecommitdiff
path: root/kernel/mm/pagetable.gdb
blob: b145804f56b113f3330abd7d239607d114a98405 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
define pagetable
	if $argc > 0
		set $proc = proc_lookup($arg0)
		if $proc != NULL
			printf "Process %i (%s):\n", $proc->p_pid, $proc->p_name
			set $pagedir = $proc->p_pml4
		else
			printf "No process with PID %i exists\n", $arg0
			set $pagedir = NULL
		end
	else
		printf "Current mappings:\n"
		set $pagedir = current_pagedir
	end

	if $pagedir != NULL
		kinfo pt_mapping_info current_pagedir
	end
end
document pagetable
Without arguments displays current page table mappings in the form
"[vstart, vend) => [pstart, pend)". Takes an optional integer argument
to specify the PID of a process whose page table mappings should be
printed instead.
end