DWARF-5: Ignore empty range in DWARF-5 line number tables
authorH.J. Lu <hjl.tools@gmail.com>
Sun, 24 Jan 2021 15:00:34 +0000 (07:00 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Sun, 24 Jan 2021 15:00:49 +0000 (07:00 -0800)
The DWARF5 spec does indeed explicitly say: "A bounded range entry whose
beginning and ending address offsets are equal (including zero) indicates
an empty range and may be ignored."

Since arange_add already ignores empty ranges, remove the whole check
which is equivalent to the check plus explicit continue.

PR binutils/27231
* dwarf2.c (read_rnglists): Ignore empty range when parsing line
number tables.

bfd/ChangeLog
bfd/dwarf2.c

index 9d23a8a083675ce38e01fabc5d1e1bd71929a976..949a644ac43bc03593df5b242cf6c8d30dc8c9b8 100644 (file)
@@ -1,3 +1,9 @@
+2021-01-24  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR binutils/27231
+       * dwarf2.c (read_rnglists): Ignore empty range when parsing line
+       number tables.
+
 2021-01-23  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR binutils/27231
index 292d60c33d4f44b796676baed9ccf574527ee842..240138d59820a4346facc06aebbdf1b917b88995 100644 (file)
@@ -3289,9 +3289,6 @@ read_rnglists (struct comp_unit *unit, struct arange *arange,
          return FALSE;
        }
 
-      if ((low_pc == 0 && high_pc == 0) || low_pc == high_pc)
-       return FALSE;
-
       if (!arange_add (unit, arange, low_pc, high_pc))
        return FALSE;
     }
This page took 0.026659 seconds and 4 git commands to generate.