LLDB如何找到内联函数?

问题描述 投票:1回答:1

当通过指定符号名称设置断点时,lldb不仅解析该符号,还查找内联使用函数的位置。那怎么可能?

1: name = 'my_func', locations = 4, resolved = 1, hit count = 1
  1.1: where = kernel.development`my_func + 6 at task.c:17, address = 0xxxx, resolved, hit count = 0 
  1.2: where = kernel.development`func_foo + 119 [inlined] my_func at task.c:22, address = 0xxxx, unresolved, hit count = 0  Options: disabled 
  1.3: where = kernel.development`func_bar + 95 [inlined] my_func at task.c:65, address = 0xxxx, unresolved, hit count = 1  Options: disabled 

查看LLDB的来源,我只能找到它是否检查了内联某个块的位置://source/API/SBBlock.cpp

bool SBBlock::IsInlined() const {
  LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBlock, IsInlined);

  if (m_opaque_ptr)
    return m_opaque_ptr->GetInlinedFunctionInfo() != nullptr;
  return false;
}
c++ macos symbols lldb
1个回答
0
投票

split-dwarf-inlining.cpp中的LLDB测试用例确认split-dwarf-inlining.cpp调试信息用于查找内联函数。

DWARF
© www.soinside.com 2019 - 2024. All rights reserved.