From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from resqmta-ch2-09v.sys.comcast.net (resqmta-ch2-09v.sys.comcast.net [IPv6:2001:558:fe21:29:69:252:207:41]) by sourceware.org (Postfix) with ESMTPS id 47178385DC3E for ; Tue, 14 Apr 2020 20:27:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 47178385DC3E Received: from resomta-ch2-19v.sys.comcast.net ([69.252.207.115]) by resqmta-ch2-09v.sys.comcast.net with ESMTP id ORqijeXk3dWWZOS9Nja0Bt; Tue, 14 Apr 2020 20:27:17 +0000 Received: from pkoning.akdesign.com ([73.60.223.101]) by resomta-ch2-19v.sys.comcast.net with ESMTPSA id OS9KjptdmsMl9OS9MjJ8Tu; Tue, 14 Apr 2020 20:27:17 +0000 X-Xfinity-VAAS: gggruggvucftvghtrhhoucdtuddrgeduhedrfedugdduhedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuvehomhgtrghsthdqtfgvshhipdfqfgfvpdfpqffurfetoffkrfenuceurghilhhouhhtmecufedttdenucenucfjughrpegtggfuhfgjfffgkfhfvffosehtqhhmtdhhtddvnecuhfhrohhmpefrrghulhcumfhonhhinhhguceophgruhhlkhhonhhinhhgsegtohhmtggrshhtrdhnvghtqeenucfkphepjeefrdeitddrvddvfedruddtudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopehpkhhonhhinhhgrdgrkhguvghsihhgnhdrtghomhdpihhnvghtpeejfedriedtrddvvdefrddutddupdhmrghilhhfrhhomhepphgruhhlkhhonhhinhhgsegtohhmtggrshhtrdhnvghtpdhrtghpthhtohepnhhomhgruggshihtvgesghhmrghilhdrtghomhdprhgtphhtthhopehguggssehsohhurhgtvgifrghrvgdrohhrgh X-Xfinity-VMeta: sc=0.00;st=legit Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) Subject: Re: Building gdb-9.1 on OSX: gdb's exceptions are not getting caught From: Paul Koning In-Reply-To: Date: Tue, 14 Apr 2020 16:27:13 -0400 Cc: gdb@sourceware.org Content-Transfer-Encoding: quoted-printable Message-Id: <878633F1-77D9-46CD-BB6F-2FB064B2793A@comcast.net> References: To: krokus X-Mailer: Apple Mail (2.3445.104.14) X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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: Tue, 14 Apr 2020 20:27:20 -0000 > On Apr 14, 2020, at 4:23 PM, krokus via Gdb = wrote: >=20 > gdb 9.1 is being built from sources .tar.gz on OSX 10.13 with clang = 8.0. > The build proceeds successfully, resulting in a runnable gdb binary > (properly codesign'ed). >=20 > I get the (gdb) prompt. Known commands (e.g. info) are properly = executed. > However entering an incorrect command results in Abort trap: 6 with = the > message: > "libc++abi.dylib: terminating with uncaught exception of type > gdb_exeption_error" >=20 > I'm trying to diagnose why gdb appears to be failing to catch its own > exceptions. >=20 > In case of executing an incorrect command, the try/catch handling is > supposed to be done in event-top.c::gdb_rl_callback_handler(). Indeed, = the > crash log (see below) shows this entry which correctly proceeds to > throw_it() , yet never gets caught back at the = gdb_rl_callback_handler(). >=20 > I even tried to explicitly put a throw("catch-this") in the > gdb_rl_callback_handler() and then added a catch(...) clause in hope = to > catch it there rightaway. Yet it goes uncaught, as if there's no catch > there. >=20 > Anybody experienced similar issues with non-functioning exceptions = while > building on OSX? >=20 > The configure flags I used: > ../configure --disable-binutils > --enable-targets=3D"x86_64-apple-darwin,x86_64-linux-gnu,i686-linux-gnu"= > --without-lzma --without-python" I recently built it, and after some messing around with signatures and = the like, it seems to work. It certainly has no trouble with invalid = commands. (gdb) show config This GDB was configured as follows: configure --host=3Dx86_64-apple-darwin18.7.0 = --target=3Dx86_64-apple-darwin18.7.0 --with-auto-load-dir=3D:${prefix}/share/auto-load --with-auto-load-safe-path=3D:${prefix}/share/auto-load --with-expat --with-gdb-datadir=3D/usr/local/share/gdb (relocatable) --with-jit-reader-dir=3D/usr/local/lib/gdb (relocatable) --without-libunwind-ia64 --without-lzma --without-babeltrace --without-intel-pt --with-mpfr --without-xxhash --without-python --without-guile --disable-source-highlight --with-separate-debug-dir=3D/usr/local/lib/debug = (relocatable) ("Relocatable" means the directory can be moved with the GDB = installation tree, and GDB will still find it.) (gdb) wrongcommand Undefined command: "wrongcommand". Try "help". (gdb)=20 paul