[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.1 Warning and error messages

Function: {} int had_warnings (void)
Function: {} int had_errors (void)
Returns non-zero if any warnings or errors, respectively, have been printed during this invocation.

Function: {} void as_perror (const char *gripe, const char *filename)
Displays a BFD or system error, then clears the error status.

Function: {} void as_tsktsk (const char *format, ...)
Function: {} void as_warn (const char *format, ...)
Function: {} void as_bad (const char *format, ...)
Function: {} void as_fatal (const char *format, ...)
These functions display messages about something amiss with the input file, or internal problems in the assembler itself. The current file name and line number are printed, followed by the supplied message, formatted using vfprintf, and a final newline.

An error indicated by as_bad will result in a non-zero exit status when the assembler has finished. Calling as_fatal will result in immediate termination of the assembler process.

Function: {} void as_warn_where (char *file, unsigned int line, const char *format, ...)
Function: {} void as_bad_where (char *file, unsigned int line, const char *format, ...)
These variants permit specification of the file name and line number, and are used when problems are detected when reprocessing information saved away when processing some earlier part of the file. For example, fixups are processed after all input has been read, but messages about fixups should refer to the original filename and line number that they are applicable to.

Function: {} void fprint_value (FILE *file, valueT val)
Function: {} void sprint_value (char *buf, valueT val)
These functions are helpful for converting a valueT value into printable format, in case it's wider than modes that *printf can handle. If the type is narrow enough, a decimal number will be produced; otherwise, it will be in hexadecimal. The value itself is not examined to make this determination.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by system on December, 2 2004 using texi2html