1

I'm trying to find the offset range of a c++ class function but when I look in the DWARF information, I don't see the low_pc or high_pc attributes. There are also no DW_AT_specification or DW_AT_abstract_origin entries for the DIE that has the rest of the function information. For example I can only see:

0x03989358:     DW_TAG_subprogram
                  DW_AT_decl_line       (539)
                  DW_AT_decl_file       ("file.h")
                  DW_AT_declaration     (0x01)
                  DW_AT_MIPS_linkage_name       ("Mangled function Class:Function")
                  DW_AT_accessibility   (DW_ACCESS_public)
                  DW_AT_name    ("Function")

And no other DIEs point to 0x03989358

How can I obtain the offset range for these functions / why are they not included?

P.S. I got this info from dwarfdump and this is DWARFv3

TreeWater
  • 761
  • 6
  • 13

1 Answers1

0

In my experience, there might be more than one DW_TAG_subprogram element for a function in the same CU. The first one would have the function declaration, the second one would have the low_pc/high_pc, and a DW_AT_specification pointing at the first one.

Search the CU for DW_TAG_subprogram elements with low_pc/high_pc, see where it takes you.

Use DWARF Explorer to eyeball the whole DIE tree, see if it helps.

Seva Alekseyev
  • 59,826
  • 25
  • 160
  • 281