aboutsummaryrefslogtreecommitdiff
path: root/source/Breakpoint
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2010-11-14 00:22:48 +0000
committerGreg Clayton <gclayton@apple.com>2010-11-14 00:22:48 +0000
commitfeb6e56275a8a7a53336bdb957064e9093e8e170 (patch)
tree2e7fa5b546c75a743d20731d49d970e5f44436f3 /source/Breakpoint
parente4b9df004d1fdd6ae10c9492fa0f504442829a10 (diff)
downloadlldb-feb6e56275a8a7a53336bdb957064e9093e8e170.tar.gz
Fixed a crasher (an assert was firing in the DWARF parser) when setting
breakpoints on inlined functions by name. This involved fixing the DWARF parser to correctly back up and parse the concrete function when we find inlined functions by name, then grabbing any appropriate inlined blocks and returning symbol contexts with the block filled in. After this was fixed, the breakpoint by name resolver needed to correctly deal with symbol contexts that had the inlined block filled in in the symbol contexts. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119017 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'source/Breakpoint')
-rw-r--r--source/Breakpoint/BreakpointResolverName.cpp38
1 files changed, 31 insertions, 7 deletions
diff --git a/source/Breakpoint/BreakpointResolverName.cpp b/source/Breakpoint/BreakpointResolverName.cpp
index f358fb3c1..0914e12ee 100644
--- a/source/Breakpoint/BreakpointResolverName.cpp
+++ b/source/Breakpoint/BreakpointResolverName.cpp
@@ -191,8 +191,21 @@ BreakpointResolverName::SearchCallback
remove = true;
else if (sc.function == NULL)
remove = true;
- else if (::strstr (sc.function->GetName().AsCString(), basename_filter) == NULL)
- remove = true;
+ else
+ {
+ const InlineFunctionInfo* inlined_info = NULL;
+
+ if (sc.block)
+ inlined_info = sc.block->GetInlinedFunctionInfo();
+
+ if (inlined_info)
+ {
+ if (::strstr (inlined_info->GetName().AsCString(), basename_filter) == NULL)
+ remove = true;
+ }
+ else if (::strstr (sc.function->GetName().AsCString(), basename_filter) == NULL)
+ remove = true;
+ }
if (remove)
{
@@ -259,16 +272,27 @@ BreakpointResolverName::SearchCallback
{
if (func_list.GetContextAtIndex(i, sc))
{
- if (sc.function)
+ if (sc.block && sc.block->GetInlinedFunctionInfo())
+ {
+ if (!sc.block->GetStartAddress(break_addr))
+ break_addr.Clear();
+ }
+ else if (sc.function)
{
break_addr = sc.function->GetAddressRange().GetBaseAddress();
if (skip_prologue)
{
- const uint32_t prologue_byte_size = sc.function->GetPrologueByteSize();
- if (prologue_byte_size)
- break_addr.SetOffset(break_addr.GetOffset() + prologue_byte_size);
+ if (break_addr.IsValid())
+ {
+ const uint32_t prologue_byte_size = sc.function->GetPrologueByteSize();
+ if (prologue_byte_size)
+ break_addr.SetOffset(break_addr.GetOffset() + prologue_byte_size);
+ }
}
-
+ }
+
+ if (break_addr.IsValid())
+ {
if (filter.AddressPasses(break_addr))
{
BreakpointLocationSP bp_loc_sp (m_breakpoint->AddLocation(break_addr, &new_location));