Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew STUBBS <andrew.stubbs@st.com>
To: Craig Miller <millerexpedition@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: catch-throw conditions?
Date: Fri, 22 Feb 2008 11:28:00 -0000	[thread overview]
Message-ID: <47BEABB7.2030905@st.com> (raw)
In-Reply-To: <19143cfb0802211124k275f8f7bi765154764f42ba0@mail.gmail.com>

Craig Miller wrote:
> Does anyone know if there is a way to set a condition on breakpoints
> created using the "catch throw" command?  Specifically to be able to
> only cause a break when a specific C++ Exception is thrown?

In general, conditions work like this (not that the help command will 
tell you so):

	catch throw if myerror == 42

I'm not sure where the exception flavour is kept though.

Hope that helps

Andrew


(Actually, on the GDB I have the conditions do not show on info break, 
and I don't have any C++ code handy to test, so it might be broken. If 
the condition doesn't work then try this:

    catch throw
    commands
      if myerror != 42
        continue
      end
    end
)


  reply	other threads:[~2008-02-22 11:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-21 19:46 Craig Miller
2008-02-22 11:28 ` Andrew STUBBS [this message]
2008-02-22 14:20 ` Thiago Jung Bauermann
2008-02-22 14:25   ` Daniel Jacobowitz
2008-02-22 16:48     ` Daniel Jacobowitz
2008-02-22 17:45       ` Doug Evans
2008-02-22 18:59         ` Daniel Jacobowitz
2008-02-22 19:51           ` Adrian Jones

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=47BEABB7.2030905@st.com \
    --to=andrew.stubbs@st.com \
    --cc=gdb@sourceware.org \
    --cc=millerexpedition@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