On Thu, 3 Feb 2022 at 15:53, Valentin Ghita <[email protected]> wrote: > > The DEBUGEN bit is set by the debugger when it is connected to the > core. Software can use this bit to check if a debug session is active. > > Add a function in gdbstub to check if the debugger is attached to a CPU > and use this information when the DHCSR register is read in armv7m_nvic.
The DHCSR.C_DEBUGEN bit is for the architected Halting Debug, where an external debugger uses the debug access port to control and debug the CPU. This is conceptually similar to QEMU's gdb debugstub, but not the same thing. QEMU doesn't implement Halting Debug (this is architecturally permitted), and so making this bit RAZ/WI is correct for us. thanks -- PMM
