emdbg.debug.px4

GDB Python Modules

This module includes many PX4-specific GDB Python plugins that provide additional debug functionality for interactive debugging and automated scripting.

Since we want these modules to work inside and outside of GDB, we do not use import gdb which is only available inside GDB, but instead provide gdb as a function argument so that it can be replaced by emdbg.debug.remote.rpyc.Gdb.

You must only use the GDB Python API and the Python standard library in this folder so that they work both inside and outside of GDB.

 1# Copyright (c) 2023, Auterion AG
 2# SPDX-License-Identifier: BSD-3-Clause
 3
 4"""
 5# GDB Python Modules
 6
 7This module includes many PX4-specific GDB Python plugins that provide additional
 8debug functionality for interactive debugging and automated scripting.
 9
10Since we want these modules to work inside and outside of GDB, we do not use
11`import gdb` which is only available inside GDB, but instead provide `gdb`
12as a function argument so that it can be replaced by
13`emdbg.debug.remote.rpyc.Gdb`.
14
15.. warning::
16    You must only use the [GDB Python API][api] and the Python standard library
17    in this folder so that they work both inside and outside of GDB.
18
19
20[api]: https://sourceware.org/gdb/onlinedocs/gdb/Python-API.html
21"""
22
23
24
25from .task import all_tasks, all_tasks_as_table, all_files_as_table, task_switch
26from .semaphore import Semaphore
27from .perf import PerfCounter, all_perf_counters_as_table
28from .buffer import UartBuffer, ConsoleBuffer
29from .device import all_registers, all_registers_as_table, all_gpios_as_table
30from .device import vector_table, vector_table_as_table, Device, coredump
31from .device import discover as discover_device
32from .svd import PeripheralWatcher
33
34from .system_load import restart_system_load_monitor
35from .utils import gdb_backtrace as backtrace
36from .data import pinout
37
38
39_TARGET = None
40_SVD_FILE = None