This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: 3 debug hooks for begin_function
On Tue, Jul 17, 2001 at 08:03:01AM +0100, Neil Booth wrote:
> > if (NOTE_LINE_NUMBER (first) != NOTE_INSN_DELETED)
> > notice_source_line (first);
> > high_block_linenum = high_function_linenum = last_linenum;
[...]
> I've done the above. Note that the high_block_linenum stuff was in
> the if() too, and is made redundant by the call to notice_source_line,
> so I've removed it.
No, the high_* stuff is modified via MAX in notice_source_line.
That's not the same as a direct assignment.
> dwarf2out_begin_prologue() does those checks itself, and some other
> stuff unconditionally, so I've left out that part to retain semantics.
Oh, right.
> -dwarf2out_begin_prologue ()
> +dwarf2out_begin_prologue (line, file)
> + unsigned int line ATTRIBUTE_UNUSED;
> + const char *file ATTRIBUTE_UNUSED;
> {
You didn't modify dwarf2out_begin_prologue to call
dwarf2out_source_line under appropriate conditions.
> +#ifdef MIPS_DEBUGGING_INFO
> + /* Defer on MIPS systems so that parameter descriptions follow
> + function entry. */
> + sdbout_source_line, /* begin_prologue */
> + sdbout_end_prologue, /* end_prologue */
> +#else
> + sdbout_begin_prologue, /* begin_prologue */
> + debug_nothing_int, /* end_prologue */
> +#endif
Yes, I know the existing code calls source_line for MIPS here,
but by inspection this is incorrect. One can see this because
sdbout_source_line uses sdb_begin_function_line, which is set
by sdbout_begin_prologue.
There are probably no MIPS ECOFF systems (Ultrix or Iris 4)
still running on which to notice this sort of error.
r~