From: Paul Koning <paulkoning@comcast.net>
To: krokus <nomadbyte@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: Building gdb-9.1 on OSX: gdb's exceptions are not getting caught
Date: Tue, 14 Apr 2020 16:27:13 -0400 [thread overview]
Message-ID: <878633F1-77D9-46CD-BB6F-2FB064B2793A@comcast.net> (raw)
In-Reply-To: <CAMCMYR7y1vzJT=70qVT2ShTRnDkXGzQYxuq6+hphaEBmV0m+YQ@mail.gmail.com>
> On Apr 14, 2020, at 4:23 PM, krokus via Gdb <gdb@sourceware.org> wrote:
>
> 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).
>
> 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"
>
> I'm trying to diagnose why gdb appears to be failing to catch its own
> exceptions.
>
> 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().
>
> 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.
>
> Anybody experienced similar issues with non-functioning exceptions while
> building on OSX?
>
> The configure flags I used:
> ../configure --disable-binutils
> --enable-targets="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=x86_64-apple-darwin18.7.0 --target=x86_64-apple-darwin18.7.0
--with-auto-load-dir=:${prefix}/share/auto-load
--with-auto-load-safe-path=:${prefix}/share/auto-load
--with-expat
--with-gdb-datadir=/usr/local/share/gdb (relocatable)
--with-jit-reader-dir=/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=/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)
paul
next prev parent reply other threads:[~2020-04-14 20:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-14 20:23 krokus
2020-04-14 20:27 ` Paul Koning [this message]
2020-04-14 21:59 ` krokus
[not found] ` <05B3AEF0-54D0-408F-97A4-19B2F3918611@comcast.net>
2020-04-15 1:48 ` krokus
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=878633F1-77D9-46CD-BB6F-2FB064B2793A@comcast.net \
--to=paulkoning@comcast.net \
--cc=gdb@sourceware.org \
--cc=nomadbyte@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