comp.lang.ada
 help / color / mirror / Atom feed
* Debugging Generics with GNAT 3.07
@ 1997-04-16  0:00 Rich Maggio
  1997-04-17  0:00 ` Robert Dewar
  0 siblings, 1 reply; 3+ messages in thread
From: Rich Maggio @ 1997-04-16  0:00 UTC (permalink / raw)



I hope some kind soul can help me out here...

I am having problems debugging generic packages using
the GNAT distribution for DOS.  I first started with
GNAT 3.04 and encountered the same difficulty.
I am now using 3.07 and am still having trouble.

I have a generic package called queuel.  It lives in a set
of files called queuel.ads and queuel.adb.  There is a
"public" function in this package called clearqueue().
When I am at a GDB prompt, and I type in break queuel.clearqueue,
it behaves as though I have asked it to set a breakpiont on
a function that does not exist.  I know the issue is not
packages because if I use the same syntax with the name of a function
in a non-generic package, it works fine.

I have also tried the approach of breaking the main program
and stepping into the generic package, but this does not
work either.  The function is executed in its entirety.
It won't let me step into the function contained in the
generic package.

Could someone please help me?  I have asked this question
before and I was told that it should just work.  Maybe
I am missing something obvious, but I cannot figure it
out.  Nothing in the Ada specific documentation for GDB
talks about debugging a generic package.

Additionally, of what use if the program ad.exe?  As far
as I can tell, all it does is fire up GDB and runs the
program.  I cannot find any documentation on this either.
In one of the readme files, it is described as a DOS
UI on top of GDB.  What's the magic?

Any and all help is much appreciated.  If it would be more
appropriate to post this question elsewhere, please let
me know where I should go.  Programming without a debugger
is like trying to change a tire with only a set
of pliers - it can be damn frustrating, though you eventually
get the job done.

Thanks,
Rich Maggio





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Debugging Generics with GNAT 3.07
  1997-04-16  0:00 Debugging Generics with GNAT 3.07 Rich Maggio
@ 1997-04-17  0:00 ` Robert Dewar
  1997-04-21  0:00   ` Gautier
  0 siblings, 1 reply; 3+ messages in thread
From: Robert Dewar @ 1997-04-17  0:00 UTC (permalink / raw)



Rich asks

<<I have a generic package called queuel.  It lives in a set
of files called queuel.ads and queuel.adb.  There is a
"public" function in this package called clearqueue().
When I am at a GDB prompt, and I type in break queuel.clearqueue,
it behaves as though I have asked it to set a breakpiont on
a function that does not exist.  I know the issue is not
packages because if I use the same syntax with the name of a function
in a non-generic package, it works fine.>>

You can't set a breakpoint in the template! It is just that a template,
not code. You can set a breakpoint in a particular instance though, and
you can step into generic instances (at least it certainly works for me!)






^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Debugging Generics with GNAT 3.07
  1997-04-17  0:00 ` Robert Dewar
@ 1997-04-21  0:00   ` Gautier
  0 siblings, 0 replies; 3+ messages in thread
From: Gautier @ 1997-04-21  0:00 UTC (permalink / raw)



dewar@merv.cs.nyu.edu (Robert Dewar) writes:
> Rich asks
> 
> <<I have a generic package called queuel.  It lives in a set
> of files called queuel.ads and queuel.adb.  There is a
> "public" function in this package called clearqueue().
> When I am at a GDB prompt, and I type in break queuel.clearqueue,
> it behaves as though I have asked it to set a breakpiont on
> a function that does not exist.  I know the issue is not
> packages because if I use the same syntax with the name of a function
> in a non-generic package, it works fine.>>
> 
> You can't set a breakpoint in the template! It is just that a template,
> not code. You can set a breakpoint in a particular instance though, and
> you can step into generic instances (at least it certainly works for me!)

N.B.:
In the DOS version (EZ2LOAD), the post-mortem debugging (AD) finds and
shows the lines of the generic code when the instanciation is made
as a separate package.

G.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1997-04-21  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-04-16  0:00 Debugging Generics with GNAT 3.07 Rich Maggio
1997-04-17  0:00 ` Robert Dewar
1997-04-21  0:00   ` Gautier

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