comp.lang.ada
 help / color / mirror / Atom feed
From: James Rogers <jimmaureenrogers@att.net>
Subject: Re: How to debug an Ada program
Date: Tue, 15 Jul 2003 04:22:42 GMT
Date: 2003-07-15T04:22:42+00:00	[thread overview]
Message-ID: <Xns93B8E2D16CD36jimmaureenrogers@204.127.36.1> (raw)
In-Reply-To: 3F1356DB.D9032D0@adaworks.com

Richard Riehle <richard@adaworks.com> wrote in 
news:3F1356DB.D9032D0@adaworks.com:

> Preben Randhol wrote:
> 
>> Yes I agree with this. I rarely use gdb or gvd myself with Ada. Best way
>> to trace a program line by line is reading the source :-) Sometimes when
>> trying to get an understanding somebody else's program it can go a bit
>> faster if you use a debugger to clear up some things though.
> 
> Debuggers are  not always  for finding bugs.   Sometimes, especially
> for embedded systems,  a debugger is useful for discovering just that
> little bit more about the program you plan to deploy.    HP used to have
> a great little tool for the 1750A called the HP 65000 that   served well
> in this role.
> 
>

The HP 64000 was an in-circuit emulator with a decent debugger. One of the
nice features of this tool was its use of dual-ported memory so that 
program trace data could be collected while the program was running at full
speed. This allowed very accurate determination of full speed timing
issues.

The HP 64000 was available for a wide range of processors, mostly from
Intel and Motorola. 

I first learned Ada while supporting the HP 64000 debugger. The debugger
was primarily targeted to C, but also provided some Ada support. My job
was to test the debug information produced by compilers and determine if
they were correct. If a problem was found with the debugger I had to
determine if the problem was a fault in the debug information or a fault
in the compiler logic.

The debug formats such as IEEE 695, contained a lot of data modes needed 
by C which could not be created by an Ada compiler. One that comes to
mind is an incomplete forward reference. The Ada equivalent, which 
would not compile might be:

package example is
   type forward;
   type forward_Access is access forward;
end example;

Note that type forward is never completed. Ada compilers will not 
generate code containing such problems. They will instead provide
error messages and no object file. C compilers may produce a
warning, but they will also produce an object file.

When using the Aonix compiler several years ago I encountered a
programmer who was very familiar with the Microsoft Visual C++
environment. The Aonix compiler produces debug data compatible
with the Microsoft Visual debugger. The programmer learned Ada
in about a week. He then customized his Visual Development
Studio to work with Ada. He insisted that the Microsoft
debugger worked better with the Aonix product than it did with
the Microsoft Visual C++. One example was that he could see
the elements of an array in Ada, while he could only see the
address of the array using C++.

Jim Rogers



  reply	other threads:[~2003-07-15  4:22 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-09  4:42 How to debug an Ada program mauricio
2003-07-09  7:30 ` Preben Randhol
2003-07-09 16:07 ` Pascal Obry
2003-07-09 17:16   ` Cephus�
2003-07-09 21:28     ` Robert I. Eachus
2003-07-10  3:37       ` Cephus�
2003-07-10  5:05         ` Robert I. Eachus
2003-07-10  7:25   ` Preben Randhol
2003-07-10 22:49     ` mauricio
2003-07-15  1:20     ` Richard Riehle
2003-07-15  4:22       ` James Rogers [this message]
2003-07-15 12:09       ` Marin David Condic
2003-07-11 13:05   ` Debugger Rant (was Re: How to debug an Ada program) Marc A. Criley
2003-07-11 13:26     ` Preben Randhol
2003-07-11 14:36       ` Dmitry A. Kazakov
2003-07-11 15:13     ` Jerry Petrey
2003-07-11 18:42       ` Robert I. Eachus
2003-07-12  2:26         ` Alexander Kopilovitch
2003-07-15 23:33           ` Robert I. Eachus
2003-07-11 19:36     ` Wesley Groleau
2003-07-11 20:33       ` Preben Randhol
2003-07-11 21:26         ` Wesley Groleau
2003-07-12  7:07     ` Brian Catlin
2003-07-15 23:34       ` Robert I. Eachus
2003-07-16 19:24         ` Debugger Rant Marc A. Criley
2003-07-17  2:21           ` Alexander Kopilovitch
2003-07-18 19:52             ` Robert I. Eachus
2003-07-19  9:51               ` Pascal Obry
2003-07-17 16:33           ` Wesley Groleau
replies disabled

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