TOC PREV NEXT INDEX DOC LIST MASTER INDEX



Debugging Library Unit Elaboration

The Ada program linker generates an elaboration procedure. This procedure is used to elaborate all of the library units that are in the closure of the subprogram that is being linked. There is no ada code associated with the elaboration procedure but it is possible to debug this procedure in machine code using the "Disassembly" feature of the debugger. The procedure has the name __ADA_ELAB.

Begin Debugging the Program

In the Show Data dialog type in the "Expression" __ADA_ELAB, select Show Location and then select Apply. Note that there are two "_" in __ADA_ELAB.

In the debugger window lines similar to the following should have been displayed:

Select Disassembly, View > Show Command Pane. In the Command Pane type "wi 0xxxx" where 0xxxx is the address of the __ADA_ELAB procedure. For example:

The Ada elaboration procedure should now be centered in the disassembly window. The following example is in the PowerPC Assembler but your code will be similar.

Note that after the __ADA_ELAB prologue there is a bl instruction for each of the library level units that have an elaboration procedure. This bl is a "Branch and Link" instruction for the Power PC. Different architectures will have different instructions for a subprogram call. Put a breakpoint at the call to a library unit elaboration procedure and "Step Into" the unit to further debug.


Rational Software Corporation 
http://www.rational.com
support@rational.com
techpubs@rational.com
Copyright © 1993-2002, Rational Software Corporation. All rights reserved.
TOC PREV NEXT INDEX DOC LIST MASTER INDEX TECHNOTES APEX TIPS