qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH RFC v20 3/8] target/avr: Add mechanism to check


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH RFC v20 3/8] target/avr: Add mechanism to check for active debugger connection
Date: Wed, 5 Jun 2019 09:36:27 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0

On 6/5/19 2:20 AM, Michael Rolnik wrote:
> Hi Richard.
> 
> I am still struggling with this one.
> 
> The spec says.
> The BREAK instruction is used by the On-chip Debug system, and is normally not
> used in the application software. 
> When the BREAK instruction is executed, the AVR CPU is set in the Stopped 
> Mode. 
> This gives the On-chip Debugger access to internal resources. 
> If any Lock bits are set, or either the JTAGEN or OCDEN Fuses are 
> unprogrammed,
> the CPU will treat the BREAK instruction as a NOP and will not enter the
> Stopped mode.

Yep.

> I read is as follows
> - If user has an intention of using debugger, BREAK should be translated to
> QEMU debug breakpoint
> - If user has no intention of using debugger, BREAK should be translated into 
> NOP.

I do not read it that way.  The spec is talking about a specific implementation
of debugging -- fuses, jtag and all.  We do not need to implement breakpoints
using any of those mechanisms, because we can insert breakpoints via
on-the-side data structures and re-translation.


r~



reply via email to

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