comp.lang.ada
 help / color / mirror / Atom feed
From: vladimir@speedy.intrepid.com (Vladimir Vukicevic)
Subject: Re: debugging GNAT programs
Date: 03 Mar 1995 04:57:17 GMT
Date: 1995-03-03T04:57:17+00:00	[thread overview]
Message-ID: <VLADIMIR.95Mar2205718@speedy.intrepid.com> (raw)
In-Reply-To: marc@sei.cmu.edu's message of Thu, 2 Mar 1995 09:52:43 EST

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



  parent reply	other threads:[~1995-03-03  4:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-03-02 14:52 debugging GNAT programs Marc Graham
1995-03-02 16:52 ` Robert A Duff
1995-03-03  2:47   ` Pug 156
1995-03-04  4:26     ` Tom Griest
1995-03-05 19:20       ` Bernard Banner
1995-03-06 19:34         ` Tom Griest
1995-03-02 22:23 ` Keith Thompson
1995-03-03 22:33   ` Robert S. White
1995-03-05 15:42     ` Robert Dewar
1995-03-05 15:52     ` Robert Dewar
1995-03-06  0:38       ` kkrieser
1995-03-06 15:14       ` Robert S. White
1995-03-03  4:57 ` Vladimir Vukicevic [this message]
1995-03-04 14:07   ` Cyrille Comar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox