From: Omair Javaid <omair.javaid@linaro.org>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix for GDB failing to interrupt after run when no PID issued by stub
Date: Wed, 31 Jan 2018 17:01:00 -0000 [thread overview]
Message-ID: <CANW4E-1ek1OE0u-zPcZhkKoY8qaEnO4hsq_qGEx1SVK-4oxsiw@mail.gmail.com> (raw)
In-Reply-To: <86607ic75j.fsf@gmail.com>
On 31 January 2018 at 21:41, Yao Qi <qiyaoltc@gmail.com> wrote:
> Omair Javaid <omair.javaid@linaro.org> writes:
>
> > Here are the steps to reproduce:
> > 1) arm-none-eabi-gdb file-to-debug.elf
> > 2) target remote :3333
>
> "target extended-remote :3333".
>
> > At this stage gdb would have connected and halted successfully.
> > 3) run
> > Issue ctrl + C to interrupt running program and GDB wont be able to stop.
>
> Could you show the log of "set debug remote 1", especially after
> "ctrl-c" is typed. I want to understand what is going on over these
> packets between GDB and stub, and reproduce it on GDBserver by disabling
> some packets. This is what I get,
>
Heres the gdb log with run (no other command b/w connection and run):
https://paste.ubuntu.com/26496015/
Heres the gdb log with continue + run (after we issue a continue/interrupt
cycle where inferior PID is set and inferior->control.stop_soon =
NO_STOP_QUIETLY;) https://paste.ubuntu.com/26496048/
>
> (gdb) c
> Continuing.
> Sending packet: $Z0,7ffff7dea940,1#e0...Packet received: OK
> Sending packet: $QPassSignals:#f3...Packet received: OK
> Sending packet: $Hc0#db...Packet received: OK
> Sending packet: $s#73...Packet received: T0506:c0dcffffff7f0000;07:
> c0dcffffff7f0000;10:7f05400000000000;
> Sending packet: $Z0,40057a,1#74...Packet received: OK
> Sending packet: $QPassSignals:e;10;14;17;1a;1b;1c;21;24;25;2c;4c;97;#0a...Packet
> received: OK
> Sending packet: $Hcpa410.0#6f...Packet received: E01
> Sending packet: $c#63...^Cremote_pass_ctrlc called
> remote_interrupt called
> Packet received: T0206:ffffffff00000000;07:d8daffffff7f0000;10:
> e05dadf7ff7f0000;
> Sending packet: $qL1200000000000000000#50...Packet received:
>
> Program received signal SIGINT, Interrupt.
> Sending packet: $z0,40057a,1#94...Packet received: OK
>
> In the stop reply from my gdbserver, there is no "thread id" either. My
> stop reply has expedite registers while OpenOCD doesn't. I don't think
> this matters here.
>
The situation with OpenOCD happens because we ran and set inferior pid to
null hoping to update it. Later in extended_remote_create_inferior called
buy run command thread pid gets assigned but we are checking
inferior->control.stop_soon
just before we update the pid and thus it remains to STOP_QUIETLY for
lifetime of the inferior as this flag is only altered by attach command
handlers or during call of clear_proceed_status
>
> --
> Yao (齐尧)
>
next prev parent reply other threads:[~2018-01-31 17:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-29 10:44 Omair Javaid
2018-01-31 16:41 ` Yao Qi
2018-01-31 17:01 ` Omair Javaid [this message]
2018-02-01 12:48 ` Yao Qi
2018-02-01 15:56 ` Omair Javaid
2018-02-06 14:47 ` Yao Qi
2018-02-08 10:09 ` Omair Javaid
2018-02-15 15:06 ` Yao Qi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CANW4E-1ek1OE0u-zPcZhkKoY8qaEnO4hsq_qGEx1SVK-4oxsiw@mail.gmail.com \
--to=omair.javaid@linaro.org \
--cc=gdb-patches@sourceware.org \
--cc=qiyaoltc@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox