public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Tom Kacvinsky <tkacvins@gmail.com>
To: gdb@sourceware.org
Subject: "catch throw" vs. "b __cxa_throw"
Date: Fri, 12 Aug 2022 16:51:07 -0400	[thread overview]
Message-ID: <CAG_eJLfUEMtrie5w+uB42m40MuP4qc0Rx+w4puv_AG73H42m3Q@mail.gmail.com> (raw)

We happened to notice that with gdb 7.6.1, "catch throw" caught an exception
(a logic_error exception from initializing a std::string with nullptr).
However, with
GDB 11.1 and 12.1 (I have not tested earlier versions than that), we did
not break
on the exception when using "catch throw".  However, I was able to break
when
I used "b __cxa_throw"

I looked in sourceware's bugzilla for a report on this, but I didn't see
anything.
I also perused the code and from what I could gather, "catch throw"
basically
mapped to setting a breakpoint on __cxa_throw.  I did not figure out the
logic
for "catch throw" in the GDB 12.1 source.

What is really odd is that "catch throw" works fine for some small examples,
but the use case I have where it is not working is our full blown project
(a mix
of C, C++ and Ada) and I wouldn't know where to begin constructing an MRE.

Any ideas as to what is going on with this?

Thanks,

Tom

             reply	other threads:[~2022-08-12 20:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-12 20:51 Tom Kacvinsky [this message]
2022-08-15 11:10 ` Andrew Burgess

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=CAG_eJLfUEMtrie5w+uB42m40MuP4qc0Rx+w4puv_AG73H42m3Q@mail.gmail.com \
    --to=tkacvins@gmail.com \
    --cc=gdb@sourceware.org \
    /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).