From: Bob Rossi <bob@brasko.net>
To: Carlos Eduardo Rodrigues de Almeida <eduardo.almeida@gmail.com>,
gdb@sources.redhat.com
Subject: Re: Sending signal to inferior
Date: Fri, 30 Dec 2005 23:14:00 -0000 [thread overview]
Message-ID: <20051230231349.GF4388@white> (raw)
In-Reply-To: <20051230225812.GE4388@white>
On Fri, Dec 30, 2005 at 05:58:12PM -0500, Bob Rossi wrote:
> On Fri, Dec 30, 2005 at 11:48:02AM -0500, Daniel Jacobowitz wrote:
> > On Fri, Dec 30, 2005 at 11:43:00AM -0500, Bob Rossi wrote:
> > > On Fri, Dec 30, 2005 at 04:57:38AM +0000, Carlos Eduardo Rodrigues de Almeida wrote:
> > > > Thank you.. I'm trying to solve this for days..
> > >
> > > Wow, that took me a long time to figure out, and I wrote libtgdb.
> > >
> > > It's the tty command that is allowing libtgdb to interrupt GDB when the
> > > inferior is running. Apparently, if you don't move the inferior's
> > > terminal via the GDB tty command, then you can't interrupt the inferior
> > > when it's running.
> > >
> > > Basically, I'm assuming that the SIGINT to GDB is ignored if the
> > > inferior has control of the terminal. However, if you put the inferior
> > > on a different terminal, then GDB must handle the SIGINT. This
> > > explanation is just a guess though.
> >
> > It shouldn't be. Check whether GDB is reaching handle_sigint() and
> > whether it is going through the event loop properly?
>
> This is a tough one. For some reason, if I start debugging GDB, it
> doesn't reach the handle_sigint line. However, with fprintf there, I'm
> seeing output. Could I be doing something wrong or is this expected?
>
> I configured && compiled like this:
> cvs -d ':ext:bobbybrasko@sources.redhat.com:/cvs/src' co gdb
> CFLAGS=-g ../src/configure
> make
>
> I was wondering if any of the -W compile options stop me from debuging
> GDB in this case.
>
What I can tell you from instrumentation is this. handle_sigint is not
called when the inferior is running and the tty command was used. Out of
the 4 cases
inferior running/tty used
inferior running/tty not used
inferior not running/tty used
inferior not running/tty not used
only the first case does not allow GDB to get into handle_sigint.
So, if GDB get's a SIGINT when the inferior is running and the tty is not set,
then handle_sigint get's called. After the inferior is done running,
quit() get's called and displays "Quit".
If GDB get's a SIGINT when the inferior is running and the tty is not
set, handle_sigint does not get called, and somehow GDB is interupted.
However, I can't figure out why.
Bob Rossi
next prev parent reply other threads:[~2005-12-30 23:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-30 3:37 Carlos Eduardo Rodrigues de Almeida
2005-12-30 4:11 ` Bob Rossi
2005-12-30 4:29 ` Carlos Eduardo Rodrigues de Almeida
2005-12-30 4:42 ` Bob Rossi
2005-12-30 4:57 ` Carlos Eduardo Rodrigues de Almeida
2005-12-30 16:43 ` Bob Rossi
2005-12-30 16:48 ` Daniel Jacobowitz
2005-12-30 17:04 ` Bob Rossi
2005-12-30 22:58 ` Bob Rossi
2005-12-30 23:14 ` Bob Rossi [this message]
2006-01-03 13:11 Sanborn, Ed
2006-01-03 22:54 ` Jim Blandy
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=20051230231349.GF4388@white \
--to=bob@brasko.net \
--cc=eduardo.almeida@gmail.com \
--cc=gdb@sources.redhat.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