/* ECOFF debugging support.
- Copyright (C) 1993-2020 Free Software Foundation, Inc.
+ Copyright (C) 1993-2023 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
{
varray_t *vp;
aux_t *aux_ptr;
- static AUXU init_aux;
symint_t ret;
int i;
AUXU aux;
vp = &cur_file_ptr->aux_syms;
- aux = init_aux;
+ memset (&aux, 0, sizeof (aux));
aux.ti.bt = (int) t->basic_type;
aux.ti.continued = 0;
aux.ti.fBitfield = t->bitfield;
compiler output, only in hand coded assembler. */
void
-ecoff_new_file (const char *name, int appfile ATTRIBUTE_UNUSED)
+ecoff_new_file (const char *name)
{
if (cur_file_ptr != NULL && filename_cmp (cur_file_ptr->name, name) == 0)
return;
allocate_scope (void)
{
scope_t *ptr;
- static scope_t initial_scope;
#ifndef MALLOC_CHECK
#endif
alloc_counts[(int) alloc_type_scope].total_alloc++;
- *ptr = initial_scope;
+ memset (ptr, 0, sizeof (*ptr));
return ptr;
}
allocate_vlinks (void)
{
vlinks_t *ptr;
- static vlinks_t initial_vlinks;
#ifndef MALLOC_CHECK
#endif
alloc_counts[(int) alloc_type_vlinks].total_alloc++;
- *ptr = initial_vlinks;
+ memset (ptr, 0, sizeof (*ptr));
return ptr;
}
\f
allocate_shash (void)
{
shash_t *ptr;
- static shash_t initial_shash;
#ifndef MALLOC_CHECK
#endif
alloc_counts[(int) alloc_type_shash].total_alloc++;
- *ptr = initial_shash;
+ memset (ptr, 0, sizeof (*ptr));
return ptr;
}
\f
allocate_thash (void)
{
thash_t *ptr;
- static thash_t initial_thash;
#ifndef MALLOC_CHECK
#endif
alloc_counts[(int) alloc_type_thash].total_alloc++;
- *ptr = initial_thash;
+ memset (ptr, 0, sizeof (*ptr));
return ptr;
}
\f
allocate_tag (void)
{
tag_t *ptr;
- static tag_t initial_tag;
#ifndef MALLOC_CHECK
#endif
alloc_counts[(int) alloc_type_tag].total_alloc++;
- *ptr = initial_tag;
+ memset (ptr, 0, sizeof (*ptr));
return ptr;
}
allocate_forward (void)
{
forward_t *ptr;
- static forward_t initial_forward;
#ifndef MALLOC_CHECK
#endif
alloc_counts[(int) alloc_type_forward].total_alloc++;
- *ptr = initial_forward;
+ memset (ptr, 0, sizeof (*ptr));
return ptr;
}
\f
allocate_thead (void)
{
thead_t *ptr;
- static thead_t initial_thead;
#ifndef MALLOC_CHECK
#endif
alloc_counts[(int) alloc_type_thead].total_alloc++;
- *ptr = initial_thead;
+ memset (ptr, 0, sizeof (*ptr));
return ptr;
}
allocate_lineno_list (void)
{
lineno_list_t *ptr;
- static lineno_list_t initial_lineno_list;
#ifndef MALLOC_CHECK
#endif
alloc_counts[(int) alloc_type_lineno].total_alloc++;
- *ptr = initial_lineno_list;
+ memset (ptr, 0, sizeof (*ptr));
return ptr;
}