comp.lang.ada
 help / color / mirror / Atom feed
* debugging ada with gdb
@ 2003-02-24 23:09 alfonso acosta
  2003-02-25  8:32 ` Rodrigo García
  0 siblings, 1 reply; 9+ messages in thread
From: alfonso acosta @ 2003-02-24 23:09 UTC (permalink / raw)


Hi:

Im trying to debug an Ada program compiled with gnat 3.14p-3.
Im using "GNU gdb 5.3-debian" with gvd.

The problem is that I cant use ada expressions when debugging, I have to 
guess what identifier correponds to each variable.

If I finally manage to know whats the name for a structured variable (an 
array, a record etc.. ) and I print it, I get a strange structure, maybe 
GNATs internal representation.

Im using incompatible debugger and compiler versions?


Thanks in Advance

Alfonso Acosta

PS: Im using Debian GNU/Linux (sid)




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

* Re: debugging ada with gdb
  2003-02-24 23:09 debugging ada with gdb alfonso acosta
@ 2003-02-25  8:32 ` Rodrigo García
  2003-02-25 10:38   ` Preben Randhol
  0 siblings, 1 reply; 9+ messages in thread
From: Rodrigo García @ 2003-02-25  8:32 UTC (permalink / raw)


alfonso acosta wrote:
> Hi:
> 
> Im trying to debug an Ada program compiled with gnat 3.14p-3.
> Im using "GNU gdb 5.3-debian" with gvd.
> 
> The problem is that I cant use ada expressions when debugging, I have to 
> guess what identifier correponds to each variable.
> 
> If I finally manage to know whats the name for a structured variable (an 
> array, a record etc.. ) and I print it, I get a strange structure, maybe 
> GNATs internal representation.
> 
> Im using incompatible debugger and compiler versions?
> 
> 
> Thanks in Advance
> 
> Alfonso Acosta
> 
> PS: Im using Debian GNU/Linux (sid)
> 

   Use the gdb that comes with your GNAT distribution (look at "bin" 
folder). It should output something like this:

GNU gdb 5.1.1.gnat.3.15p
Copyright 2002 Free Software Foundation, Inc.
Ada Core Technologies version of GDB for GNAT Professional
....

   Then, take a look at chapter 23 of GNAT's Users Guide.

Rodrigo

PD: What about your "waiting for signals" problem? Did you try what I 
told you?




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

* Re: debugging ada with gdb
  2003-02-25  8:32 ` Rodrigo García
@ 2003-02-25 10:38   ` Preben Randhol
  2003-02-25 15:46     ` alfonso acosta
  0 siblings, 1 reply; 9+ messages in thread
From: Preben Randhol @ 2003-02-25 10:38 UTC (permalink / raw)


Rodrigo Garc�a wrote:
>    Use the gdb that comes with your GNAT distribution (look at "bin" 
> folder). It should output something like this:

In Debian it is the Gnat 3.14p which is te current stable compiler. The
next compiler will be gnat 3.2 (gcc). the Gnat 3.14p in Debian does not
contain the Ada-aware gdb.

However (http://www.velvet.net/~aidan/tech/programming.html):

Ada support for GDB

   I've modifed ACT's patch for GDB5 so that it builds cleanly against
   GDB 5.2. It hasn't been imported into the mainline yet, but hopefully
   will be soon. Apply it in the top level directory with patch. It was
   last tested against the CVS snapshot from 2002-07-09. You can
   download it here. If you use it, and especially if you have any
   problems with it, please email me.


-- 
Preben Randhol ---------------- http://www.pvv.org/~randhol/ --
"Violence is the last refuge of the incompetent", Isaac Asimov



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

* Re: debugging ada with gdb
  2003-02-25 10:38   ` Preben Randhol
@ 2003-02-25 15:46     ` alfonso acosta
  2003-02-25 15:54       ` Preben Randhol
  0 siblings, 1 reply; 9+ messages in thread
From: alfonso acosta @ 2003-02-25 15:46 UTC (permalink / raw)


Preben Randhol wrote:
> However (http://www.velvet.net/~aidan/tech/programming.html):
> 
> Ada support for GDB
> 
>    I've modifed ACT's patch for GDB5 so that it builds cleanly against
>    GDB 5.2. It hasn't been imported into the mainline yet, but hopefully
>    will be soon. Apply it in the top level directory with patch. It was
>    last tested against the CVS snapshot from 2002-07-09. You can
>    download it here. If you use it, and especially if you have any
>    problems with it, please email me.

I downloaded debian sid gdb package (currently version 5.3) against 
which I tried to apply that patch, and of course, failed. I mailed the 
author, maybe he can fix it to work with 5.3

Did you try the patch?






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

* Re: debugging ada with gdb
  2003-02-25 15:46     ` alfonso acosta
@ 2003-02-25 15:54       ` Preben Randhol
  2003-02-25 19:00         ` alfonso acosta
  0 siblings, 1 reply; 9+ messages in thread
From: Preben Randhol @ 2003-02-25 15:54 UTC (permalink / raw)


alfonso acosta wrote:
> I downloaded debian sid gdb package (currently version 5.3) against 
> which I tried to apply that patch, and of course, failed. I mailed the 
> author, maybe he can fix it to work with 5.3

Get the gdb 5.2.cvs20020401-6 from stable instead and try this.

-- 
Preben Randhol ---------------- http://www.pvv.org/~randhol/ --
"Violence is the last refuge of the incompetent", Isaac Asimov



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

* Re: debugging ada with gdb
  2003-02-25 15:54       ` Preben Randhol
@ 2003-02-25 19:00         ` alfonso acosta
  2003-02-26  8:23           ` Preben Randhol
  0 siblings, 1 reply; 9+ messages in thread
From: alfonso acosta @ 2003-02-25 19:00 UTC (permalink / raw)


Preben Randhol wrote:
> alfonso acosta wrote:
> 
>>I downloaded debian sid gdb package (currently version 5.3) against 
>>which I tried to apply that patch, and of course, failed. I mailed the 
>>author, maybe he can fix it to work with 5.3
> 
> 
> Get the gdb 5.2.cvs20020401-6 from stable instead and try this.
> 
Ok, I'll do it. Ive just realized that gnat3.2 is aviable for debian 
sid. I downloded it and it has the same problems with gdb 5.3.

The incompatibility between non-patched gdb and gnat is gnat or gdbs 
fault? (please, bear in mind that I'm not familiarized with compiler 
debugging information and techniques, and maybe I'm simplifying the problem)

Thanks:

Alfonso Acosta





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

* Re: debugging ada with gdb
  2003-02-25 19:00         ` alfonso acosta
@ 2003-02-26  8:23           ` Preben Randhol
  2003-02-27  6:59             ` Oliver Kellogg
  0 siblings, 1 reply; 9+ messages in thread
From: Preben Randhol @ 2003-02-26  8:23 UTC (permalink / raw)


alfonso acosta wrote:
> Ok, I'll do it. Ive just realized that gnat3.2 is aviable for debian 
> sid. I downloded it and it has the same problems with gdb 5.3.
> 
> The incompatibility between non-patched gdb and gnat is gnat or gdbs 
> fault? (please, bear in mind that I'm not familiarized with compiler 
> debugging information and techniques, and maybe I'm simplifying the problem)

Gnat has used the 2.8.1 gcc backend while gcc has moved on. I think the
reason why gdb doesn't work with Ada is because of the changes in gcc,
but I'm not sure about this. Somebody else will probably explain it
correctly. Now that Ada is included in the gcc, things ought to be
easier though.

At any rate there is a patch made by Adian Skinner for the 5.2. I hope
the patch gets accepted can be maintained so that gvd and gps will be
able to work with the gdb and that one do not have to have a special
version of gdb for Ada.

-- 
Preben Randhol ---------------- http://www.pvv.org/~randhol/ --
"Violence is the last refuge of the incompetent", Isaac Asimov



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

* Re: debugging ada with gdb
  2003-02-26  8:23           ` Preben Randhol
@ 2003-02-27  6:59             ` Oliver Kellogg
  2003-02-27 12:29               ` Preben Randhol
  0 siblings, 1 reply; 9+ messages in thread
From: Oliver Kellogg @ 2003-02-27  6:59 UTC (permalink / raw)


A preliminary version of an Ada aware gdb-5.3 has just been
released by ACT, see

http://sources.redhat.com/ml/gdb/2003-02/msg00558.html

Preben Randhol <randhol+news@pvv.org> wrote in article
slrnb5ou9v.l6.randhol+news@kiuk0152.chembio.ntnu.no...
> alfonso acosta wrote:
> > Ok, I'll do it. Ive just realized that gnat3.2 is aviable for debian
> > sid. I downloded it and it has the same problems with gdb 5.3.
> > [...]
> At any rate there is a patch made by Adian Skinner for the 5.2. I hope
> the patch gets accepted can be maintained so that gvd and gps will be
> able to work with the gdb and that one do not have to have a special
> version of gdb for Ada.
>






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

* Re: debugging ada with gdb
  2003-02-27  6:59             ` Oliver Kellogg
@ 2003-02-27 12:29               ` Preben Randhol
  0 siblings, 0 replies; 9+ messages in thread
From: Preben Randhol @ 2003-02-27 12:29 UTC (permalink / raw)


Oliver Kellogg wrote:
> A preliminary version of an Ada aware gdb-5.3 has just been
> released by ACT, see
> 
> http://sources.redhat.com/ml/gdb/2003-02/msg00558.html

Ah, really good news!

-- 
Preben Randhol ---------------- http://www.pvv.org/~randhol/ --
"Violence is the last refuge of the incompetent", Isaac Asimov



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

end of thread, other threads:[~2003-02-27 12:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-24 23:09 debugging ada with gdb alfonso acosta
2003-02-25  8:32 ` Rodrigo García
2003-02-25 10:38   ` Preben Randhol
2003-02-25 15:46     ` alfonso acosta
2003-02-25 15:54       ` Preben Randhol
2003-02-25 19:00         ` alfonso acosta
2003-02-26  8:23           ` Preben Randhol
2003-02-27  6:59             ` Oliver Kellogg
2003-02-27 12:29               ` Preben Randhol

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