Go to the first, previous, next, last section, table of contents.


Internal functions

This section describes basic internal functions used by GAS.

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.

Hash tables

Function: {} {struct hash_control *} hash_new (void)
Creates the hash table control structure.

Function: {} void hash_die (struct hash_control *)
Destroy a hash table.

Function: {} PTR hash_delete (struct hash_control *, const char *)
Deletes entry from the hash table, returns the value it had.

Function: {} PTR hash_replace (struct hash_control *, const char *, PTR)
Updates the value for an entry already in the table, returning the old value. If no entry was found, just returns NULL.

Function: {} {const char *} hash_insert (struct hash_control *, const char *, PTR)
Inserting a value already in the table is an error. Returns an error message or NULL.

Function: {} {const char *} hash_jam (struct hash_control *, const char *, PTR)
Inserts if the value isn't already present, updates it if it is.


Go to the first, previous, next, last section, table of contents.