United States    
COMPAQ STORE | PRODUCTS | SERVICES | SUPPORT | CONTACT US | SEARCH
Alpha migration tools

 

.
} About AMT
.
.
.
amt_products.gif (1331 bytes)
} Migration Tools
FX!32
FreePort Express
}Download
}Quick Start
}User's Guide
}White Papers
DECmigrate
} Performance Tools
} Documentation & White Papers
.
.
.
.
.
.
.
.
fpx-name.gif (499 bytes)
User's Guide

Introduction |Translating | Debugging | Performance | fpx messages | fpxr messages

Chapter 3: Debugging a Translation

This chapter provides information on using the dbx debugging tool with fpx and what to do when the problems described in this chapter occur. Specifically, the topics are:

Note: If a translated executable runs, but is slow, you can usually improve performance by retranslating the original SPARC executable. Check the section Executable runs slowly and refer to Chapter 4, Enhancing performance, for detailed instructions on enhancing run-time performance.

Using the dbx debugging tool with fpx

The fpx command includes options that are useful if you plan to use the dbx debugging tool on a translated executable. For example, the -m option produces a machine code listing. Chapter 2, Translating and running an executable, lists all the translation options.

There are limitations when you use dbx on a translated executable. The version of dbx that is distributed with the Digital UNIX operating system is built to work on executables in which addresses are 64 bits wide. dbx assumes a conventional assignment of Alpha CPU registers, in particular, $ra and $gp. Since translated SPARC executables do not use these conventions, dbx:

Cannot provide stack traceback information
Cannot dereference pointers
Cannot correctly execute the next or nexti instructions (in some cases)

However, when it translates the symbol table, fpx changes the data type of long variables to 32-bit integers. This allows the dbx tool to process long values correctly, even though they may not be described the same way they are in the source code.

Therefore, dbx:

Can set symbolic break points
Can single-step instructions (step and stepi)
Does allow you to examine and modify most external, local, register, and static variables (other than addresses)

When a breakpoint is encountered, the dbx tool reports addresses in code in symbolic form.

fpx fails during translation

If fpx fails during translation, try the following suggestion:

Symptom: fpx issues a fatal error message during translation. Check: Is the executable eligible for translation?

Further Instruction: See the list of required characteristics and restrictions for input executables in the section What kinds of executables can be translated, in Chapter 1. See Appendix A, fpx command messages, for a list of fpx error messages and suggested user actions.

Executable crashes at run time

If the translated executable crashes at run time, try the following suggestions:

Symptom: Executable crashes at run time. Check: Does the original executable run?

Further Instruction: Run the original user executable on the SunOS SPARC system to be sure it works; check that you have all the shared libraries and any other required files. Do not translate broken code.

Check: Does the executable have the correct name? Executables often require a specific name to run properly.

Further Instruction: Give the translated executable the same name that the original executable had onSunOS, either by using the -o option during translation or by restoring the original file name before you run the translated executable.

Check : Are the required support files, if any, available to the executable on the Alpha system?

Further Instruction: Make sure all the shared libraries and other support files are available on the Digital UNIX system. Place the files in directories that correspond to their original directories. You can often find the name of a missing support file by setting FPXR_TRACE_SYSCALLS to open, stat and by watching the trace output at run time

Check: Are the appropriate environment variables set? Some executables require specific environment conditions.

Further Instruction: Make sure all the required variables are set at run time. See Correcting for nonfinite numbers and SIGFPEs in Chapter 4.

Executable runs, but produces different results

If the translated executable runs but produces results different from the untranslated executable, try the following suggestions:

Symptom: Executable runs, but results are not the same as on SPARC. Check: Some executables read the name that they were invoked with to determine aspects of behavior.

Further Instruction: Rename the executable to its original name for running on the Alpha system.

Check: Some executables look at the stack and use the return address to examine the SPARC code stream. This includes
  • Some Ada executables that use exceptions
  • Some PL/I executables that use PL/I signals
  • Some classes of FORTRAN executables

Further Instruction: These executables do not work properly when translated. fpx does not correct this behavior. If you can locate the routine that expects to see a SPARC address, you can manually create a feedback file with a to_sparc entry in it. See Chapter 4, Enhancing performance.

Symptom: Error message indicates the translated program attempted a floating-point calculation with a nonfinite value. Check: Some SPARC executables expect nonfinite floating-point numbers, such as infinities, denormalized numbers, and Not-a-Numbers(NaNs), to behave as specified in IEEE/ANSI Standard 754-1985.

Further Instruction: The results of the translated executable may be different from the original executable or may abort with a floating-point exception. Floating-point exception errors can be corrected using the -full_fp option. See the item about SIGFPEs in the section Executable crashes at run time and, in Chapter 4, Correcting for nonfinite numbers and SIGFPEs.

Executable runs slowly

If the translated executable runs, but slowly, try the following suggestions:

Symptom: Executable runs, but slowly. Check: Run the executable with the FPXR_GENERATE_FEEDBACK environment variable. If entries are written to the .hif file, retranslate.

Further Instruction: See Chapter 4, Enhancing performance.

Check: Perform any actions specified in fpxr messages.

Further Instruction: See Appendix B, fpxr run-time messages.

Check: Is the executable stripped? Stripping an executable before translation may cause fpxr to emulate more instructions at run time, which degrades performance.

Further Instruction: If possible, translate an unstripped executable, and then run the executable with feedback.

 

If you have questions about FreePort Express, send email to fpx-info@scrugs.lkg.dec.com.

 

amt_feather.gif (2243 bytes) Click to send feedback

 

1.800.AT.COMPAQ .

privacy and legal statement