* A section header in .debug_pubnames or .debug_pubtypes. */
| 253 | * A section header in .debug_pubnames or .debug_pubtypes. |
| 254 | */ |
| 255 | struct 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. |
nothing calls this directly
no outgoing calls
no test coverage detected