+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
&& 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;