Issue 244289
Summary SBFrame: Possible clarification in docs necessary? inline function context through SBAddress.GetBlock()
Labels
Assignees
Reporter Labnann
    I am investigating how LLDB exposes inline function information through its Python SB API while debugging git and came across something interesting.

Steps to reproduce:
Build and compile git with the above settings.

And, set breakpoint to system_path function and use stepi to go to 294 (around that,
where is_absolute_path is called).


Using python script:

```
>>> frame = lldb.debugger.GetSelectedTarget().GetProcess() .GetSelectedThread().GetSelectedFrame()
>>> frame
frame #0: 0x00000000005728e5 git`system_path(path="share/locale") at exec-cmd.c:294:6
>>> addr = frame.GetPCAddress()
>>> block = addr.GetBlock()
>>> print(frame.GetFunctionName())
system_path
>>> print(frame.IsInlined())
False
>>> print(frame.GetLineEntry())
sources/exec-cmd.c:294:6
>>> 
>>> print(block.IsInlined())
True
>>> print(block.GetInlinedName())
is_absolute_path
>>> print(block.GetInlinedCallSiteLine())
294
>>> 
>>> print(addr.GetLineEntry())
/udata/projects/thesis-stuffs/dataset-programs/git-stuffs/git-gcc-g-o3/abspath.h:30:29

```

Is this an intentional behavior? I was expecting them to report same line and function.

The binary compiled with dwarf debug symbols related source code are provided with this report. The artifact provided with this report may be used to reproduce the issue easily.

<!-- Failed to upload "reproducer.zip" -->

Versions of related packages:

lldb version 24.0.0git (https://github.com/llvm/llvm-project.git revision 65303e81f481bbfe386b8596423f94c43198ba94)
  clang revision 65303e81f481bbfe386b8596423f94c43198ba94
  llvm revision 65303e81f481bbfe386b8596423f94c43198ba94

gcc --version
gcc (GCC) 15.3.1 20260722 (Red Hat 15.3.1-1)
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


git compiled with -O3 in in x86_64 git version 2.55.0-rc1


[reproducer.zip](https://github.com/user-attachments/files/35098722/reproducer.zip)
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to