-
Notifications
You must be signed in to change notification settings - Fork 4
/
gdb_extra.conf
73 lines (71 loc) · 2.26 KB
/
gdb_extra.conf
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#
# This file is part of Xvisor Build Environment.
# Copyright (C) 2015 Institut de Recherche Technologique SystemX
# Copyright (C) 2015 OpenWide
# All rights reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this Xvisor Build Environment. If not, see
# <http://www.gnu.org/licenses/>.
#
# @file gdb_extra.conf
#
set remote hardware-breakpoint-limit 6
set remote hardware-watchpoint-limit 4
set mem inaccessible-by-default off
define scheduler_debug
set $i = 0
while ($i < mngr.vcpu_count)
p mngr.vcpu_array[$i].name
p /x mngr.vcpu_array[$i].regs.pc
info symbol mngr.vcpu_array[$i].regs.pc
# p /x mngr.vcpu_array[$i].regs.lr
# info symbol mngr.vcpu_array[$i].regs.lr
if (2 == mngr.vcpu_array[$i].state.counter)
echo "Reset\n"
end
if (4 == mngr.vcpu_array[$i].state.counter)
echo "Ready\n"
end
if (8 == mngr.vcpu_array[$i].state.counter)
echo "Running\n"
end
if (16 == mngr.vcpu_array[$i].state.counter)
echo "Paused\n"
end
if (32 == mngr.vcpu_array[$i].state.counter)
echo "Halted\n"
end
set $i = $i + 1
end
end
define vcpu_sched_list
set $rqi = (struct vmm_schedalgo_rq *)((&percpu_sched)->rq)
set $p = 8
while $p
set $p = $p - 1
set $list = &((struct vmm_schedalgo_rq *)percpu_sched.rq)->list[$p]
if $list->next == $list
printf "No VCPU of priority %d\n", $p
loop_continue
end
printf "VCPU priority %d\n", $p
set $entry = (struct vmm_schedalgo_rq_entry *)$list->next
while 1
# mon clean_invalidate_dcache_mva_range $entry ($entry + sizeof (struct vmm_schedalgo_rq_entry))
printf " %s (pc at 0x%x)\n", $entry->vcpu->name, $entry->vcpu->regs.pc
set $entry = $entry->head->next
loop_break
end
end
end