Back to index

cell-binutils  2.17cvs20070401
Defines | Functions
ldmisc.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define ASSERT(x)   do { if (!(x)) info_assert(__FILE__,__LINE__); } while (0)
#define FAIL()   do { info_assert(__FILE__,__LINE__); } while (0)

Functions

void einfo (const char *,...)
void minfo (const char *,...)
void info_msg (const char *,...)
void lfinfo (FILE *, const char *,...)
void info_assert (const char *, unsigned int)
void yyerror (const char *)
void * xmalloc (size_t)
void * xrealloc (void *, size_t)
void xexit (int)
void print_space (void)
void print_nl (void)
char * demangle (const char *)

Define Documentation

#define ASSERT (   x)    do { if (!(x)) info_assert(__FILE__,__LINE__); } while (0)

Definition at line 35 of file ldmisc.h.

#define FAIL ( )    do { info_assert(__FILE__,__LINE__); } while (0)

Definition at line 38 of file ldmisc.h.


Function Documentation

char* demangle ( const char *  )

Definition at line 439 of file ldmisc.c.

{
  char *res;
  const char *p;

  if (output_bfd != NULL
      && bfd_get_symbol_leading_char (output_bfd) == name[0])
    ++name;

  /* This is a hack for better error reporting on XCOFF, PowerPC64-ELF
     or the MS PE format.  These formats have a number of leading '.'s
     on at least some symbols, so we remove all dots to avoid
     confusing the demangler.  */
  p = name;
  while (*p == '.')
    ++p;

  res = cplus_demangle (p, DMGL_ANSI | DMGL_PARAMS);
  if (res)
    {
      size_t dots = p - name;

      /* Now put back any stripped dots.  */
      if (dots != 0)
       {
         size_t len = strlen (res) + 1;
         char *add_dots = xmalloc (len + dots);

         memcpy (add_dots, name, dots);
         memcpy (add_dots + dots, res, len);
         free (res);
         res = add_dots;
       }
      return res;
    }
  return xstrdup (name);
}

Here is the call graph for this function:

void einfo ( const char *  ,
  ... 
)

Definition at line 495 of file ldmisc.c.

{
  va_list arg;

  va_start (arg, fmt);
  vfinfo (stderr, fmt, arg, TRUE);
  va_end (arg);
}

Here is the call graph for this function:

void info_assert ( const char *  ,
unsigned  int 
)

Definition at line 505 of file ldmisc.c.

{
  einfo (_("%F%P: internal error %s %d\n"), file, line);
}

Here is the call graph for this function:

void info_msg ( const char *  ,
  ... 
)

Definition at line 483 of file ldmisc.c.

{
  va_list arg;

  va_start (arg, fmt);
  vfinfo (stdout, fmt, arg, FALSE);
  va_end (arg);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void lfinfo ( FILE *  ,
const char *  ,
  ... 
)

Definition at line 523 of file ldmisc.c.

{
  va_list arg;

  va_start (arg, fmt);
  vfinfo (file, fmt, arg, FALSE);
  va_end (arg);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void minfo ( const char *  ,
  ... 
)

Definition at line 513 of file ldmisc.c.

{
  va_list arg;

  va_start (arg, fmt);
  vfinfo (config.map_file, fmt, arg, FALSE);
  va_end (arg);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void print_nl ( void  )

Definition at line 541 of file ldmisc.c.

{
  fprintf (config.map_file, "\n");
}

Here is the call graph for this function:

Here is the caller graph for this function:

void print_space ( void  )

Definition at line 535 of file ldmisc.c.

{
  fprintf (config.map_file, " ");
}

Here is the call graph for this function:

Here is the caller graph for this function:

void xexit ( int  )

Definition at line 47 of file xexit.c.

{
  if (_xexit_cleanup != NULL)
    (*_xexit_cleanup) ();
  exit (code);
}
void* xmalloc ( size_t  )

Definition at line 141 of file xmalloc.c.

{
  PTR newmem;

  if (size == 0)
    size = 1;
  newmem = malloc (size);
  if (!newmem)
    xmalloc_failed (size);

  return (newmem);
}

Here is the call graph for this function:

void* xrealloc ( void *  ,
size_t   
)
void yyerror ( const char *  )

Definition at line 519 of file resrc.c.

{
  fatal ("%s:%d: %s", rc_filename, rc_lineno, msg);
}

Here is the call graph for this function: