gprofng: fix Dwarf reader for DW_TAG_subprogram
authorVladimir Mezentsev <vladimir.mezentsev@oracle.com>
Fri, 17 Feb 2023 03:35:35 +0000 (19:35 -0800)
committerVladimir Mezentsev <vladimir.mezentsev@oracle.com>
Fri, 17 Feb 2023 22:00:54 +0000 (14:00 -0800)
gprofng/ChangeLog
2023-02-16  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

* src/Dwarf.cc: Skip DW_TAG_subprogram when DW_AT_declaration is 1.

gprofng/src/Dwarf.cc

index 5485be7f796fea27de8d038f52063990336fcda1..fb430cdb079e46a0d7b87178153ed7f5853b2b02 100644 (file)
@@ -499,8 +499,7 @@ DwrCU::parseChild (Dwarf_cnt *ctx)
                  if (link_name && streq (link_name, NTXT ("MAIN")))
                    ctx->fortranMAIN = Stabs::find_func (NTXT ("MAIN"), ctx->module->functions, true, true);
                }
-             if (get_linkage_name () == NULL)
-               break;
+             break;
            }
          func = append_Function (ctx);
          if (func)