noproc_lineno = (lineno_list_t *) NULL;
}
}
+
+symbolS *
+ecoff_get_cur_proc_sym ()
+{
+ return (cur_proc_ptr ? cur_proc_ptr->sym->as_sym : NULL);
+}
\f
/* Add a new filename, and set up all of the file relative
virtual arrays (strings, symbols, aux syms, etc.). Record
long iline;
long totcount;
lineno_list_t first;
+ lineno_list_t *local_first_lineno = first_lineno;
if (linecntptr != (long *) NULL)
*linecntptr = 0;
embedded PIC code, it will put strings in the .text section
before the first procedure. We cope by inserting a dummy line if
the address of the first procedure is not 0. Hopefully this
- won't screw things up too badly. */
- if (first_proc_ptr != (proc_t *) NULL
- && first_lineno != (lineno_list_t *) NULL
+ won't screw things up too badly.
+
+ Don't do this for ECOFF assembly source line numbers. They work
+ without this extra attention. */
+ if (debug_type != DEBUG_ECOFF
+ && first_proc_ptr != (proc_t *) NULL
+ && local_first_lineno != (lineno_list_t *) NULL
&& ((S_GET_VALUE (first_proc_ptr->sym->as_sym)
+ bfd_get_section_vma (stdoutput,
S_GET_SEGMENT (first_proc_ptr->sym->as_sym)))
!= 0))
{
- first.file = first_lineno->file;
- first.proc = first_lineno->proc;
+ first.file = local_first_lineno->file;
+ first.proc = local_first_lineno->proc;
first.frag = &zero_address_frag;
first.paddr = 0;
first.lineno = 0;
- first.next = first_lineno;
- first_lineno = &first;
+ first.next = local_first_lineno;
+ local_first_lineno = &first;
}
- for (l = first_lineno; l != (lineno_list_t *) NULL; l = l->next)
+ for (l = local_first_lineno; l != (lineno_list_t *) NULL; l = l->next)
{
long count;
long delta;
}
void
-ecoff_generate_asm_lineno (filename, lineno)
- const char *filename;
- int lineno;
+ecoff_generate_asm_lineno ()
{
+ unsigned int lineno;
+ char *filename;
lineno_list_t *list;
+ as_where (&filename, &lineno);
+
if (current_stabs_filename == (char *)NULL
|| strcmp (current_stabs_filename, filename))
add_file (filename, 0, 1);
}
}
+#else
+
+void
+ecoff_generate_asm_lineno ()
+{
+}
+
#endif /* ECOFF_DEBUGGING */