OSDN Git Service

2002-04-04 Daniel Jacobowitz <drow@mvista.com>
authordrow <drow>
Thu, 4 Apr 2002 20:38:23 +0000 (20:38 +0000)
committerdrow <drow>
Thu, 4 Apr 2002 20:38:23 +0000 (20:38 +0000)
        * generic/gdbtk-cmds.c (gdb_disassemble_driver): Skip
        end-of-function markers in the line table.

gdb/gdbtk/ChangeLog
gdb/gdbtk/generic/gdbtk-cmds.c

index cadf99b..fd2bec3 100644 (file)
@@ -1,3 +1,8 @@
+2002-04-04  Daniel Jacobowitz  <drow@mvista.com>
+
+       * generic/gdbtk-cmds.c (gdb_disassemble_driver): Skip
+       end-of-function markers in the line table.
+
 2002-04-01  Keith Seitz  <keiths@redhat.com>
 
        * generic/gdbtk-cmds.c (gdb_load_disassembly): Use string_to_core_addr
index 2cc10d9..ae15532 100644 (file)
@@ -2128,24 +2128,11 @@ gdb_disassemble_driver (CORE_ADDR low, CORE_ADDR high,
               && le[i].pc == le[i + 1].pc)
             continue;          /* Ignore duplicates */
 
-         /* GCC sometimes emits line directives with a linenumber
-            of 0.  It does this to handle live range splitting.
-            This may be a bug, but we need to be able to handle it.
-            For now, use the previous instructions line number.
-            Since this is a bit of a hack anyway, we will just lose
-            if the bogus sline is the first line of the range.  For
-            functions, I have never seen this to be the case.  */
-         
-         if (le[i].line != 0)
-           {
-             mle[newlines].line = le[i].line;
-           }
-         else
-           {
-             if (newlines > 0)
-               mle[newlines].line = mle[newlines - 1].line;
-           }
-         
+         /* Skip any end-of-function markers.  */
+         if (le[i].line == 0)
+           continue;
+
+         mle[newlines].line = le[i].line;
           if (le[i].line > le[i + 1].line)
             out_of_order = 1;
           mle[newlines].start_pc = le[i].pc;