Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* Symbolic debugger on OpenVMS AXP
@ 1994-05-04 14:59 Igor Kapuscinski
  1994-05-04 18:00 ` Steve DiPirro
  1994-05-10 13:06 ` Jeff Diewald
  0 siblings, 2 replies; 3+ messages in thread
From: Igor Kapuscinski @ 1994-05-04 14:59 UTC (permalink / raw)


Hello, our group is doing evaluation of Alpha system, and it appears that 
the symbolic debugger's behavior is different than on Vax. Here are 
comments from the software developers.
1. " Per documentation, the symbolic debugger cannot examine/deposit 
variable length variant records. This is likely to cause problems with 
Ada program development until this is fixed."

Is it this a correct note in the documentation, if it is; to us it is a 
major show stopper in pursuing Vax replacement. 

Is there a work around.?


2. "The debugger also cannot consistently STEP/INTO called routines. THis 
maybe related to:
	a. calling generic subprogram parameters
	b. inlined code
	c. a general problem mapping machine addresses to source code
	d. nore recognizing different sequences of machine instructions
A work arount to this is to SET BREAK in the destination routine rather 
than attempting to STEP/INTO it."

The bottom line is: our developers are not supporting an idea to move 
from the VAX to Alpha, because of this development problems.

Question to all: Have you encountered the same bahavior with your 
debugging process when migrating to Alpha AXP.?

Our development environment is mostly composed from DEC Ada (3.0A), DEC 
Fortran, DEC Pascal, DEC Set under OpenVMS AXP umbrella.

Thanks, Igor Kapuscinski
	NASA/GSFC





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

* Re: Symbolic debugger on OpenVMS AXP
  1994-05-04 14:59 Symbolic debugger on OpenVMS AXP Igor Kapuscinski
@ 1994-05-04 18:00 ` Steve DiPirro
  1994-05-10 13:06 ` Jeff Diewald
  1 sibling, 0 replies; 3+ messages in thread
From: Steve DiPirro @ 1994-05-04 18:00 UTC (permalink / raw)



In article <2q8d89$qq5@access1.digex.net>, igork@access1.digex.net (Igor Kapuscinski) writes...
>1. " Per documentation, the symbolic debugger cannot examine/deposit 
>variable length variant records. This is likely to cause problems with 
>Ada program development until this is fixed."

Maybe someone from the DEBUG engineering team is reading this and can
comment...but if true, this sounds like a bug to me. This would be a
showstopper problem for debugging code in a lot of languages, not just
Ada.

>2. "The debugger also cannot consistently STEP/INTO called routines. THis 
>maybe related to:
>	a. calling generic subprogram parameters
>	b. inlined code
>	c. a general problem mapping machine addresses to source code
>	d. nore recognizing different sequences of machine instructions

You will definitely see different behavior here than on VAX, but you'll
see this sort of behavior on any RISC architecture where compilers do a
lot of the optimizing work. So routines are inlined, loops unrolled, etc.,
making a HLL source statement potentially jump all over the place in the
machine code. If you compile /NOOPT, then you don't see as much of this.
However, it's also possible to mask the problem you're trying to debug
this way. So there is considerable effort underway to improve user feedback
and understanding of what's going on during debugging of optimized code.
Problem "c" above is either a bug or a misinterpretation of one of the other
problems. When you appear to be jumping around in the machine code but on
the same source line statement, you might think there's such a problem.

Our experience is that developers quickly get used to the new environment
and those with RISC experience from other architectures adjust most
quickly.

------------
Steve DiPirro        dipirro@star.enet.dec.com

------------


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

* Re: Symbolic debugger on OpenVMS AXP
  1994-05-04 14:59 Symbolic debugger on OpenVMS AXP Igor Kapuscinski
  1994-05-04 18:00 ` Steve DiPirro
@ 1994-05-10 13:06 ` Jeff Diewald
  1 sibling, 0 replies; 3+ messages in thread
From: Jeff Diewald @ 1994-05-10 13:06 UTC (permalink / raw)



In article <2q8d89$qq5@access1.digex.net>, igork@access1.digex.net (Igor Kapuscinski) writes:
|>Hello, our group is doing evaluation of Alpha system, and it appears that 
|>the symbolic debugger's behavior is different than on Vax. Here are 
|>comments from the software developers.

Igor, 
   I took your questions to the OpenVMS Debugger project leader.  Here
are her answers:

>1. Per documentation, the symbolic debugger cannot examine/deposit 
>variable length variant records. This is likely to cause problems with 
>Ada program development until this is fixed."

The documentation is an overstatement of the actual restrictions.  The more
accurate statement would be "the debugger does not support symbolic debugging
of components of records whose offsets or bounds are not known at compile time".

For example, consider the following case compiled /NOOPT/DEBUG and linked 
/DEBUG:

	procedure Tmp is
	    type T(D : Natural) is
		record
		    C : Integer;
		    S : String(1..D);
		end record;
	     
	    Y : T(10);

	    procedure P(X : in out T) is
	    begin
		X.S(1) := 'a';
	    end P;

	begin
	    Y := (10, 5, "1234567890");
	    P(Y);
	end Tmp;

	Debug> set break P
	Debug> go
	Debug> examine X
	TMP.P.X
	    D:  10
	    C:  5
	    S:  "1"

You see that the debugger could examine all the components of X correctly,
except the S one, whose bounds are not known at compile time.  You can still
examine X.S, but only by resorting to assembly level debugging:

	Debug> DBG> ex/ascii x.s:x.s+9
	2144892840:     "1"
	2144892841:     "2"
	2144892842:     "3"
	2144892843:     "4"
	2144892844:     "5"
	2144892845:     "6"
	2144892846:     "7"
	2144892847:     "8"
	2144892848:     "9"
	2144892849:     "0"

Components that follow a dynamic component, such as S, have be be examined 
purely at assembly level debugging.  Fortunately, they are relatively rare.

>2. "The debugger also cannot consistently STEP/INTO called routines.
>    This maybe is related to:
>
>	a. calling generic subprogram parameters

We are not aware of any problems calling generic subprogram parameters.  

However, if you are using shared generics, and if the actual subprogram 
parameter has a different calling convention than the shared generic expects, 
you should be aware that the Ada compiler builds a jacket routine that in 
turn calls the actual subprogram.  In order to STEP/INTO the shared generic,
you must issue the STEP/INTO command twice:  the first time this command is
executed, execution will pause in the jacket routine built by the compiler, 
the second time the command is executed, execution will pause in the actual
shaed generic.


>	b. inlined code

The debugger release notes, for all versions of the OpenVMS AXP Debugger
(V1.0, V1.5 and V6.1), document the following restriction concerning stepping
through inlined code in programs compiled /OPTIMIZE:

	Debugging Inlined Routines

		The debugger does not support attempts to debug inlined
		routines.  If you attempt to debug an inlined routine, 
		the debugger issues a message that it cannot access the 
		routine, as shown in the following example:

		%DEBUG-E-ACCESSR, no read access to address 00000000

		To work around this problem, compile your program with the 
		/NOOPTIMIZE qualifier.

However, this should not be a problem if you are debugging a program which
has been compiled /NOOPTIMIZE (which is the recommended manner to compile
a program in preparation for debugging).  If you are having problems stepping 
through inlined code which has been compiled /NOOPTIMIZE, please post a sample
program here, which demonstrates this problem, and we will look into it 
futher.

Here is an example, using OpenVMS AXP Debug V1.5-000, of stepping into the 
inline expansion of a routine:

    Debug> type 1:25		    ! These are the real source lines
	 1: procedure Tmp is
	 2:
	 3:     X : Integer;
	 4:
	 5:     procedure P is
	 6:     begin
	 7:         X := X+1;
	 8:     end P;
	 9:     pragma Inline(P);
	10:
	11:     procedure Q is separate;
	12:
	13: begin
	14:     X := 1;
	15:     P;
	16:     Q;
	17: end Tmp;
	18:
	19:
	20: separate(Tmp)
	21:     procedure Q is
	22:     begin
	23:         X := X+1;
	24:         P;
	25:     end Q;

    Debug> type 26:38		    ! These are the expansion from inlining P
	26:     begin
	27:         X := X+1;
	28:     end P;

    Debug> Go			    ! Your program's elaboration stops, and the
    break at routine TMP:   TRAPB   ! main program starts, at line 15
	15:     P;

    Debug> step/line/into
    stepped to TMP.%LINE 27:        BIS             R31,#X02,R0
	27:         X := X+1;


>	c. a general problem mapping machine addresses to source code
>	d. nor recognizing different sequences of machine instructions

We are not aware of any serious problems with the debugger, when stepping by 
line, in either of these areas.  However, the Ada compiler group has recently
fixed some problems, in these regions, in the version of the Ada compiler 
currently under development.

Note that if you step by instruction rather than by line, you will expose the 
implementation details of the OpenVMS AXP Calling Standard.  In particular, a 
routine does not become active until its prolog has executed, the end of which 
is marked by an instruction similar to "BIS R31,SP,FP".  As long as you step by 
line, the debugger will automatically execute the prolog instructions for you, 
so there won't be any confusion.  If you step by instruction, then you'll step 
past each instruction of the prolog as it executes.

If you are having specific problems stepping through code or with the debugger
mapping machine instructions to source code, a small sample program, which 
demonstrates the problem, would be of great help to verify if the problem
still exists in the current version of the debugger and/or Ada compiler.  Also, 
when reporting problems with the debugger, please post the version of the 
debugger you are currently using and the exact sequence of debugger commands 
used to reproduce the problem.  

[end of OpenVMS Debugger project leader's comments]

|>
|>The bottom line is: our developers are not supporting an idea to move 
|>from the VAX to Alpha, because of this development problems.
|>
|>Question to all: Have you encountered the same bahavior with your 
|>debugging process when migrating to Alpha AXP.?
|>
|>Our development environment is mostly composed from DEC Ada (3.0A), DEC 
|>Fortran, DEC Pascal, DEC Set under OpenVMS AXP umbrella.

[Back to my comments]  You will find differences in behavior when you switch
from one architecture to another.  The OpenVMS Debugger team and the
other software groups have worked very hard (and for a long time now) to make 
the VAX to Alpha transition as easy and painless as possible.  The biggest
reason for this is because that's what you demand.  There's also the fact
that we had to make the transition as well, and we wanted it to be fast
and easy on ourselves too! 
-----------------------------------------------------------------------------
	Jeff Diewald			EASYNET:   VIRRUS::DIEWALD
	DECladebug group		INTERNET:  diewald@virrus.zko.dec.com
	Digital Equipment Corp.

Note: I don't read every article in this group.  If you have debugger 
questions, I may be able to get you an answer.  You're much more likely to 
get an answer if you put "Debug" somewhere in your subject line.


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

end of thread, other threads:[~1994-05-10 13:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-05-04 14:59 Symbolic debugger on OpenVMS AXP Igor Kapuscinski
1994-05-04 18:00 ` Steve DiPirro
1994-05-10 13:06 ` Jeff Diewald

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