[Lldb-commits] [lldb] r368075 - [SymbolFile] Remove commented out method
Alex Langford via lldb-commits
lldb-commits at lists.llvm.org
Tue Aug 6 12:47:08 PDT 2019
Author: xiaobai
Date: Tue Aug 6 12:47:08 2019
New Revision: 368075
URL: http://llvm.org/viewvc/llvm-project?rev=368075&view=rev
Log:
[SymbolFile] Remove commented out method
Modified:
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp?rev=368075&r1=368074&r2=368075&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp Tue Aug 6 12:47:08 2019
@@ -835,204 +835,3 @@ void DWARFDebugLine::State::Finalize(dw_
callback(offset, *this, callbackUserData);
}
-// void
-// DWARFDebugLine::AppendLineTableData
-//(
-// const DWARFDebugLine::Prologue* prologue,
-// const DWARFDebugLine::Row::collection& state_coll,
-// const uint32_t addr_size,
-// BinaryStreamBuf &debug_line_data
-//)
-//{
-// if (state_coll.empty())
-// {
-// // We have no entries, just make an empty line table
-// debug_line_data.Append8(0);
-// debug_line_data.Append8(1);
-// debug_line_data.Append8(DW_LNE_end_sequence);
-// }
-// else
-// {
-// DWARFDebugLine::Row::const_iterator pos;
-// Row::const_iterator end = state_coll.end();
-// bool default_is_stmt = prologue->default_is_stmt;
-// const DWARFDebugLine::Row reset_state(default_is_stmt);
-// const DWARFDebugLine::Row* prev_state = &reset_state;
-// const int32_t max_line_increment_for_special_opcode =
-// prologue->MaxLineIncrementForSpecialOpcode();
-// for (pos = state_coll.begin(); pos != end; ++pos)
-// {
-// const DWARFDebugLine::Row& curr_state = *pos;
-// int32_t line_increment = 0;
-// dw_addr_t addr_offset = curr_state.address - prev_state->address;
-// dw_addr_t addr_advance = (addr_offset) / prologue->min_inst_length;
-// line_increment = (int32_t)(curr_state.line - prev_state->line);
-//
-// // If our previous state was the reset state, then let's emit the
-// // address to keep GDB's DWARF parser happy. If we don't start each
-// // sequence with a DW_LNE_set_address opcode, the line table won't
-// // get slid properly in GDB.
-//
-// if (prev_state == &reset_state)
-// {
-// debug_line_data.Append8(0); // Extended opcode
-// debug_line_data.Append32_as_ULEB128(addr_size + 1); // Length of
-// opcode bytes
-// debug_line_data.Append8(DW_LNE_set_address);
-// debug_line_data.AppendMax64(curr_state.address, addr_size);
-// addr_advance = 0;
-// }
-//
-// if (prev_state->file != curr_state.file)
-// {
-// debug_line_data.Append8(DW_LNS_set_file);
-// debug_line_data.Append32_as_ULEB128(curr_state.file);
-// }
-//
-// if (prev_state->column != curr_state.column)
-// {
-// debug_line_data.Append8(DW_LNS_set_column);
-// debug_line_data.Append32_as_ULEB128(curr_state.column);
-// }
-//
-// // Don't do anything fancy if we are at the end of a sequence
-// // as we don't want to push any extra rows since the
-// DW_LNE_end_sequence
-// // will push a row itself!
-// if (curr_state.end_sequence)
-// {
-// if (line_increment != 0)
-// {
-// debug_line_data.Append8(DW_LNS_advance_line);
-// debug_line_data.Append32_as_SLEB128(line_increment);
-// }
-//
-// if (addr_advance > 0)
-// {
-// debug_line_data.Append8(DW_LNS_advance_pc);
-// debug_line_data.Append32_as_ULEB128(addr_advance);
-// }
-//
-// // Now push the end sequence on!
-// debug_line_data.Append8(0);
-// debug_line_data.Append8(1);
-// debug_line_data.Append8(DW_LNE_end_sequence);
-//
-// prev_state = &reset_state;
-// }
-// else
-// {
-// if (line_increment || addr_advance)
-// {
-// if (line_increment > max_line_increment_for_special_opcode)
-// {
-// debug_line_data.Append8(DW_LNS_advance_line);
-// debug_line_data.Append32_as_SLEB128(line_increment);
-// line_increment = 0;
-// }
-//
-// uint32_t special_opcode = (line_increment >=
-// prologue->line_base) ? ((line_increment -
-// prologue->line_base) + (prologue->line_range * addr_advance)
-// + prologue->opcode_base) : 256;
-// if (special_opcode > 255)
-// {
-// // Both the address and line won't fit in one special
-// opcode
-// // check to see if just the line advance will?
-// uint32_t special_opcode_line = ((line_increment >=
-// prologue->line_base) && (line_increment != 0)) ?
-// ((line_increment - prologue->line_base) +
-// prologue->opcode_base) : 256;
-//
-//
-// if (special_opcode_line > 255)
-// {
-// // Nope, the line advance won't fit by itself, check
-// the address increment by itself
-// uint32_t special_opcode_addr = addr_advance ?
-// ((0 - prologue->line_base) +
-// (prologue->line_range * addr_advance) +
-// prologue->opcode_base) : 256;
-//
-// if (special_opcode_addr > 255)
-// {
-// // Neither the address nor the line will fit in
-// a
-// // special opcode, we must manually enter both
-// then
-// // do a DW_LNS_copy to push a row (special
-// opcode
-// // automatically imply a new row is pushed)
-// if (line_increment != 0)
-// {
-// debug_line_data.Append8(DW_LNS_advance_line);
-// debug_line_data.Append32_as_SLEB128(line_increment);
-// }
-//
-// if (addr_advance > 0)
-// {
-// debug_line_data.Append8(DW_LNS_advance_pc);
-// debug_line_data.Append32_as_ULEB128(addr_advance);
-// }
-//
-// // Now push a row onto the line table manually
-// debug_line_data.Append8(DW_LNS_copy);
-//
-// }
-// else
-// {
-// // The address increment alone will fit into a
-// special opcode
-// // so modify our line change, then issue a
-// special opcode
-// // for the address increment and it will push a
-// row into the
-// // line table
-// if (line_increment != 0)
-// {
-// debug_line_data.Append8(DW_LNS_advance_line);
-// debug_line_data.Append32_as_SLEB128(line_increment);
-// }
-//
-// // Advance of line and address will fit into a
-// single byte special opcode
-// // and this will also push a row onto the line
-// table
-// debug_line_data.Append8(special_opcode_addr);
-// }
-// }
-// else
-// {
-// // The line change alone will fit into a special
-// opcode
-// // so modify our address increment first, then issue
-// a
-// // special opcode for the line change and it will
-// push
-// // a row into the line table
-// if (addr_advance > 0)
-// {
-// debug_line_data.Append8(DW_LNS_advance_pc);
-// debug_line_data.Append32_as_ULEB128(addr_advance);
-// }
-//
-// // Advance of line and address will fit into a
-// single byte special opcode
-// // and this will also push a row onto the line table
-// debug_line_data.Append8(special_opcode_line);
-// }
-// }
-// else
-// {
-// // Advance of line and address will fit into a single
-// byte special opcode
-// // and this will also push a row onto the line table
-// debug_line_data.Append8(special_opcode);
-// }
-// }
-// prev_state = &curr_state;
-// }
-// }
-// }
-//}
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h?rev=368075&r1=368074&r2=368075&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h Tue Aug 6 12:47:08 2019
@@ -206,9 +206,6 @@ public:
DWARFUnit *dwarf_cu);
static void Parse(const lldb_private::DWARFDataExtractor &debug_line_data,
DWARFDebugLine::State::Callback callback, void *userData);
- // static void AppendLineTableData(const DWARFDebugLine::Prologue* prologue,
- // const DWARFDebugLine::Row::collection& state_coll, const uint32_t
- // addr_size, BinaryStreamBuf &debug_line_data);
DWARFDebugLine() : m_lineTableMap() {}
More information about the lldb-commits
mailing list