summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectBreakpoint.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2012-08-29 21:13:06 +0000
committerGreg Clayton <gclayton@apple.com>2012-08-29 21:13:06 +0000
commit1f7460716bcb2a0919124da96365e7deb4b4181e (patch)
treeba67de6446b4d9d1107b2a2739ddfa68f7607fb2 /lldb/source/Commands/CommandObjectBreakpoint.cpp
parent23793141a1ea05f443541f580ad061225fa47052 (diff)
downloadbcm5719-llvm-1f7460716bcb2a0919124da96365e7deb4b4181e.tar.gz
bcm5719-llvm-1f7460716bcb2a0919124da96365e7deb4b4181e.zip
<rdar://problem/11757916>
Make breakpoint setting by file and line much more efficient by only looking for inlined breakpoint locations if we are setting a breakpoint in anything but a source implementation file. Implementing this complex for a many reasons. Turns out that parsing compile units lazily had some issues with respect to how we need to do things with DWARF in .o files. So the fixes in the checkin for this makes these changes: - Add a new setting called "target.inline-breakpoint-strategy" which can be set to "never", "always", or "headers". "never" will never try and set any inlined breakpoints (fastest). "always" always looks for inlined breakpoint locations (slowest, but most accurate). "headers", which is the default setting, will only look for inlined breakpoint locations if the breakpoint is set in what are consudered to be header files, which is realy defined as "not in an implementation source file". - modify the breakpoint setting by file and line to check the current "target.inline-breakpoint-strategy" setting and act accordingly - Modify compile units to be able to get their language and other info lazily. This allows us to create compile units from the debug map and not have to fill all of the details in, and then lazily discover this information as we go on debuggging. This is needed to avoid parsing all .o files when setting breakpoints in implementation only files (no inlines). Otherwise we would need to parse the .o file, the object file (mach-o in our case) and the symbol file (DWARF in the object file) just to see what the compile unit was. - modify the "SymbolFileDWARFDebugMap" to subclass lldb_private::Module so that the virtual "GetObjectFile()" and "GetSymbolVendor()" functions can be intercepted when the .o file contenst are later lazilly needed. Prior to this fix, when we first instantiated the "SymbolFileDWARFDebugMap" class, we would also make modules, object files and symbol files for every .o file in the debug map because we needed to fix up the sections in the .o files with information that is in the executable debug map. Now we lazily do this in the DebugMapModule::GetObjectFile() Cleaned up header includes a bit as well. llvm-svn: 162860
Diffstat (limited to 'lldb/source/Commands/CommandObjectBreakpoint.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectBreakpoint.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp
index 6228333cdd6..95d533da5f5 100644
--- a/lldb/source/Commands/CommandObjectBreakpoint.cpp
+++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp
@@ -91,7 +91,6 @@ public:
m_filenames (),
m_line_num (0),
m_column (0),
- m_check_inlines (true),
m_func_names (),
m_func_name_type_mask (eFunctionNameTypeNone),
m_func_regexp (),
@@ -104,7 +103,7 @@ public:
m_thread_name(),
m_queue_name(),
m_catch_bp (false),
- m_throw_bp (false),
+ m_throw_bp (true),
m_language (eLanguageTypeUnknown),
m_skip_prologue (eLazyBoolCalculate)
{
@@ -285,18 +284,19 @@ public:
m_line_num = 0;
m_column = 0;
m_func_names.clear();
- m_func_name_type_mask = 0;
+ m_func_name_type_mask = eFunctionNameTypeNone;
m_func_regexp.clear();
- m_load_addr = LLDB_INVALID_ADDRESS;
+ m_source_text_regexp.clear();
m_modules.Clear();
+ m_load_addr = LLDB_INVALID_ADDRESS;
m_ignore_count = 0;
m_thread_id = LLDB_INVALID_THREAD_ID;
m_thread_index = UINT32_MAX;
m_thread_name.clear();
m_queue_name.clear();
- m_language = eLanguageTypeUnknown;
m_catch_bp = false;
m_throw_bp = true;
+ m_language = eLanguageTypeUnknown;
m_skip_prologue = eLazyBoolCalculate;
}
@@ -316,7 +316,6 @@ public:
FileSpecList m_filenames;
uint32_t m_line_num;
uint32_t m_column;
- bool m_check_inlines;
std::vector<std::string> m_func_names;
uint32_t m_func_name_type_mask;
std::string m_func_regexp;
@@ -398,11 +397,14 @@ protected:
}
else
file = m_options.m_filenames.GetFileSpecAtIndex(0);
-
+
+ // Only check for inline functions if
+ LazyBool check_inlines = eLazyBoolCalculate;
+
bp = target->CreateBreakpoint (&(m_options.m_modules),
file,
m_options.m_line_num,
- m_options.m_check_inlines,
+ check_inlines,
m_options.m_skip_prologue,
internal).get();
}
OpenPOWER on IntegriCloud