comp.lang.ada
 help / color / mirror / Atom feed
* Anyone built a debugger for Ada?
@ 1994-11-12 12:37 Maarten Landzaat
  1994-11-14  3:42 ` Henri Altarac
  0 siblings, 1 reply; 6+ messages in thread
From: Maarten Landzaat @ 1994-11-12 12:37 UTC (permalink / raw)


Hi,

I'm trying to build a simple debugger for Ada programs, because Adaprobe
(debugger from Alsys) does not work in our environment. I'll describe
my plans below. Maybe you have any experience in this field, or have
other useful suggestions for me. I'd be thankful for your response!

I am currently developing a filter for Ada source files, that basically
adds 'debug'-code, like "entering procedure DO_THIS", or "I'm on line
234 of file MAIN.ADA now", or "variable 'i' has type 'T' and is on
address 2345 now". All these messages will be passed to a debugger-'kernel',
which will be able to display certain variables when the program happens
to be on a certain line in the source code.

I use AYACC/AFLEX with the supplied Ada grammar for the filter. I just got
it to work, and with a few statements I managed to add lines that
log the entering/exiting of procedures, and display 'in' and 'inout' 
parameters on procedure entry. It seems like a great tool to add whatever
statements I want.

My problem now is that I need a filter that eats type definitions, and
emits overloaded procedures 'imag()' or something that return string
representations of variables of all the types in any program. 
I thought that maybe someone already built such a tool. If you know
of such a tool, would you please point me in the right direction?

Thanks in advance,
-- 
Maarten Landzaat (gijs@mbase97.xs4all.nl)
Amsterdam, Double bass, Fender Jazz Bass, Atari ST, Roland Sound Canvas.
Listen to M-BASE music!



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

* Re: Anyone built a debugger for Ada?
  1994-11-12 12:37 Anyone built a debugger for Ada? Maarten Landzaat
@ 1994-11-14  3:42 ` Henri Altarac
  1994-11-14  6:46   ` Maarten Landzaat
  0 siblings, 1 reply; 6+ messages in thread
From: Henri Altarac @ 1994-11-14  3:42 UTC (permalink / raw)


Maarten Landzaat (gijs@mbase97.xs4all.nl) wrote:
: Hi,

: I'm trying to build a simple debugger for Ada programs, because Adaprobe
: (debugger from Alsys) does not work in our environment. I'll describe

 
Can you elaborate. Why cannot you use AdaProbe? (and what did Alsys say ?)
 
Your approch will probably work but it looks like your                    
program will end up being quite large with all the add-on code and the
execution will sure be slow if you trace every line.
 
Building the 'image for any type is going to be quite complex. I suggest
you look into ASIS that brings you a higher level description of your
application instead of lex/yacc.


-----
Henri Altarac		haltarac@rain.org		Santa Barbara.




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

* Re: Anyone built a debugger for Ada?
  1994-11-14  3:42 ` Henri Altarac
@ 1994-11-14  6:46   ` Maarten Landzaat
  1994-11-15 17:55     ` Henri Altarac
  1994-11-18 21:53     ` Pascal Martin @lone
  0 siblings, 2 replies; 6+ messages in thread
From: Maarten Landzaat @ 1994-11-14  6:46 UTC (permalink / raw)


In <3a6mbe$clc@coyote.rain.org>, Henri Altarac writes:
>Maarten Landzaat (gijs@mbase97.xs4all.nl) wrote:
>: Hi,
>
>: I'm trying to build a simple debugger for Ada programs, because Adaprobe
>: (debugger from Alsys) does not work in our environment. I'll describe
>
> 
>Can you elaborate. Why cannot you use AdaProbe? (and what did Alsys say ?)

Our target is a special 68000 board. I don't know the details, since
another team actually deals with this thing, but I understand that
the compiler or parts of it has been rewritten for this particular target.
Also, there is an Ada_Connect package that allows us to talk to the
68000 over the bus. The team told me that when this package  is used,
Adaprobe doesn't run. 

Alsys says: "We'll fix it". It's been saying this for over a year now.
It's still not fixed, so in the meantime we're doing what we can.

> 
>Your approch will probably work but it looks like your                    
>program will end up being quite large with all the add-on code and the
>execution will sure be slow if you trace every line.

I'm aware of that. But how do you 'step' with a real debugger? Doesn't
that also work with added code between every source line?

>Building the 'image for any type is going to be quite complex. I suggest
>you look into ASIS that brings you a higher level description of your
>application instead of lex/yacc.

Thanks, I'll look into that.

-- 
Maarten Landzaat (gijs@mbase97.xs4all.nl)
Amsterdam, Double bass, Fender Jazz Bass, Atari ST, Roland Sound Canvas.
Listen to M-BASE music!



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

* Re: Anyone built a debugger for Ada?
  1994-11-14  6:46   ` Maarten Landzaat
@ 1994-11-15 17:55     ` Henri Altarac
  1994-11-17 11:56       ` Maarten Landzaat
  1994-11-18 21:53     ` Pascal Martin @lone
  1 sibling, 1 reply; 6+ messages in thread
From: Henri Altarac @ 1994-11-15 17:55 UTC (permalink / raw)



: Also, there is an Ada_Connect package that allows us to talk to the
: 68000 over the bus. The team told me that when this package  is used,
: Adaprobe doesn't run. 
I don't know much about AdaConnect and its problems with AdaProbe.
However, I believe there must be a customizable part of the AdaProbe
kernel that runs on your target. In this part Alsys must have left
some routines like write-to-host and read-from-host for the low level
dialog between AdaProbe on the Host and its agent on the target. 
In those routines, there must be a way to redirect the AdaProbe protocol
through a serial line. It is tricky but can certainly be done.

Another solution. If your bus is a VME bus, you can probably add another
board in your rack like a MVME147 (a 68040, plenty of ram and an Ethernet
controller).Then your AdaProbe io routines can be
implemented by using AdaConnect to talk to an application on the MVME147
which will just be a relay between your target and the Host AdaProbe (going
through Ethernet).

All that is not easy but if you have a good base software team, they 
can make it happen (eventually since Alsys is late in fixing the
problems, you can ask them for some support/assistance).

: I'm aware of that. But how do you 'step' with a real debugger? Doesn't
: that also work with added code between every source line?

No. A debugger modifies a running program. When you set a break at a
given address, the debugger replaces the instruction at this address by
a special instruction (illegal instr, interrupt, trap or whatever) that
generates a software trap when executed (of course, the debugger must
declare itself as the trap handler). Another feature found on most
processors is a the Trace mode. When in this mode, the processor will
return control to the debugger after executing one instruction of
the user program. These two features combined let you implement
breakpoints and step into/over or anything else. On unix, you have
a general interface that hides all this. try man ptrace.
Anyway, this is not the way you want to go...

-----
Henri Altarac		haltarac@rain.org		Santa Barbara




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

* Re: Anyone built a debugger for Ada?
  1994-11-15 17:55     ` Henri Altarac
@ 1994-11-17 11:56       ` Maarten Landzaat
  0 siblings, 0 replies; 6+ messages in thread
From: Maarten Landzaat @ 1994-11-17 11:56 UTC (permalink / raw)


In <3aasnc$iog@coyote.rain.org>, Henri Altarac writes:
>
>: Also, there is an Ada_Connect package that allows us to talk to the
>: 68000 over the bus. The team told me that when this package  is used,
>: Adaprobe doesn't run. 
>I don't know much about AdaConnect and its problems with AdaProbe.
>However, I believe there must be a customizable part of the AdaProbe
>kernel that runs on your target. In this part Alsys must have left
>some routines like write-to-host and read-from-host for the low level
>dialog between AdaProbe on the Host and its agent on the target. 
>In those routines, there must be a way to redirect the AdaProbe protocol
>through a serial line. It is tricky but can certainly be done.

Communication with Alsys on this topic is cumbersome. And I don't think
we will get Adaprobe's source code easily. 

>Another solution. If your bus is a VME bus, you can probably add another
>board in your rack like a MVME147 (a 68040, plenty of ram and an Ethernet
>controller).Then your AdaProbe io routines can be
>implemented by using AdaConnect to talk to an application on the MVME147
>which will just be a relay between your target and the Host AdaProbe (going
>through Ethernet).
>
>All that is not easy but if you have a good base software team, they 
>can make it happen (eventually since Alsys is late in fixing the
>problems, you can ask them for some support/assistance).

The problem is that the team with enough knowledge of the system is to be
left alone, fixing other problems. That's why I'm going for the Ada-only
approach. I'm reasonably familiar with Ada.


>
>: I'm aware of that. But how do you 'step' with a real debugger? Doesn't
>: that also work with added code between every source line?
>
> (explanation deleted)

Thanks for the information. But you're right, I don't plan to do
'real' debugging.

-- 
Maarten Landzaat (gijs@mbase97.xs4all.nl)
Amsterdam, Double bass, Fender Jazz Bass, Atari ST, Roland Sound Canvas.
Listen to M-BASE music!



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

* Re: Anyone built a debugger for Ada?
  1994-11-14  6:46   ` Maarten Landzaat
  1994-11-15 17:55     ` Henri Altarac
@ 1994-11-18 21:53     ` Pascal Martin @lone
  1 sibling, 0 replies; 6+ messages in thread
From: Pascal Martin @lone @ 1994-11-18 21:53 UTC (permalink / raw)


In <H.eg.kMsvbGjVCtM@mbase97.xs4all.nl> gijs@mbase97.xs4all.nl (Maarten Landzaat) writes:

>In <3a6mbe$clc@coyote.rain.org>, Henri Altarac writes:
>>Maarten Landzaat (gijs@mbase97.xs4all.nl) wrote:
>>: Hi,
>>
>>: I'm trying to build a simple debugger for Ada programs, because Adaprobe
>>: (debugger from Alsys) does not work in our environment. I'll describe
>>
>> 
>>Can you elaborate. Why cannot you use AdaProbe? (and what did Alsys say ?)

>Our target is a special 68000 board. I don't know the details, since
>another team actually deals with this thing, but I understand that
>the compiler or parts of it has been rewritten for this particular target.
>Also, there is an Ada_Connect package that allows us to talk to the
>68000 over the bus. The team told me that when this package  is used,
>Adaprobe doesn't run. 

>Alsys says: "We'll fix it". It's been saying this for over a year now.
>It's still not fixed, so in the meantime we're doing what we can.

I remember a problem that was a deadlock on the target side when both the
application and AdaConnect was trying to access the same Enet-1 Ethernet
board. the problem was due to the way the Enet-1 board is managing the
interrupt. Actually, this was the Enet-1 board that was blocked.. because
it was unable to do anything else while waiting for an interrupt acknowledge.
But the program was running in the debugger part, with all the Interrupts
blocked.

Do you called the Enet-1 vendor (if you use this board), so to have a meeting
together with you (the customer), Alsys and the Enet-1 vendor ? I think this
is the more effective way to solve such problems.

But there is a possible confusion here, as you talk about a 'bus':

(ads section starts here :-)

 Alsys has a multiprocessor communication package, compatible with the
previous AdaConnect for Enet-1, named AdaConnect/BUS.

(ads section ends here :-)

 Perhaps you was talking about this one. So here is a small discussion:

 This package has been debugged with AdaProbe. We don't have encountered
any problem with Adaprobe (the Alsys debugger), except one, that is a
general one:

	in AdaConnect BUS, there are timeout.

 When you stop one processor, because a breakpoint, all the other processors
discover your own one do not answer anymore. So the break all the established
connections. And your system cannot work anymore.

 There is, in the AdaConnect documentation, a description of how to remove
this timeout feature.

I hope this may help.

Pascal.




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

end of thread, other threads:[~1994-11-18 21:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1994-11-12 12:37 Anyone built a debugger for Ada? Maarten Landzaat
1994-11-14  3:42 ` Henri Altarac
1994-11-14  6:46   ` Maarten Landzaat
1994-11-15 17:55     ` Henri Altarac
1994-11-17 11:56       ` Maarten Landzaat
1994-11-18 21:53     ` Pascal Martin @lone

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