18c2ecf20Sopenharmony_ci#
28c2ecf20Sopenharmony_ci# gdb helper commands and functions for Linux kernel debugging
38c2ecf20Sopenharmony_ci#
48c2ecf20Sopenharmony_ci#  loader module
58c2ecf20Sopenharmony_ci#
68c2ecf20Sopenharmony_ci# Copyright (c) Siemens AG, 2012, 2013
78c2ecf20Sopenharmony_ci#
88c2ecf20Sopenharmony_ci# Authors:
98c2ecf20Sopenharmony_ci#  Jan Kiszka <jan.kiszka@siemens.com>
108c2ecf20Sopenharmony_ci#
118c2ecf20Sopenharmony_ci# This work is licensed under the terms of the GNU GPL version 2.
128c2ecf20Sopenharmony_ci#
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ciimport os
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_cisys.path.insert(0, os.path.dirname(__file__) + "/scripts/gdb")
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_citry:
198c2ecf20Sopenharmony_ci    gdb.parse_and_eval("0")
208c2ecf20Sopenharmony_ci    gdb.execute("", to_string=True)
218c2ecf20Sopenharmony_ciexcept:
228c2ecf20Sopenharmony_ci    gdb.write("NOTE: gdb 7.2 or later required for Linux helper scripts to "
238c2ecf20Sopenharmony_ci              "work.\n")
248c2ecf20Sopenharmony_cielse:
258c2ecf20Sopenharmony_ci    import linux.utils
268c2ecf20Sopenharmony_ci    import linux.symbols
278c2ecf20Sopenharmony_ci    import linux.modules
288c2ecf20Sopenharmony_ci    import linux.dmesg
298c2ecf20Sopenharmony_ci    import linux.tasks
308c2ecf20Sopenharmony_ci    import linux.config
318c2ecf20Sopenharmony_ci    import linux.cpus
328c2ecf20Sopenharmony_ci    import linux.lists
338c2ecf20Sopenharmony_ci    import linux.rbtree
348c2ecf20Sopenharmony_ci    import linux.proc
358c2ecf20Sopenharmony_ci    import linux.constants
368c2ecf20Sopenharmony_ci    import linux.timerlist
378c2ecf20Sopenharmony_ci    import linux.clk
388c2ecf20Sopenharmony_ci    import linux.genpd
398c2ecf20Sopenharmony_ci    import linux.device
40