Lines Matching refs:Prologue
92 // If the row is zero we are being called with the prologue only
93 state.prologue->Dump (log);
191 Prologue prologue;
193 if (ParsePrologue(debug_line_data, &offset, &prologue))
198 prologue.Dump (log);
207 Row row(prologue.default_is_stmt);
208 const dw_offset_t end_offset = debug_line_offset + prologue.total_length + sizeof(prologue.total_length);
233 row.Reset(prologue.default_is_stmt);
256 prologue.file_names.push_back(fileEntry);
279 dw_uleb128_t addr_offset = addr_offset_n * prologue.min_inst_length;
315 uint8_t adjust_opcode = 255 - prologue.opcode_base;
316 dw_addr_t addr_offset = (adjust_opcode / prologue.line_range) * prologue.min_inst_length;
347 if (opcode < prologue.opcode_base)
351 // prologue's standard_opcode_lengths array
352 uint8_t n = prologue.standard_opcode_lengths[opcode-1];
362 uint8_t adjust_opcode = opcode - prologue.opcode_base;
363 dw_addr_t addr_offset = (adjust_opcode / prologue.line_range) * prologue.min_inst_length;
364 int32_t line_offset = prologue.line_base + (adjust_opcode % prologue.line_range);
385 // new prologue is parsed and every time a new row is to be added to
404 DWARFDebugLine::ParsePrologue(const DataExtractor& debug_line_data, lldb::offset_t* offset_ptr, Prologue* prologue)
410 prologue->Clear();
413 prologue->total_length = debug_line_data.GetU32(offset_ptr);
414 prologue->version = debug_line_data.GetU16(offset_ptr);
415 if (prologue->version != 2)
418 prologue->prologue_length = debug_line_data.GetU32(offset_ptr);
419 const lldb::offset_t end_prologue_offset = prologue->prologue_length + *offset_ptr;
420 prologue->min_inst_length = debug_line_data.GetU8(offset_ptr);
421 prologue->default_is_stmt = debug_line_data.GetU8(offset_ptr);
422 prologue->line_base = debug_line_data.GetU8(offset_ptr);
423 prologue->line_range = debug_line_data.GetU8(offset_ptr);
424 prologue->opcode_base = debug_line_data.GetU8(offset_ptr);
426 prologue->standard_opcode_lengths.reserve(prologue->opcode_base-1);
428 for (i=1; i<prologue->opcode_base; ++i)
431 prologue->standard_opcode_lengths.push_back(op_len);
438 prologue->include_directories.push_back(s);
453 prologue->file_names.push_back(fileEntry);
462 "warning: parsing line table prologue at 0x%8.8" PRIx64 " should have ended at 0x%8.8" PRIx64 " but it ended ad 0x%8.8" PRIx64 "\n",
557 "warning: parsing line table prologue at 0x%8.8x should have ended at 0x%8.8x but it ended ad 0x%8.8" PRIx64 "\n",
568 // Parse a single line table (prologue and all rows) and call the
569 // callback function once for the prologue (row in state will be zero)
582 Prologue::shared_ptr prologue(new Prologue());
591 if (!ParsePrologue(debug_line_data, offset_ptr, prologue.get()))
594 log->Error ("failed to parse DWARF line table prologue");
601 prologue->Dump (log);
603 const dw_offset_t end_offset = debug_line_offset + prologue->total_length + sizeof(prologue->total_length);
605 State state(prologue, log, callback, userData);
657 // section of the statement program prologue. The index is LEB128(0)
664 // appear; the names in the prologue come before names defined by
673 state.prologue->file_names.push_back(fileEntry);
684 else if (opcode < prologue->opcode_base)
698 // min_inst_length field of the prologue, and adds the
700 state.address += debug_line_data.GetULEB128(offset_ptr) * prologue->min_inst_length;
746 uint8_t adjust_opcode = 255 - prologue->opcode_base;
747 dw_addr_t addr_offset = (adjust_opcode / prologue->line_range) * prologue->min_inst_length;
785 // of such opcodes because they are specified in the prologue
789 assert (opcode - 1 < prologue->standard_opcode_lengths.size());
790 const uint8_t opcode_length = prologue
830 uint8_t adjust_opcode = opcode - prologue->opcode_base;
831 dw_addr_t addr_offset = (adjust_opcode / prologue->line_range) * prologue->min_inst_length;
832 int32_t line_offset = prologue->line_base + (adjust_opcode % prologue->line_range);
855 // the prologue using the supplied shared pointer
856 line_table->prologue = state.prologue;
873 // the prologue and all rows.
883 DWARFDebugLine::Prologue::IsValid() const
889 // DWARFDebugLine::Prologue::Dump
892 DWARFDebugLine::Prologue::Dump(Log *log)
896 log->Printf( "Line table prologue:");
940 // Append the contents of the prologue to the binary stream buffer
943 //DWARFDebugLine::Prologue::Append(BinaryStreamBuf& buff) const
974 bool DWARFDebugLine::Prologue::GetFile(uint32_t file_idx, std::string& path, std::string& directory) const
996 if (prologue.get())
997 prologue->Dump (log);
1200 DWARFDebugLine::State::State(Prologue::shared_ptr& p, Log *l, DWARFDebugLine::State::Callback cb, void* userData) :
1202 prologue (p),
1208 // Call the callback with the initial row state of zero for the prologue
1219 Row::Reset(prologue->default_is_stmt);
1264 // const DWARFDebugLine::Prologue* prologue,
1281 // bool default_is_stmt = prologue->default_is_stmt;
1284 // const int32_t max_line_increment_for_special_opcode = prologue->MaxLineIncrementForSpecialOpcode();
1290 // dw_addr_t addr_advance = (addr_offset) / prologue->min_inst_length;
1354 // uint32_t special_opcode = (line_increment >= prologue->line_base) ? ((line_increment - prologue->line_base) + (prologue->line_range * addr_advance) + prologue->opcode_base) : 256;
1359 // uint32_t special_opcode_line = ((line_increment >= prologue->line_base) && (line_increment != 0)) ?
1360 // ((line_increment - prologue->line_base) + prologue->opcode_base) : 256;
1367 // ((0 - prologue->line_base) + (prologue->line_range * addr_advance) + prologue->opcode_base) : 256;