GDB (xrefs)
Macros | Functions | Variables
/tmp/gdb-7.10/gdb/doublest.c File Reference
#include "defs.h"
#include "doublest.h"
#include "floatformat.h"
#include "gdbtypes.h"
#include <math.h>

Go to the source code of this file.

Macros

#define FLOATFORMAT_CHAR_BIT   8
 
#define FLOATFORMAT_LARGEST_BYTES   16
 

Functions

static unsigned long get_field (const bfd_byte *data, enum floatformat_byteorders order, unsigned int total_len, unsigned int start, unsigned int len)
 
static enum floatformat_byteorders floatformat_normalize_byteorder (const struct floatformat *fmt, const void *from, void *to)
 
static void convert_floatformat_to_doublest (const struct floatformat *fmt, const void *from, DOUBLEST *to)
 
static void put_field (unsigned char *data, enum floatformat_byteorders order, unsigned int total_len, unsigned int start, unsigned int len, unsigned long stuff_to_put)
 
static void convert_doublest_to_floatformat (const struct floatformat *fmt, const DOUBLEST *from, void *to)
 
int floatformat_is_negative (const struct floatformat *fmt, const bfd_byte *uval)
 
enum float_kind floatformat_classify (const struct floatformat *fmt, const bfd_byte *uval)
 
const char * floatformat_mantissa (const struct floatformat *fmt, const bfd_byte *val)
 
void floatformat_to_doublest (const struct floatformat *fmt, const void *in, DOUBLEST *out)
 
void floatformat_from_doublest (const struct floatformat *fmt, const DOUBLEST *in, void *out)
 
static const struct floatformat * floatformat_from_length (struct gdbarch *gdbarch, int len)
 
const struct floatformat * floatformat_from_type (const struct type *type)
 
DOUBLEST extract_typed_floating (const void *addr, const struct type *type)
 
void store_typed_floating (void *addr, const struct type *type, DOUBLEST val)
 
void convert_typed_floating (const void *from, const struct type *from_type, void *to, const struct type *to_type)
 

Variables

static const struct floatformat * host_float_format = GDB_HOST_FLOAT_FORMAT
 
static const struct floatformat * host_double_format = GDB_HOST_DOUBLE_FORMAT
 
static const struct floatformat * host_long_double_format = GDB_HOST_LONG_DOUBLE_FORMAT
 

Macro Definition Documentation

#define FLOATFORMAT_CHAR_BIT   8
#define FLOATFORMAT_LARGEST_BYTES   16

Function Documentation

static void convert_doublest_to_floatformat ( const struct floatformat *  fmt,
const DOUBLEST from,
void *  to 
)
static
static void convert_floatformat_to_doublest ( const struct floatformat *  fmt,
const void *  from,
DOUBLEST to 
)
static
void convert_typed_floating ( const void *  from,
const struct type from_type,
void *  to,
const struct type to_type 
)
DOUBLEST extract_typed_floating ( const void *  addr,
const struct type type 
)
enum float_kind floatformat_classify ( const struct floatformat *  fmt,
const bfd_byte *  uval 
)
void floatformat_from_doublest ( const struct floatformat *  fmt,
const DOUBLEST in,
void *  out 
)
static const struct floatformat* floatformat_from_length ( struct gdbarch gdbarch,
int  len 
)
static
const struct floatformat* floatformat_from_type ( const struct type type)
int floatformat_is_negative ( const struct floatformat *  fmt,
const bfd_byte *  uval 
)
const char* floatformat_mantissa ( const struct floatformat *  fmt,
const bfd_byte *  val 
)
static enum floatformat_byteorders floatformat_normalize_byteorder ( const struct floatformat *  fmt,
const void *  from,
void *  to 
)
static
void floatformat_to_doublest ( const struct floatformat *  fmt,
const void *  in,
DOUBLEST out 
)
static unsigned long get_field ( const bfd_byte *  data,
enum floatformat_byteorders  order,
unsigned int  total_len,
unsigned int  start,
unsigned int  len 
)
static
static void put_field ( unsigned char *  data,
enum floatformat_byteorders  order,
unsigned int  total_len,
unsigned int  start,
unsigned int  len,
unsigned long  stuff_to_put 
)
static

Definition at line 277 of file doublest.c.

References FLOATFORMAT_CHAR_BIT, gdb_assert, and len.

Referenced by convert_doublest_to_floatformat().

void store_typed_floating ( void *  addr,
const struct type type,
DOUBLEST  val 
)

Variable Documentation

const struct floatformat* host_double_format = GDB_HOST_DOUBLE_FORMAT
static

Definition at line 692 of file doublest.c.

Referenced by floatformat_from_doublest(), and floatformat_to_doublest().

const struct floatformat* host_float_format = GDB_HOST_FLOAT_FORMAT
static

Definition at line 691 of file doublest.c.

Referenced by floatformat_from_doublest(), and floatformat_to_doublest().

const struct floatformat* host_long_double_format = GDB_HOST_LONG_DOUBLE_FORMAT
static

Definition at line 694 of file doublest.c.

Referenced by floatformat_from_doublest(), and floatformat_to_doublest().