Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Vladimir Prus <ghost@cs.msu.su>
To: gdb-patches@sources.redhat.com
Subject: Re: Stop breakpoint commands from poping the target
Date: Sat, 15 Mar 2008 15:59:00 -0000	[thread overview]
Message-ID: <frgro1$dm5$2@ger.gmane.org> (raw)
In-Reply-To: <200803140802.34377.pedro@codesourcery.com>

Pedro Alves wrote:

> This patch goes on top of Vladimir's pending async fixes patch.
> 
> commands.exp triggers the problem this patch addresses, in
> async mode.
> 
> In that test, we have a watch on a local variable, and then we
> add a command to that watch to print the local variable's
> value.  When the variable goes out of scope, gdb prints that,
> and also runs the associated commands with the watch.  Since
> the variable is out of scope, and error is thrown.  In sync
> targets, the exception just ends the breakpoints command
> processing, and goes on to proceed with the command loop.  But in
> async mode, the exception ends up in
> inf-loop.c:inferior_event_handler/INF_REG_EVENT, which considers exceptions
> fatal, and pops the target.  The fix is to catch the exception earlier.

Why do we pop the target in the first place? It does not seem like
a good idea to do that if any exception is thrown.

I actually agree that if breakpoint commands fail, it's not
then end of world, and we can go on with continuations.  But at the same
time, popping target on any unhandled exception sounds a little bit drastic.

- Volodya



  parent reply	other threads:[~2008-03-15 15:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-14  8:02 Pedro Alves
2008-03-14  8:15 ` Vladimir Prus
2008-03-14 19:31   ` Daniel Jacobowitz
2008-03-17 16:44   ` Pedro Alves
2008-03-17 22:11     ` Daniel Jacobowitz
2008-03-15 15:59 ` Vladimir Prus [this message]
2008-03-17 16:49   ` Pedro Alves

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='frgro1$dm5$2@ger.gmane.org' \
    --to=ghost@cs.msu.su \
    --cc=gdb-patches@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