qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] armv7m_nvic: set DHCSR.DEBUGEN when debugger is attached


From: Peter Maydell
Subject: Re: [PATCH] armv7m_nvic: set DHCSR.DEBUGEN when debugger is attached
Date: Thu, 3 Feb 2022 16:13:24 +0000

On Thu, 3 Feb 2022 at 15:53, Valentin Ghita <valentinghita@google.com> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]