mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-01 18:32:32 +08:00
* dwarf2.c: Formatting.
(add_line_info): Remove outer loop.
This commit is contained in:
@ -1,3 +1,8 @@
|
||||
2006-03-06 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* dwarf2.c: Formatting.
|
||||
(add_line_info): Remove outer loop.
|
||||
|
||||
2006-03-05 H.J. Lu <hongjiu.lu@intel.com>
|
||||
Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
|
27
bfd/dwarf2.c
27
bfd/dwarf2.c
@ -1,6 +1,6 @@
|
||||
/* DWARF 2 support.
|
||||
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
|
||||
2004, 2005 Free Software Foundation, Inc.
|
||||
2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
Adapted from gdb/dwarf2read.c by Gavin Koch of Cygnus Solutions
|
||||
(gavin@cygnus.com).
|
||||
@ -813,7 +813,6 @@ add_line_info (struct line_info_table *table,
|
||||
|
||||
Note: we may receive duplicate entries from 'decode_line_info'. */
|
||||
|
||||
while (1)
|
||||
if (!table->last_line
|
||||
|| new_line_sorts_after (info, table->last_line))
|
||||
{
|
||||
@ -824,31 +823,19 @@ add_line_info (struct line_info_table *table,
|
||||
/* lcl_head: initialize to head a *possible* sequence at the end. */
|
||||
if (!table->lcl_head)
|
||||
table->lcl_head = info;
|
||||
break;
|
||||
}
|
||||
else if (!table->lcl_head->prev_line
|
||||
&& !new_line_sorts_after (info, table->lcl_head))
|
||||
else if (!new_line_sorts_after (info, table->lcl_head)
|
||||
&& (!table->lcl_head->prev_line
|
||||
|| new_line_sorts_after (info, table->lcl_head->prev_line)))
|
||||
{
|
||||
/* Abnormal but easy: lcl_head is 1) at the *end* of the line
|
||||
list and 2) the head of 'info'. */
|
||||
info->prev_line = NULL;
|
||||
table->lcl_head->prev_line = info;
|
||||
break;
|
||||
}
|
||||
else if (table->lcl_head->prev_line
|
||||
&& !new_line_sorts_after (info, table->lcl_head)
|
||||
&& new_line_sorts_after (info, table->lcl_head->prev_line))
|
||||
{
|
||||
/* Abnormal but easy: lcl_head is 1) in the *middle* of the line
|
||||
list and 2) the head of 'info'. */
|
||||
/* Abnormal but easy: lcl_head is the head of 'info'. */
|
||||
info->prev_line = table->lcl_head->prev_line;
|
||||
table->lcl_head->prev_line = info;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Abnormal and hard: Neither 'last_line' nor 'lcl_head' are valid
|
||||
heads for 'info'. Reset 'lcl_head' and repeat. */
|
||||
heads for 'info'. Reset 'lcl_head'. */
|
||||
struct line_info* li2 = table->last_line; /* always non-NULL */
|
||||
struct line_info* li1 = li2->prev_line;
|
||||
|
||||
@ -862,6 +849,8 @@ add_line_info (struct line_info_table *table,
|
||||
li1 = li1->prev_line;
|
||||
}
|
||||
table->lcl_head = li2;
|
||||
info->prev_line = table->lcl_head->prev_line;
|
||||
table->lcl_head->prev_line = info;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user