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: Fri, 4 Feb 2022 09:42:11 +0000

On Fri, 4 Feb 2022 at 09:28, Alex Bennée <alex.bennee@linaro.org> wrote:
> Assuming you are happy for the device to act as though a external
> debugger is attached regardless of the gdbstub state you could use a CPU
> property on the command line to enable this behaviour. We have some
> examples for SVE for the 64 bit CPUs (see object_property_add for
> sve-max-vq). So something like:
>
>   -cpu cortex-m3,dhscr=true
>
> You would probably want to model the behaviour of DHSCR.C_HALT as well
> because that is something the core might do to itself if it detects it
> is running under debug.

This is sounding pretty hacky to me. I think we should either have
a proper implementation of all of halting debug (probably opt-in,
with the default being that the gdbstub is transparent to the guest),
or we should just say that no, this isn't something we support,
and if you want gdb to get control when a particular bit of code
is executed then you should set a breakpoint there.

We don't even implement the guest-visible debug parts of the
architecture (eg architected single-step) yet, incidentally.

-- PMM



reply via email to

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