From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Can't "catch exception" in gdb on OS X Date: Tue, 08 Mar 2016 11:29:59 +0000 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="900e1437335c90c92a3116ad49605f53"; logging-data="20216"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/bXJZiP/fVZY2GCQm4DAo06kk5b663QXw=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:zUseuSfr2lxFyiVQF8ZvtXp3qAw= sha1:MkJXcYQ1VNY1+5FhVkbyrSe/5qI= Xref: news.eternal-september.org comp.lang.ada:29706 Date: 2016-03-08T11:29:59+00:00 List-Id: Jerry writes: > On Saturday, March 5, 2016 at 1:30:44 AM UTC-7, Simon Wright wrote: >> Jerry writes: >> >> > I'm on OS X 10.9.5 trying to debug a GNAT program. When I type >> > >> > catch exception >> > >> > when the program is in the debugger but paused at the automatically >> > inserted breakpoint at the first line, I get this: >> > >> > Cannot insert Ada exception catchpoints in this configuration. >> >> I wrote about this at [1]; there's a GDB Bugzilla entry about it[2]. >> >> The simplest solution I've found is to invoke gdb with -readnow. >> >> [1] >> http://forward-in-code.blogspot.co.uk/2012/01/catching-exceptions-in-gdb.html >> [2] https://sourceware.org/bugzilla/show_bug.cgi?id=11385 > > Thanks, Simon. Google didn't point me to your blog because I entered > the current gdb error text and it looks like the text has changed > since you wrote. > > Your suggestions including using -readnow in the gdb call and first > telling gdb to "break __gnat_debug_raise_exception" work on GNAT GPL > 2015 but not GPL 2014 on my machine running OS X 10.9.5. I also have > FSF gcc-4.9.1 installed but it isn't codesigned and I didn't bother > with trying it. If this would be useful feedback I will do that > (codesign, reboot). > > For GPL 2015, behavior was the same whether or not I used -readnow. In > both cases, I had to first "start" before having "catch exception" > recognized. I'm running 10.11.3 (El Capitan), which requires -readnow (or maybe the break?) for both GNAT GPL 2015 and FSF GCC 5.2.0. I certainly don't have to 'start'! I can't investigate for earlier OS releases, sorry. I don't think codesigning makes any difference to whether 'catch exception' is accepted.