GDB (xrefs)
Defines | Functions | Variables
/home/stan/gdb/src/gdb/doublest.c File Reference
#include "defs.h"
#include "doublest.h"
#include "floatformat.h"
#include "gdb_assert.h"
#include "gdb_string.h"
#include "gdbtypes.h"
#include <math.h>

Go to the source code of this file.

Defines

#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 struct floatformat * floatformat_from_length (struct gdbarch *gdbarch, int len)
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 struct floatformat * host_float_format = GDB_HOST_FLOAT_FORMAT
static struct floatformat * host_double_format = GDB_HOST_DOUBLE_FORMAT
static struct floatformat * host_long_double_format = GDB_HOST_LONG_DOUBLE_FORMAT

Define 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 struct floatformat* floatformat_from_length ( struct gdbarch gdbarch,
int  len 
) [static, read]
struct floatformat* floatformat_from_type ( const struct type type) [read]
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 279 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

struct floatformat* host_double_format = GDB_HOST_DOUBLE_FORMAT [static]

Definition at line 694 of file doublest.c.

Referenced by floatformat_from_doublest(), and floatformat_to_doublest().

struct floatformat* host_float_format = GDB_HOST_FLOAT_FORMAT [static]

Definition at line 693 of file doublest.c.

Referenced by floatformat_from_doublest(), and floatformat_to_doublest().

struct floatformat* host_long_double_format = GDB_HOST_LONG_DOUBLE_FORMAT [static]

Definition at line 696 of file doublest.c.

Referenced by floatformat_from_doublest(), and floatformat_to_doublest().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines