diff options
| author | Greg Clayton <gclayton@apple.com> | 2010-11-14 00:22:48 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2010-11-14 00:22:48 +0000 |
| commit | d7e054694ef02fc6c9c8edb029384f5590541117 (patch) | |
| tree | 53353350fa0017fbad40ba333c3af0506392963e /lldb/source/Symbol/Block.cpp | |
| parent | 9ffe24f186fe27cae78e79fcd4facc7adb2729de (diff) | |
| download | bcm5719-llvm-d7e054694ef02fc6c9c8edb029384f5590541117.tar.gz bcm5719-llvm-d7e054694ef02fc6c9c8edb029384f5590541117.zip | |
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.
llvm-svn: 119017
Diffstat (limited to 'lldb/source/Symbol/Block.cpp')
| -rw-r--r-- | lldb/source/Symbol/Block.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lldb/source/Symbol/Block.cpp b/lldb/source/Symbol/Block.cpp index 1731bf46634..2aa8562083b 100644 --- a/lldb/source/Symbol/Block.cpp +++ b/lldb/source/Symbol/Block.cpp @@ -358,6 +358,24 @@ Block::GetRangeContainingAddress (const Address& addr, AddressRange &range) return false; } + +bool +Block::GetStartAddress (Address &addr) +{ + if (m_ranges.empty()) + return false; + + SymbolContext sc; + CalculateSymbolContext(&sc); + if (sc.function) + { + addr = sc.function->GetAddressRange().GetBaseAddress(); + addr.Slide(m_ranges.front().GetBaseAddress ()); + return true; + } + return false; +} + void Block::AddRange(addr_t start_offset, addr_t end_offset) { |

