This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

line numbers vs sched-ebb


On Wed, May 07, 2003 at 12:11:12AM -0700, David Mosberger wrote:
> $ cat t.c
> void bar(void);
> void baz(void);
> void foo(int p)
> {
>   if (p == 0)
>     bar();
>   baz();
> }
> $ cc1 -g -O2 t.c
[...]
> 	.loc 1 4 0
> 	br.call.sptk.many b0 = bar#

[ Note the incorrect line number 4 before the call to bar. ]

Indeed, *all* ebb sequences get marked as starting on the
same line number as the beginning of the function.  :-(

Fixed thus.  There should probably be a gdb test for this...


r~


        * sched-ebb.c (schedule_ebb): Supply the correct starting
        block number to save_line_notes.

Index: sched-ebb.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/sched-ebb.c,v
retrieving revision 1.25
diff -u -p -u -r1.25 sched-ebb.c
--- sched-ebb.c	25 Feb 2003 21:43:16 -0000	1.25
+++ sched-ebb.c	8 May 2003 00:17:37 -0000
@@ -514,7 +514,7 @@ schedule_ebb (head, tail)
 
   if (write_symbols != NO_DEBUG)
     {
-      save_line_notes (0, head, tail);
+      save_line_notes (first_bb->index, head, tail);
       rm_line_notes (head, tail);
     }
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]