From: "Amker.Cheng" <amker.cheng@gmail.com>
To: gdb@sourceware.org
Cc: paawan1982@yahoo.com, teawater <teawater@gmail.com>
Subject: Re: What happened in gdb between handle_sigint and async_request_quit?
Date: Fri, 06 Feb 2009 15:14:00 -0000 [thread overview]
Message-ID: <e8b251c80902060714k36a67d84neb5a63862430ed07@mail.gmail.com> (raw)
In-Reply-To: <e8b251c80902060114j18d0b41dn3dad9d2845df6254@mail.gmail.com>
Hi :
I think I've got the truth about what happened when CTRL+C is hit
during debugging.
both of GDB and Debuggee will get the event. Windows will report DBG_CONTROL_C
exception to GDB, which was turned into TARGET_SIGNAL_INT in GDB.
According to MSDN, this is the First Chance Exception!
Now the debugee is stopped and GDB got informed.
After I input the "continue" command .
Because the default action is nopass for SIGINT, GDB will just resume
debuggee using
function ContinueDebugEvent() with the second argument set to DBG_CONTINUE,
which stops all exception processing and continues the
thread(debuggee). That's why
debuggee will not get the CTRL+C event. To be accurate, the debuggee
has received
the CTRL+C event, just bypassed by OS violently.
Again, if I let GDB pass SIGINT to debuggee using command "handle 2 pass",
GDB will call function ContinueDebugEvent() with the second argument set to
DBG_EXCEPTION_NOT_HANDLED, which cause debuggee to continues the
exception processing(for this is a first-chance exception event).
Now I think it clear enough as how GDB handles SIGINT is concerned, am I right?
Although there are other puzzles such as the "quit_flag", etc..
Thanks for your time
Regards.
next prev parent reply other threads:[~2009-02-06 15:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-05 12:31 Amker.Cheng
2009-02-05 16:13 ` teawater
2009-02-05 16:25 ` paawan oza
2009-02-06 9:14 ` Amker.Cheng
2009-02-06 15:14 ` Amker.Cheng [this message]
2009-02-06 16:43 ` Joel Brobecker
2009-02-07 10:08 ` Amker.Cheng
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=e8b251c80902060714k36a67d84neb5a63862430ed07@mail.gmail.com \
--to=amker.cheng@gmail.com \
--cc=gdb@sourceware.org \
--cc=paawan1982@yahoo.com \
--cc=teawater@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