If a compiler adds a DW_TAG_subprogram for a routine from a different compilation unit ...
Maybe because
- the other CU has no debug info
- The compiler does not support referencing cross CU

Would there be any reason why the compiler would not be allowed to include a  DW_AT_low_pc  for that routine (if the compiler has the address)?

In the concrete example the compiler in question (on some platforms, due to afaik linker restrictions) repeats any structure definitions from other CU, if they are needed as base classes for inheritance). But that is just background on why (afaik) this situation exists.

The only such reason that I can find (if I didn't miss any) is in chapter 3.3.3 on "subroutine declaration". The complier in question does not add a DW_AT_declaration though.

> 3.3.3 Subroutine and Entry Point Locations
> ...
> A subroutine entry representing a subroutine declaration that is not also a definition does not have code address or range attributes.


If such a "repeated" subroutine would somehow fall into that category, how could the routines address be communicated to the debugger?

--
Dwarf-discuss mailing list
Dwarf-discuss@lists.dwarfstd.org
https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss

Reply via email to