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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cd24ffa36ebe3ef6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-03-03 04:18:04 PST Path: nntp.gmd.de!news.rwth-aachen.de!news.rhrz.uni-bonn.de!news.uni-stuttgart.de!uni-regensburg.de!fauern!zib-berlin.de!news.mathworks.com!uunet!intrepid.intrepid.com!usenet From: vladimir@speedy.intrepid.com (Vladimir Vukicevic) Newsgroups: comp.lang.ada Subject: Re: debugging GNAT programs Date: 03 Mar 1995 04:57:17 GMT Organization: Intrepid Technology, Inc. Message-ID: References: <1995Mar2.095243.14051@sei.cmu.edu> NNTP-Posting-Host: speedy.intrepid.com In-reply-to: marc@sei.cmu.edu's message of Thu, 2 Mar 1995 09:52:43 EST Date: 1995-03-03T04:57:17+00:00 List-Id: In article <1995Mar2.095243.14051@sei.cmu.edu> marc@sei.cmu.edu (Marc Graham) writes: > To those of you using GNAT, do you have any hints about debugging? > Particularly "unhandled exceptions" (currently, GNAT just prints > the message: terminated due to unhandled exception (or something > like that) and, since it terminated, gdb can't find where the > exception was raised. The exception raising routine is called __gnat_raise. Set a breakpoint there to catch exceptions. > (Anyway, gdb debugs the generated c code, not the Ada code. Which > makes it pretty useless.) The main Ada procedure is called _ada_(procedure_name). If your 'main' procedure is called FOO, then set a break on _ada_foo to begin debugging on entry to your program. Another thing to know is that if you want to step into a dispatching call, you have to step through some internal gnat procedures which find the address of the real function in the vtable. -- Vladimir Vukicevic -- vladimir@intrepid.com