/* ECOFF debugging support.
- Copyright (C) 1993-2015 Free Software Foundation, Inc.
+ Copyright (C) 1993-2016 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
want to use the actual file name. */
if (file_name == (const char *) NULL)
{
- char *file;
-
if (first_file != (efdr_t *) NULL)
as_fatal (_("fake .file after real one"));
- as_where (&file, (unsigned int *) NULL);
- file_name = (const char *) file;
+ file_name = as_where ((unsigned int *) NULL);
/* Automatically generate ECOFF debugging information, since I
think that's what other ECOFF assemblers do. We don't do
if (need < PAGE_SIZE)
need = PAGE_SIZE;
want = (*bufend - *buf) + need;
- *buf = (char *) xrealloc (*buf, want);
+ *buf = XRESIZEVEC (char, *buf, want);
*bufend = *buf + want;
return *buf + at;
}
/* Build the symbolic information. */
offset = 0;
- buf = (char *) xmalloc (PAGE_SIZE);
+ buf = XNEWVEC (char, PAGE_SIZE);
bufend = buf + PAGE_SIZE;
/* Build the line number information. */
#else
- ptr = (scope_t *) xmalloc (sizeof (scope_t));
+ ptr = XNEW (scope_t);
#endif
#else
- ptr = (vlinks_t *) xmalloc (sizeof (vlinks_t));
+ ptr = XNEW (vlinks_t);
#endif
#else
- ptr = (shash_t *) xmalloc (sizeof (shash_t));
+ ptr = XNEW (shash_t);
#endif
#else
- ptr = (thash_t *) xmalloc (sizeof (thash_t));
+ ptr = XNEW (thash_t);
#endif
#else
- ptr = (tag_t *) xmalloc (sizeof (tag_t));
+ ptr = XNEW (tag_t);
#endif
#else
- ptr = (forward_t *) xmalloc (sizeof (forward_t));
+ ptr = XNEW (forward_t);
#endif
#else
- ptr = (thead_t *) xmalloc (sizeof (thead_t));
+ ptr = XNEW (thead_t);
#endif
#else
- ptr = (lineno_list_t *) xmalloc (sizeof (lineno_list_t));
+ ptr = XNEW (lineno_list_t);
#endif
ecoff_generate_asm_lineno (void)
{
unsigned int lineno;
- char *filename;
+ const char *filename;
lineno_list_t *list;
- as_where (&filename, &lineno);
+ filename = as_where (&lineno);
if (current_stabs_filename == (char *) NULL
|| filename_cmp (current_stabs_filename, filename))