This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: RFA: Line number fix for prologues
On Fri, Jan 16, 2004 at 12:12:38PM -0800, Richard Henderson wrote:
> On Fri, Jan 16, 2004 at 10:36:01AM -0500, Daniel Jacobowitz wrote:
> > My silly question is, does that emit_nop () even serve any purpose? I
> > imagine it was there to make the loop optimizer happy once upon a time ...
>
> Actually, I think it's for debugging. Certainly the loop optimizer
> won't care one way or the other. If you can show that gdb works as
> well or better without that nop (both dwarf and stabs) then I think
> that's ample reason to remove it.
In that case, this OK for HEAD and 3.4? The only repeatable test
differences were the fixed failures in break.exp/sepdebug.exp that I
mentioned earlier. Tested via the gdb testsuite, dwarf and stabs.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2004-01-22 Daniel Jacobowitz <drow@mvista.com>
* c-semantics.c (genrtl_while_stmt, genrtl_do_stmt_1)
(genrtl_for_stmt): Remove emit_nop calls.
Index: c-semantics.c
===================================================================
RCS file: /big/fsf/rsync/gcc-cvs/gcc/gcc/c-semantics.c,v
retrieving revision 1.74
diff -u -p -r1.74 c-semantics.c
--- c-semantics.c 24 Nov 2003 20:12:06 -0000 1.74
+++ c-semantics.c 16 Jan 2004 15:27:32 -0000
@@ -430,7 +430,6 @@ genrtl_while_stmt (tree t)
{
tree cond = WHILE_COND (t);
- emit_nop ();
emit_line_note (input_location);
expand_start_loop (1);
genrtl_do_pushlevel ();
@@ -467,7 +466,6 @@ genrtl_do_stmt_1 (tree cond, tree body)
}
else if (integer_nonzerop (cond))
{
- emit_nop ();
emit_line_note (input_location);
expand_start_loop (1);
@@ -478,7 +476,6 @@ genrtl_do_stmt_1 (tree cond, tree body)
}
else
{
- emit_nop ();
emit_line_note (input_location);
expand_start_loop_continue_elsewhere (1);
@@ -542,7 +539,6 @@ genrtl_for_stmt (tree t)
expand_stmt (FOR_INIT_STMT (t));
/* Expand the initialization. */
- emit_nop ();
emit_line_note (input_location);
if (FOR_EXPR (t))
expand_start_loop_continue_elsewhere (1);