Go to the first, previous, next, last section, table of contents.
#include <debug/dbgcom.h> extern NPX npx; void save_npx (void);
This function saves the state of the x87 numeric processor in the
external variable npx
. This variable is a structure defined as
follows in the header `debug/dbgcom.h':
typedef struct { unsigned short sig0; unsigned short sig1; unsigned short sig2; unsigned short sig3; unsigned short exponent:15; unsigned short sign:1; } NPXREG; typedef struct { unsigned long control; unsigned long status; unsigned long tag; unsigned long eip; unsigned long cs; unsigned long dataptr; unsigned long datasel; NPXREG reg[8]; long double st[8]; char st_valid[8]; long double mmx[8]; char in_mmx_mode; char top; } NPX;
save_npx
should be called immediately before run_child
(see section run_child) is called to begin or resume the debugged program.
To restore the x87 state when control is returned to the debugger, call
load_npx
, see section load_npx.
not ANSI, not POSIX
save_npx (); run_child (); load_npx ();
Go to the first, previous, next, last section, table of contents.