MCPcopy Create free account
hub / github.com/async-profiler/async-profiler / parse

Method parse

src/dwarf.cpp:77–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77void DwarfParser::parse(const char* eh_frame_hdr) {
78 u8 version = eh_frame_hdr[0];
79 u8 eh_frame_ptr_enc = eh_frame_hdr[1];
80 u8 fde_count_enc = eh_frame_hdr[2];
81 u8 table_enc = eh_frame_hdr[3];
82
83 if (version != 1 || (eh_frame_ptr_enc & 0x7) != 0x3 || (fde_count_enc & 0x7) != 0x3 || (table_enc & 0xf7) != 0x33) {
84 Log::warn("Unsupported .eh_frame_hdr [%02x%02x%02x%02x] in %s",
85 version, eh_frame_ptr_enc, fde_count_enc, table_enc, _name);
86 return;
87 }
88
89 int fde_count = *(int*)(eh_frame_hdr + 8);
90 int* table = (int*)(eh_frame_hdr + 16);
91 for (int i = 0; i < fde_count; i++) {
92 _ptr = eh_frame_hdr + table[i * 2];
93 parseFde();
94 }
95}
96
97void DwarfParser::parseCie() {
98 u32 cie_len = get32();

Callers 6

startProfilerMethod · 0.45
Agent_OnLoadFunction · 0.45
Agent_OnAttachFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected