[Lldb-commits] [lldb] r122200 - in /lldb/trunk: include/lldb/Symbol/LineTable.h source/Symbol/LineTable.cpp
Greg Clayton
gclayton at apple.com
Sun Dec 19 14:07:39 PST 2010
Author: gclayton
Date: Sun Dec 19 16:07:39 2010
New Revision: 122200
URL: http://llvm.org/viewvc/llvm-project?rev=122200&view=rev
Log:
Line tables were trying to be too clever and only use 24 bits for a line
table offset where the offset is within a section. Increased the section
offset for line table entries to be 32 bits (from 24 bits), giving each
section a 4G offset, and increased the section index to 32 bits (from 8 bits).
Modified:
lldb/trunk/include/lldb/Symbol/LineTable.h
lldb/trunk/source/Symbol/LineTable.cpp
Modified: lldb/trunk/include/lldb/Symbol/LineTable.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/LineTable.h?rev=122200&r1=122199&r2=122200&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/LineTable.h (original)
+++ lldb/trunk/include/lldb/Symbol/LineTable.h Sun Dec 19 16:07:39 2010
@@ -194,7 +194,7 @@
struct Entry
{
- enum { kInvalidSectIdx = 255 };
+ enum { kInvalidSectIdx = UINT32_MAX };
Entry () :
sect_idx (kInvalidSectIdx),
@@ -210,7 +210,7 @@
{
}
- Entry ( uint8_t _sect_idx,
+ Entry ( uint32_t _sect_idx,
lldb::addr_t _sect_offset,
uint32_t _line,
uint16_t _column,
@@ -231,10 +231,10 @@
is_epilogue_begin (_is_epilogue_begin),
is_terminal_entry (_is_terminal_entry)
{
- // We have reserved 24 bits for the section offset which should
+ // We have reserved 32 bits for the section offset which should
// be enough, but if it isn't then we need to make m_section_offset
// bigger
- assert((_sect_offset & 0xffffffffff000000ull) == 0);
+ assert(_sect_offset <= UINT32_MAX);
}
int
@@ -295,8 +295,8 @@
//------------------------------------------------------------------
// Member variables.
//------------------------------------------------------------------
- uint32_t sect_idx:8, ///< The section index for this line entry.
- sect_offset:24; ///< The offset into the section for this line entry.
+ uint32_t sect_idx; ///< The section index for this line entry.
+ uint32_t sect_offset; ///< The offset into the section for this line entry.
uint32_t line; ///< The source line number, or zero if there is no line number information.
uint16_t column; ///< The column number of the source line, or zero if there is no column information.
uint16_t file_idx:11, ///< The file index into CompileUnit's file table, or zero if there is no file information.
Modified: lldb/trunk/source/Symbol/LineTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/LineTable.cpp?rev=122200&r1=122199&r2=122200&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/LineTable.cpp (original)
+++ lldb/trunk/source/Symbol/LineTable.cpp Sun Dec 19 16:07:39 2010
@@ -57,10 +57,6 @@
)
{
uint32_t sect_idx = m_section_list.AddUniqueSection (section_sp);
- // Make sure we don't user more than 256 sections as that is all we have
- // room for in the LineTable::Entry::m_sect_idx. If this assert fires,
- // we will need to m_sect_idx have more bits...
- assert((section_offset & 0xffffffffff000000ull) == 0);
Entry entry(sect_idx, section_offset, line, column, file_idx, is_start_of_statement, is_start_of_basic_block, is_prologue_end, is_epilogue_begin, is_terminal_entry);
m_entries.push_back (entry);
}
@@ -91,10 +87,6 @@
}
uint32_t sect_idx = m_section_list.AddUniqueSection (line_section_sp);
- // Make sure we don't user more than 256 sections as that is all we have
- // room for in the LineTable::Entry::m_sect_idx. If this assert fires,
- // we will need to m_sect_idx have more bits...
- assert((section_offset & 0xffffffffff000000ull) == 0);
Entry entry(sect_idx, section_offset, line, column, file_idx, is_start_of_statement, is_start_of_basic_block, is_prologue_end, is_epilogue_begin, is_terminal_entry);
entry_collection::iterator begin_pos = m_entries.begin();
More information about the lldb-commits
mailing list