GDBserver
Macros | Functions
common-utils.c File Reference
#include "common-defs.h"
#include "host-defs.h"
#include <ctype.h>

Go to the source code of this file.

Macros

#define HIGH_BYTE_POSN   ((sizeof (ULONGEST) - 1) * HOST_CHAR_BIT)
 

Functions

PTR xmalloc (size_t size)
 
PTR xrealloc (PTR ptr, size_t size)
 
PTR xcalloc (size_t number, size_t size)
 
void * xzalloc (size_t size)
 
void xfree (void *ptr)
 
char * xstrprintf (const char *format,...)
 
char * xstrvprintf (const char *format, va_list ap)
 
int xsnprintf (char *str, size_t size, const char *format,...)
 
char * savestring (const char *ptr, size_t len)
 
static int is_digit_in_base (unsigned char digit, int base)
 
static int digit_to_int (unsigned char c)
 
ULONGEST strtoulst (const char *num, const char **trailer, int base)
 
char * skip_spaces (char *chp)
 
const char * skip_spaces_const (const char *chp)
 
const char * skip_to_space_const (const char *chp)
 

Macro Definition Documentation

#define HIGH_BYTE_POSN   ((sizeof (ULONGEST) - 1) * HOST_CHAR_BIT)

Definition at line 160 of file common-utils.c.

Referenced by strtoulst().

Function Documentation

static int digit_to_int ( unsigned char  c)
static

Definition at line 177 of file common-utils.c.

Referenced by strtoulst().

static int is_digit_in_base ( unsigned char  digit,
int  base 
)
static

Definition at line 166 of file common-utils.c.

Referenced by strtoulst().

char* savestring ( const char *  ptr,
size_t  len 
)

Definition at line 148 of file common-utils.c.

References xmalloc().

Referenced by add_tracepoint_action().

char* skip_spaces ( char *  chp)

Definition at line 259 of file common-utils.c.

const char* skip_spaces_const ( const char *  chp)

Definition at line 271 of file common-utils.c.

const char* skip_to_space_const ( const char *  chp)

Definition at line 283 of file common-utils.c.

ULONGEST strtoulst ( const char *  num,
const char **  trailer,
int  base 
)

Definition at line 188 of file common-utils.c.

References digit_to_int(), errno, HIGH_BYTE_POSN, and is_digit_in_base().

PTR xcalloc ( size_t  number,
size_t  size 
)
void xfree ( void *  ptr)
PTR xmalloc ( size_t  size)
PTR xrealloc ( PTR  ptr,
size_t  size 
)
int xsnprintf ( char *  str,
size_t  size,
const char *  format,
  ... 
)
char* xstrprintf ( const char *  format,
  ... 
)
char* xstrvprintf ( const char *  format,
va_list  ap 
)

Definition at line 119 of file common-utils.c.

References _, internal_error(), and vasprintf().

Referenced by ATTRIBUTE_PRINTF(), and xstrprintf().

void* xzalloc ( size_t  size)

Definition at line 91 of file common-utils.c.

References xcalloc().