diff options
Diffstat (limited to 'gprofng/src/DwarfLib.h')
-rw-r--r-- | gprofng/src/DwarfLib.h | 51 |
1 files changed, 50 insertions, 1 deletions
diff --git a/gprofng/src/DwarfLib.h b/gprofng/src/DwarfLib.h index 230e551..06b19b8 100644 --- a/gprofng/src/DwarfLib.h +++ b/gprofng/src/DwarfLib.h @@ -28,6 +28,7 @@ class Dwr_type; class Function; class Range; class SourceFile; +class Symbol; template <class ITEM> class Vector; template <class ITEM> class DbeArray; @@ -256,6 +257,45 @@ public: Dwr_type *put_dwr_type (Dwr_Tag *dwrTag); }; +class ExtRange +{ +public: + ExtRange (uint64_t _off, uint64_t _low, uint64_t _high) + { + offset = _off; + low = _low; + high = _high; + }; + + uint64_t offset; + uint64_t low; + uint64_t high; +}; + +class Dwr_rng_entry +{ +public: + Dwr_rng_entry (); + ~Dwr_rng_entry (); + void dump(); + static char *rng_entry2str(int val); + + Dwarf_Half version; + Dwarf_Small address_size; + Dwarf_Small segment_selector_size; + int offset_entry_count; + uint64_t length; + uint64_t offset; + bool fmt64; + Vector <ExtRange *> *ranges; +}; + +typedef struct Source +{ + int lineno; + SourceFile *sf; +} source_t; + class DwrCU { public: @@ -286,7 +326,12 @@ public: private: void build_abbrevTable (DwrSec *debug_abbrevSec, uint64_t stmt_list_offset); Function *append_Function (Symbol *sym, const char *outerName); - Symbol *find_declaration(int64_t offset); + void set_up_funcs (int64_t offset); + void inherit_prop (int64_t offset, source_t *src); + void update_source (Symbol *sym, source_t *prop); + Symbol *find_declaration (int64_t offset, source_t *prop); + SourceFile *get_source (int fileno); + Vector<Symbol *> *get_symbols (Vector<Symbol *> *syms = NULL); Vector <Range *> *get_ranges(); void set_source (Function *func); void parse_inlined_subroutine (Dwarf_cnt *ctx); @@ -317,6 +362,10 @@ private: DwrLineRegs *dwrLineReg; DbeArray<DwrAbbrevTable> *abbrevTable; DbeArray<Dwr_Attr> *abbrevAtForm; + Vector<Symbol*> *tmp_syms; // reused vector for get_symbols() + Dwr_rng_entry *rng_list; // entry in the .debug_rnglists section + bool rng_list_inited; + uint64_t base_address; // low_pc in compile_unit }; #endif /* _DWARFLIB_H_ */ |