comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: [Gnat] Finding exceptions without gdb
Date: 1996/11/05
Date: 1996-11-05T00:00:00+00:00	[thread overview]
Message-ID: <dewar.847200932@merv> (raw)
In-Reply-To: collins-0411960934280001@ratbert.cs.wm.edu


Bob Collins asks

"Is there any way to find out where (in source) exceptions
are raised without using gdb? (And without Put-ting the
information in excception handlers.)"

No, you need to use gdb to get the traceback to find out where an exception
occured (exept on the VMS version, where the system provides traceback
facilities). We assume incidentally you are talking about GNAT (Remember
to say so, it is not always easy to guess!)

Note that gdb is completely non-intrusive, it does not affect your program
in any way up to the point where a breakpoint is hit, so one thing you
can do is to set up scripts that routinely run udner control of gdb (Mike
Feldman does this for his students).

Incidentally, it is not a matter of philosophy that you have to use the
debugger to get tracebacks, just a mmatter of practicality. Providing
traceback capability for a given architecture is hard work, but possible,
as you see in several compilers, but providing it in a target independent
manner is extremely difficult. One of the disadvantages of the GCC approach
is that since it is so incredibly portable (and ported to hundreds of
targets), in order to maintain this portablity, we have to be very wary
of target dependent code.

Eventually we hope to see a general solution to this (the problem is related
to the issue of general exception handling). Meanwhile, using gdb to solve the
problem is easier than you might think, given the guarantee that it is a
non-intrusive debugger, and of course, once you are in gdb you have more
capability than just getting a traceback.





  reply	other threads:[~1996-11-05  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-11-04  0:00 [Gnat] Finding exceptions without gdb Bob Collins
1996-11-05  0:00 ` Robert Dewar [this message]
1996-11-06  0:00 ` Stephen Leake
1996-11-07  0:00   ` Kevin Rigotti DRA
1996-11-06  0:00 ` Stephen Leake
replies disabled

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