From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,f7bd794ab23aca4a X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1994-05-10 06:28:19 PST Path: bga.com!news.sprintlink.net!sundog.tiac.net!usenet.elf.com!rpi!usc!elroy.jpl.nasa.gov!decwrl!pa.dec.com!virrus.zko.dec.com!diewald From: diewald@virrus.zko.dec.com (Jeff Diewald) Newsgroups: comp.sys.dec Subject: Re: Symbolic debugger on OpenVMS AXP Date: 10 May 1994 13:06:18 GMT Organization: Digital Equipment Corporation Distribution: world Message-ID: <2qo0sa$kup@usenet.pa.dec.com> References: <2q8d89$qq5@access1.digex.net> Reply-To: diewald@virrus.zko.dec.com (Jeff Diewald) NNTP-Posting-Host: virrus.zko.dec.com X-Newsreader: mxrn 6.18-9 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.