diff mbox series

[v2,18/39] gdbserver: disable attn after breaking

Message ID 20220420065013.222816-19-npiggin@gmail.com
State New
Headers show
Series gdbserver multi-threaded debugging and POWER9/10 support | expand

Commit Message

Nicholas Piggin April 20, 2022, 6:49 a.m. UTC
Rather than leave attn enabled, disable it when breaking to idle state
if it was enabled. This helps prevent attn from getting left on after
the debugger is detached or when no breakpoints are enabled.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 src/pdbgproxy.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Joel Stanley May 3, 2022, 7:05 a.m. UTC | #1
On Wed, 20 Apr 2022 at 06:51, Nicholas Piggin <npiggin@gmail.com> wrote:
>
> Rather than leave attn enabled, disable it when breaking to idle state
> if it was enabled. This helps prevent attn from getting left on after
> the debugger is detached or when no breakpoints are enabled.
>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>

Reviewed-by: Joel Stanley <joel@jms.id.au>

> ---
>  src/pdbgproxy.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/pdbgproxy.c b/src/pdbgproxy.c
> index 7267fd8a..9729eaa1 100644
> --- a/src/pdbgproxy.c
> +++ b/src/pdbgproxy.c
> @@ -382,6 +382,8 @@ static void poll(void)
>                 if (!(status.quiesced))
>                         break;
>
> +               set_attn(false);
> +
>                 state = IDLE;
>                 poll_interval = VCONT_POLL_DELAY;
>                 if (!(status.active)) {
> --
> 2.35.1
>
> --
> Pdbg mailing list
> Pdbg@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/pdbg
diff mbox series

Patch

diff --git a/src/pdbgproxy.c b/src/pdbgproxy.c
index 7267fd8a..9729eaa1 100644
--- a/src/pdbgproxy.c
+++ b/src/pdbgproxy.c
@@ -382,6 +382,8 @@  static void poll(void)
 		if (!(status.quiesced))
 			break;
 
+		set_attn(false);
+
 		state = IDLE;
 		poll_interval = VCONT_POLL_DELAY;
 		if (!(status.active)) {