aboutsummaryrefslogtreecommitdiff
path: root/bfd/dwarf2.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2005-06-06 14:16:45 +0000
committerH.J. Lu <hjl.tools@gmail.com>2005-06-06 14:16:45 +0000
commitb42f9a05b66c1135b09de2a5e5c39b3101ff0928 (patch)
treee95e6547cfdf60f7b8dde24557a376fb41d5d3bb /bfd/dwarf2.c
parent46de2a7c487120233d6331aa25109dd2aaf83b8b (diff)
downloadgdb-b42f9a05b66c1135b09de2a5e5c39b3101ff0928.zip
gdb-b42f9a05b66c1135b09de2a5e5c39b3101ff0928.tar.gz
gdb-b42f9a05b66c1135b09de2a5e5c39b3101ff0928.tar.bz2
2005-06-06 H.J. Lu <hongjiu.lu@intel.com>
* dwarf2.c (decode_line_info): Properly set low_pc.
Diffstat (limited to 'bfd/dwarf2.c')
-rw-r--r--bfd/dwarf2.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index d13fd75..1b08f28 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -1070,6 +1070,7 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash)
address, we must compare on every DW_LNS_copy, etc. */
bfd_vma low_pc = 0;
bfd_vma high_pc = 0;
+ bfd_boolean low_pc_set = FALSE;
/* Decode the table. */
while (! end_sequence)
@@ -1087,8 +1088,11 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash)
/* Append row to matrix using current values. */
add_line_info (table, address, filename, line, column, 0);
basic_block = 1;
- if (low_pc == 0 || address < low_pc)
- low_pc = address;
+ if (!low_pc_set || address < low_pc)
+ {
+ low_pc_set = TRUE;
+ low_pc = address;
+ }
if (address > high_pc)
high_pc = address;
}
@@ -1106,8 +1110,11 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash)
end_sequence = 1;
add_line_info (table, address, filename, line, column,
end_sequence);
- if (low_pc == 0 || address < low_pc)
- low_pc = address;
+ if (!low_pc_set || address < low_pc)
+ {
+ low_pc_set = TRUE;
+ low_pc = address;
+ }
if (address > high_pc)
high_pc = address;
arange_add (unit->abfd, &unit->arange, low_pc, high_pc);
@@ -1159,8 +1166,11 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash)
case DW_LNS_copy:
add_line_info (table, address, filename, line, column, 0);
basic_block = 0;
- if (low_pc == 0 || address < low_pc)
- low_pc = address;
+ if (!low_pc_set || address < low_pc)
+ {
+ low_pc_set = TRUE;
+ low_pc = address;
+ }
if (address > high_pc)
high_pc = address;
break;