16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

c89, cc, and c++<br />

hexadecimal format is referred to as the hexadecimal floating-point<br />

format, and is unique to IBM <strong>System</strong> z9 hardware. This is the<br />

default.<br />

IEEE754<br />

Base 2 IEEE-754 binary format. The IEEE-754 binary format is<br />

referred to as binary floating-point format. The IEEE-754 binary<br />

format is the more common floating point format used on other<br />

platforms.<br />

If you are porting an application from another platform, transmitting<br />

floating-point numbers between other platforms or workstations, or your<br />

application requires the larger exponent range provided by IEEE-754 binary<br />

format, then you should consider using IEEE floating-point. The z/<strong>OS</strong> XL<br />

C/C++ User’s Guide contains more information on the FLOAT compiler<br />

option.<br />

Example: The following is an example of compiling with IEEE-754 binary<br />

floating point format:<br />

c89 -o outfile -Wc,’float(ieee)’ file.c<br />

-g Specifies that a side file that contains symbolic information is emitted and<br />

the executable is to be loaded into read/write storage, which is required for<br />

source-level debugging with dbx, and other debuggers.<br />

72 z/<strong>OS</strong> <strong>V1R9.0</strong> <strong>UNIX</strong> <strong>System</strong> <strong>Services</strong> <strong>Command</strong> Reference<br />

For 32-bit compiles, if the _DEBUG_FORMAT=ISD environment variable is<br />

exported, then -g specifies that the output file (executable) is to contain<br />

symbolic information and is to be loaded into read/write storage, which is<br />

required for source-level debugging with dbx, and other debuggers.<br />

When specified for the compilation phase, the compiler produces symbolic<br />

information for source-level debugging.<br />

When specified for the link-editing phase, the executable file is marked as<br />

being serially reusable and will always be loaded into read/write storage.<br />

dbx requires that all the executables comprising the process be loaded into<br />

read/write storage so that it can set break points in these executables.<br />

When dbx is attached to a running process, this cannot be guaranteed<br />

because the process was already running and some executables were<br />

already loaded. There are two techniques that will guarantee that all the<br />

executables comprising the process are loaded into read-write storage:<br />

1. Specify the -g option for the link-editing phase of each executable. After<br />

this is done, the executable is always loaded into read/write storage.<br />

Because the executable is marked as being serially reusable, this<br />

technique works except in cases where the executable must be marked<br />

as being reentrant. For example:<br />

v If the executable is to be used by multiple processes in the same<br />

user space.<br />

v If the executable is a DLL that is used on more than one thread in a<br />

multithreaded program.<br />

In these cases, use the following technique instead:<br />

2. Do not specify the -g option during the link-editing phase so that the<br />

executable will be marked as being reentrant. Before invoking the<br />

program, export the environment variable _BPX_PTRACE_ATTACH with<br />

a value of YES. After you do this, then executables will be loaded into<br />

read/write storage regardless of their reusability attribute.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!