Patina Debugger
This crate provides a debugger implementation that will install itself in the exception handlers and communicate with debugger software using the GDB Remote protocol. The debugger is intended to be used in the boot phase cores.
This crate is under construction and may be missing functionality, documentation, and testing.
Getting Started
For more details on using the debugger on a device, see the readme.
Examples and Usage
The debugger consists of the static access routines and the underlying debugger
struct. The top level platform code should initialize the statis PatinaDebugger
struct with the appropriate serial transport and default configuration. The
platform has the option of setting static configuration, or enabling the
debugger in runtime code based on platform policy. During entry, the platform
should use the set_debugger routine to set the global instance of the debugger.
Core code should use the static routines to interact with the debugger. If the debugger is either not set or not enabled, the static routines will be no-ops.
extern crate patina;
extern crate patina_internal_cpu;
use ;
static DEBUGGER: PatinaDebugger =
new;
The debugger can be further configured by using various functions on the
initialization of the debugger struct. See the definition for [debugger::PatinaDebugger]
for more details. Notably, if the device is using the same transport for
logging and debugger, it is advisable to use .without_log_init().
Features
windbg_workarounds - (Default) Enables workarounds for Windbg compatibility.
alloc - Uses allocated buffers rather than static buffers for all memory. This provides additional functionality
but prevents debugging prior to allocations being available.
License
Copyright (C) Microsoft Corporation.
SPDX-License-Identifier: Apache-2.0