/* ECOFF debugging support.
- Copyright (C) 1993, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file was put together by Ian Lance Taylor <ian@cygnus.com>. A
good deal of it comes directly from mips-tfile.c, by Michael
} efdr_t;
/* Pre-initialized extended file structure. */
-static const efdr_t init_file =
-{
+static const efdr_t init_file = {
{ /* FDR structure */
0, /* adr: memory address of beginning of file */
0, /* rss: file name (of source, if known) */
/* Global hash table for the tags table and global table for file
descriptors. */
-static varray_t file_desc = INIT_VARRAY (efdr_t);
+static varray_t file_desc = INIT_VARRAY (efdr_t);
static struct hash_control *tag_hash;
static void
add_file (file_name, indx, fake)
const char *file_name; /* file name */
- int indx;
+ int indx ATTRIBUTE_UNUSED;
int fake;
{
register int first_ch;
this if we see a .file directive with a string, since that
implies that some sort of debugging information is being
provided. */
- if (! symbol_table_frozen && debug_type == DEBUG_NONE)
+ if (! symbol_table_frozen && debug_type == DEBUG_UNSPECIFIED)
debug_type = DEBUG_ECOFF;
}
+ else
+ debug_type = DEBUG_NONE;
#ifndef NO_LISTING
if (listing)
/* This is a hand coded assembler file, so automatically turn on
debugging information. */
- if (debug_type == DEBUG_NONE)
+ if (debug_type == DEBUG_UNSPECIFIED)
debug_type = DEBUG_ECOFF;
}
\f
void
ecoff_directive_begin (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char name_end;
void
ecoff_directive_bend (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char name_end;
void
ecoff_directive_def (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char name_end;
void
ecoff_directive_dim (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
int dimens[N_TQ];
int i;
void
ecoff_directive_scl (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
long val;
void
ecoff_directive_size (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
int sizes[N_TQ];
int i;
void
ecoff_directive_type (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
long val;
tq_t *tq_ptr;
void
ecoff_directive_tag (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char name_end;
void
ecoff_directive_val (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
expressionS exp;
void
ecoff_directive_endef (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
symint_t indx;
void
ecoff_directive_end (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char name_end;
void
ecoff_directive_ent (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
char name_end;
void
ecoff_directive_extern (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
char *name;
int c;
void
ecoff_directive_file (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
int indx;
char *name;
void
ecoff_directive_fmask (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
long val;
void
ecoff_directive_frame (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
long val;
void
ecoff_directive_mask (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
long val;
void
ecoff_directive_loc (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
lineno_list_t *list;
symint_t lineno;
static void
mark_stabs (ignore)
- int ignore;
+ int ignore ATTRIBUTE_UNUSED;
{
if (! stabs_seen)
{
void
ecoff_stab (sec, what, string, type, other, desc)
- segT sec;
+ segT sec ATTRIBUTE_UNUSED;
int what;
const char *string;
int type;
{
if (S_IS_COMMON (sym)
&& S_GET_VALUE (sym) > 0
- && S_GET_VALUE (sym) <= bfd_get_gp_size (stdoutput))
+ && S_GET_VALUE (sym) <= (unsigned) bfd_get_gp_size (stdoutput))
{
static asection scom_section;
static asymbol scom_symbol;
unsigned long add;
add = align - (offset & (align - 1));
- if (*bufend - (*buf + offset) < add)
+ if ((unsigned long) (*bufend - (*buf + offset)) < add)
(void) ecoff_add_bytes (buf, bufend, *buf + offset, add);
memset (*buf + offset, 0, add);
offset += add;
s = symbol_get_obj (as_sym)->ecoff_extern_size;
if (s == 0
- || s > bfd_get_gp_size (stdoutput))
+ || s > (unsigned) bfd_get_gp_size (stdoutput))
sc = sc_Undefined;
else
{
{
if (S_GET_VALUE (as_sym) > 0
&& (S_GET_VALUE (as_sym)
- <= bfd_get_gp_size (stdoutput)))
+ <= (unsigned) bfd_get_gp_size (stdoutput)))
sc = sc_SCommon;
else
sc = sc_Common;
if (local)
{
- if (*bufend - sym_out < external_sym_size)
+ if ((bfd_size_type)(*bufend - sym_out) < external_sym_size)
sym_out = ecoff_add_bytes (buf, bufend,
sym_out,
external_sym_size);
first = 0;
}
proc_ptr->pdr.adr = adr - fil_ptr->fdr.adr;
- if (*bufend - pdr_out < external_pdr_size)
+ if ((bfd_size_type)(*bufend - pdr_out) < external_pdr_size)
pdr_out = ecoff_add_bytes (buf, bufend,
pdr_out,
external_pdr_size);
aux_end = aux_ptr + aux_cnt;
for (; aux_ptr < aux_end; aux_ptr++)
{
- if (*bufend - (char *) aux_out < sizeof (union aux_ext))
+ if ((unsigned long) (*bufend - (char *) aux_out)
+ < sizeof (union aux_ext))
aux_out = ((union aux_ext *)
ecoff_add_bytes (buf, bufend,
(char *) aux_out,
else
str_cnt = vp->objects_per_page;
- if (*bufend - str_out < str_cnt)
+ if ((unsigned long)(*bufend - str_out) < str_cnt)
str_out = ecoff_add_bytes (buf, bufend, str_out, str_cnt);
memcpy (str_out, str_link->datum->byte, str_cnt);
fil_end = fil_ptr + fil_cnt;
for (; fil_ptr < fil_end; fil_ptr++)
{
- if (*bufend - fdr_out < external_fdr_size)
+ if ((bfd_size_type)(*bufend - fdr_out) < external_fdr_size)
fdr_out = ecoff_add_bytes (buf, bufend, fdr_out,
external_fdr_size);
(*swap_fdr_out) (stdoutput, &fil_ptr->fdr, fdr_out);
space at this point. */
hdr->ipdMax = proc_cnt;
hdr->cbPdOffset = offset;
- if (bufend - (buf + offset) < proc_cnt * external_pdr_size)
+ if ((bfd_size_type)(bufend - (buf + offset)) < proc_cnt * external_pdr_size)
(void) ecoff_add_bytes (&buf, &bufend, buf + offset,
proc_cnt * external_pdr_size);
offset += proc_cnt * external_pdr_size;