public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Luis Machado via Gdb <gdb@sourceware.org>
Cc: Chris Packham <judge.packham@gmail.com>,
	Joel Brobecker <brobecker@adacore.com>
Subject: Re: Problems interrupting remote target on powerpc
Date: Fri, 28 Apr 2023 07:05:52 -0700	[thread overview]
Message-ID: <ZEvSwDIzNAprBb7q@adacore.com> (raw)
In-Reply-To: <d80d8961-cfbf-210f-77fd-ceb342faa5e3@arm.com>

FWIW, the way I remember things on how it's supposed to work is
the following:

  - The Ctrl-c sequence triggers a SIGINT
  - GDB has a handler and the remote layer sends a single
    interrupt character to GDBserver
  - The interrupt character arriving on the GDBserver side of the
    connection triggers a SIGINT in GDBserver
  - GDBserver has a handler that sends a SIGINT to the inferior.
  - The inferior receives the SIGINT, and thus stops, and the kernel
    informs GDBserver, and GDBserver then sends a stop packet back
    to GDB, who then tells the user the inferior has stopped on
    a SIGINT.

One typically workaround when the above doesn't work is to log onto
the remote machine, and send the inferior process a SIGINT signal
by hand, by using the "kill -INT <PID>" command.

-- 
Joel

  reply	other threads:[~2023-04-28 14:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-27  4:55 Chris Packham
2023-04-28  9:14 ` Chris Packham
2023-04-28  9:18   ` Luis Machado
2023-04-28  9:38     ` Chris Packham
2023-04-28  9:40       ` Luis Machado
2023-04-28 11:25         ` Chris Packham
2023-04-28 13:02           ` Luis Machado
2023-04-28 14:05             ` Joel Brobecker [this message]
2023-05-01  5:30             ` Chris Packham
2023-05-01 21:20               ` Chris Packham
2023-05-02 12:46                 ` Tom Tromey
2023-05-02 12:55               ` Luis Machado

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=ZEvSwDIzNAprBb7q@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb@sourceware.org \
    --cc=judge.packham@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).