This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Line number handling in RTL reorganization
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 12 Jul 2003 21:58:46 -0400
- Subject: Re: Line number handling in RTL reorganization
- References: <20030606084100.GA17469@atrey.karlin.mff.cuni.cz>
This patch breaks debugging on AIX -- no line number debugging
information is generated. A lot of other debugging information is
missing, but other macros use the line number to determine if GCC
currently is within a function, so the broken line numbers may be causing
the other problems.
One major problem is:
(final_start_function): Set initial source file and line.
*************** final_start_function (first, file, optim
*** 1359,1366 ****
}
#endif
! if (NOTE_LINE_NUMBER (first) != NOTE_INSN_DELETED)
! notice_source_line (first);
high_block_linenum = high_function_linenum = last_linenum;
(*debug_hooks->begin_prologue) (last_linenum, last_filename);
--- 1359,1366 ----
}
#endif
! last_linenum = 0;
! last_filename = 0;
high_block_linenum = high_function_linenum = last_linenum;
(*debug_hooks->begin_prologue) (last_linenum, last_filename);
Setting last_linenum to 0 conflicts with xcoffout.c:
/* Line number of beginning of current function, minus one.
Negative means not in a function or not using xcoff. */
static int xcoff_begin_function_line = -1;
...
#define ASM_OUTPUT_LFB(FILE,LINENUM) \
{ \
if (xcoff_begin_function_line == -1) \
{ \
xcoff_begin_function_line = (LINENUM) - 1;\
fprintf (FILE, "\t.bf\t%d\n", (LINENUM)); \
} \
...
/* Called at beginning of function body (at start of prologue).
Record the function's starting line number, so we can output
relative line numbers for the other lines.
Record the file name that this function is contained in. */
void
xcoffout_begin_prologue (unsigned int line,
const char *file ATTRIBUTE_UNUSED)
{
ASM_OUTPUT_LFB (asm_out_file, line);
0 - 1 = -1
David