MCPcopy Create free account
hub / github.com/aclements/libelfin / name_unit

Class name_unit

dwarf/internal.hh:255–277  ·  view source on GitHub ↗

* A section header in .debug_pubnames or .debug_pubtypes. */

Source from the content-addressed store, hash-verified

253 * A section header in .debug_pubnames or .debug_pubtypes.
254 */
255struct name_unit
256{
257 uhalf version;
258 section_offset debug_info_offset;
259 section_length debug_info_length;
260 // Cursor to the first name_entry in this unit. This cursor's
261 // section is limited to this unit.
262 cursor entries;
263
264 void read(cursor *cur)
265 {
266 // Section 7.19
267 std::shared_ptr<section> subsec = cur->subsection();
268 cursor sub(subsec);
269 sub.skip_initial_length();
270 version = sub.fixed<uhalf>();
271 if (version != 2)
272 throw format_error("unknown name unit version " + std::to_string(version));
273 debug_info_offset = sub.offset();
274 debug_info_length = sub.offset();
275 entries = sub;
276 }
277};
278
279/**
280 * An entry in a .debug_pubnames or .debug_pubtypes unit.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected