ACIL FM
Dark
Refresh
Current DIR:
/usr/src/kernels/5.14.0-611.27.1.el9_7.x86_64/scripts/gdb/linux
/
usr
src
kernels
5.14.0-611.27.1.el9_7.x86_64
scripts
gdb
linux
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
clk.py
2.46 MB
chmod
View
DL
Edit
Rename
Delete
config.py
1.27 MB
chmod
View
DL
Edit
Rename
Delete
constants.py.in
3.15 MB
chmod
View
DL
Edit
Rename
Delete
cpus.py
5.2 MB
chmod
View
DL
Edit
Rename
Delete
device.py
5.65 MB
chmod
View
DL
Edit
Rename
Delete
dmesg.py
5.82 MB
chmod
View
DL
Edit
Rename
Delete
genpd.py
2.52 MB
chmod
View
DL
Edit
Rename
Delete
lists.py
4.16 MB
chmod
View
DL
Edit
Rename
Delete
Makefile
667 B
chmod
View
DL
Edit
Rename
Delete
mm.py
13.98 MB
chmod
View
DL
Edit
Rename
Delete
modules.py
2.75 MB
chmod
View
DL
Edit
Rename
Delete
pgtable.py
10.08 MB
chmod
View
DL
Edit
Rename
Delete
proc.py
8.54 MB
chmod
View
DL
Edit
Rename
Delete
rbtree.py
4.25 MB
chmod
View
DL
Edit
Rename
Delete
symbols.py
6.92 MB
chmod
View
DL
Edit
Rename
Delete
tasks.py
3.55 MB
chmod
View
DL
Edit
Rename
Delete
timerlist.py
7.55 MB
chmod
View
DL
Edit
Rename
Delete
utils.py
5.03 MB
chmod
View
DL
Edit
Rename
Delete
__init__.py
55 B
chmod
View
DL
Edit
Rename
Delete
Edit file: /usr/src/kernels/5.14.0-611.27.1.el9_7.x86_64/scripts/gdb/linux/lists.py
# # gdb helper commands and functions for Linux kernel debugging # # list tools # # Copyright (c) Thiebaud Weksteen, 2015 # # Authors: # Thiebaud Weksteen <thiebaud@weksteen.fr> # # This work is licensed under the terms of the GNU GPL version 2. # import gdb from linux import utils list_head = utils.CachedType("struct list_head") hlist_head = utils.CachedType("struct hlist_head") hlist_node = utils.CachedType("struct hlist_node") def list_for_each(head): if head.type == list_head.get_type().pointer(): head = head.dereference() elif head.type != list_head.get_type(): raise TypeError("Must be struct list_head not {}" .format(head.type)) if head['next'] == 0: gdb.write("list_for_each: Uninitialized list '{}' treated as empty\n" .format(head.address)) return node = head['next'].dereference() while node.address != head.address: yield node.address node = node['next'].dereference() def list_for_each_entry(head, gdbtype, member): for node in list_for_each(head): yield utils.container_of(node, gdbtype, member) def hlist_for_each(head): if head.type == hlist_head.get_type().pointer(): head = head.dereference() elif head.type != hlist_head.get_type(): raise TypeError("Must be struct hlist_head not {}" .format(head.type)) node = head['first'].dereference() while node.address: yield node.address node = node['next'].dereference() def hlist_for_each_entry(head, gdbtype, member): for node in hlist_for_each(head): yield utils.container_of(node, gdbtype, member) def list_check(head): nb = 0 if (head.type == list_head.get_type().pointer()): head = head.dereference() elif (head.type != list_head.get_type()): raise gdb.GdbError('argument must be of type (struct list_head [*])') c = head try: gdb.write("Starting with: {}\n".format(c)) except gdb.MemoryError: gdb.write('head is not accessible\n') return while True: p = c['prev'].dereference() n = c['next'].dereference() try: if p['next'] != c.address: gdb.write('prev.next != current: ' 'current@{current_addr}={current} ' 'prev@{p_addr}={p}\n'.format( current_addr=c.address, current=c, p_addr=p.address, p=p, )) return except gdb.MemoryError: gdb.write('prev is not accessible: ' 'current@{current_addr}={current}\n'.format( current_addr=c.address, current=c )) return try: if n['prev'] != c.address: gdb.write('next.prev != current: ' 'current@{current_addr}={current} ' 'next@{n_addr}={n}\n'.format( current_addr=c.address, current=c, n_addr=n.address, n=n, )) return except gdb.MemoryError: gdb.write('next is not accessible: ' 'current@{current_addr}={current}\n'.format( current_addr=c.address, current=c )) return c = n nb += 1 if c == head: gdb.write("list is consistent: {} node(s)\n".format(nb)) return class LxListChk(gdb.Command): """Verify a list consistency""" def __init__(self): super(LxListChk, self).__init__("lx-list-check", gdb.COMMAND_DATA, gdb.COMPLETE_EXPRESSION) def invoke(self, arg, from_tty): argv = gdb.string_to_argv(arg) if len(argv) != 1: raise gdb.GdbError("lx-list-check takes one argument") list_check(gdb.parse_and_eval(argv[0])) LxListChk()
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply