From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by sourceware.org (Postfix) with ESMTPS id 8F6D13858D28 for ; Fri, 12 Aug 2022 20:51:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8F6D13858D28 Received: by mail-ed1-x530.google.com with SMTP id b16so2707032edd.4 for ; Fri, 12 Aug 2022 13:51:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc; bh=qgiF6WvsyKYxVxuuvWdMd1OIISM0i2SkR+Ef8PmxjT8=; b=ddwkEC1kO/S1nm5cDhXKrz0j8d4uM90sywCarA4ILc2DeQBf/09ItGWbScUXVcdeGC VV/+uGE5B+haS6+j2DIlAEO7i0P36uMI4ir+TTt+YI4LokzLS3aVgA2x8Sri8JiYQy3B mjqzaIEW773xxKI+baJAmIGWsfz2cIf3d1i34iAz9sTQUpjWXGq5xEb1M0DOptYury9u +J2wynp6bS3T+GvN/aB7IBBVfuYCYZnXRdk1LXbu0RK7CSnMOyp9uKJlr0qJOmEVTFnk Wp042Z5PC+FIwf8+Ta9RjiY+yiesT79nVFPch7hxZ84u9SVj5wui0jhqxZgXMECNzi5o 7k1w== X-Gm-Message-State: ACgBeo07d8EQezctbAXQoCaoJQxKXV2Ht2tA6JziFEwmxIw4eVcrk6qQ kHcHXmCmN14O+NFr5349g8I7/WCHAzl3U8Onn23OqvCGWpI= X-Google-Smtp-Source: AA6agR7URVfoNf3F8V0885KirsxU8kms+Cx5z7jTehKGsl7qhGq2lGqssLf2AEbL4BcQUe2JckgBuwzmKRIh1QQBT24= X-Received: by 2002:a05:6402:48:b0:43a:caa8:756b with SMTP id f8-20020a056402004800b0043acaa8756bmr4815919edu.112.1660337478023; Fri, 12 Aug 2022 13:51:18 -0700 (PDT) MIME-Version: 1.0 From: Tom Kacvinsky Date: Fri, 12 Aug 2022 16:51:07 -0400 Message-ID: Subject: "catch throw" vs. "b __cxa_throw" To: gdb@sourceware.org X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Aug 2022 20:51:21 -0000 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