[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: |
Mon, 3 Jun 2019 10:44:07 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 |
On 6/1/19 4:12 PM, Michael Rolnik wrote:
> Hi Richard.
>
> If I implement it this way
>
> ```
> static bool trans_BREAK(DisasContext *ctx, arg_BREAK *a)
> {
> if (avr_feature(ctx->env, AVR_FEATURE_BREAK) == false) {
> gen_helper_unsupported(cpu_env);
> } else {
> tcg_gen_movi_tl(cpu_pc, ctx->inst[0].npc);
> gen_helper_debug(cpu_env);
> }
>
> ctx->bstate = BS_EXCP;
>
> return true;
> }
> ```
>
> qemu (without -s -S flags) crashes when debugger is not connected
I was not suggesting using the internal qemu EXCP_DEBUG, but another AVR
specific exception, much the same way as every other cpu has a cpu-specific
debug exception.
Or perhaps always do nothing. Why is gdb insertting BREAK in the first place?
It should be using the "hardware breakpoint" support that qemu advertises as
part of the gdbstub protocol, and that you support here:
> + if (unlikely(cpu_breakpoint_test(cs, OFFSET_CODE + cpc * 2, BP_ANY))
> + || cpu_breakpoint_test(cs, OFFSET_DATA + cpc * 2, BP_ANY)) {
> + tcg_gen_movi_i32(cpu_pc, cpc);
> + gen_helper_debug(cpu_env);
> + ctx.bstate = BS_EXCP;
> + goto done_generating;
> + }
r~
- Re: [Qemu-devel] [PATCH RFC v20 3/8] target/avr: Add mechanism to check for active debugger connection, Michael Rolnik, 2019/06/01
- Re: [Qemu-devel] [PATCH RFC v20 3/8] target/avr: Add mechanism to check for active debugger connection,
Richard Henderson <=
- Re: [Qemu-devel] [PATCH RFC v20 3/8] target/avr: Add mechanism to check for active debugger connection, Michael Rolnik, 2019/06/03
- Re: [Qemu-devel] [PATCH RFC v20 3/8] target/avr: Add mechanism to check for active debugger connection, Richard Henderson, 2019/06/03
- Re: [Qemu-devel] [PATCH RFC v20 3/8] target/avr: Add mechanism to check for active debugger connection, Michael Rolnik, 2019/06/03
- Re: [Qemu-devel] [PATCH RFC v20 3/8] target/avr: Add mechanism to check for active debugger connection, Michael Rolnik, 2019/06/05
- Re: [Qemu-devel] [PATCH RFC v20 3/8] target/avr: Add mechanism to check for active debugger connection, Richard Henderson, 2019/06/05
- Re: [Qemu-devel] [PATCH RFC v20 3/8] target/avr: Add mechanism to check for active debugger connection, Michael Rolnik, 2019/06/05
- Re: [Qemu-devel] [PATCH RFC v20 3/8] target/avr: Add mechanism to check for active debugger connection, Richard Henderson, 2019/06/05
- Re: [Qemu-devel] [PATCH RFC v20 3/8] target/avr: Add mechanism to check for active debugger connection, Alex Bennée, 2019/06/05
- Re: [Qemu-devel] [PATCH RFC v20 3/8] target/avr: Add mechanism to check for active debugger connection, Michael Rolnik, 2019/06/05