Debugging Generics with GNAT 3.07 
Author Message
 Debugging Generics with GNAT 3.07

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 de{*filter*}
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



Sun, 03 Oct 1999 03:00:00 GMT  
 Debugging Generics with GNAT 3.07

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!)



Mon, 04 Oct 1999 03:00:00 GMT  
 Debugging Generics with GNAT 3.07

Quote:

> 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.



Fri, 08 Oct 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. GNAT 3.07 v. GNAT 3.09

2. GNAT 3.07 MsDos/DJGPP bug report to whom?

3. gnat 3.07

4. Problem with installing GNAT 3.07

5. UNIX Texteditor for GNAT Ada95 3.07

6. GNAT 3.07 DOS Questions??

7. gnat 3.07 DOS

8. Gnat 3.07 for OS/2

9. GNAT 3.07 public release

10. ez2load GNAT 3.07

11. Gnat 3.07 undefined reference?

12. des ennuis avec gnat 3.07

 

 
Powered by phpBB® Forum Software