[Lldb-commits] [lldb] [LLDB][PosixELF] Move m_mem_region_cache to generic ELF layer (PR #195809)
via lldb-commits
lldb-commits at lists.llvm.org
Wed May 6 03:17:35 PDT 2026
aokblast wrote:
> > > with the test limited to FreeBSD.
> >
> >
> > Is this because it assumes things about the call stack? That `vfprintf` is its own function, I think?
> > If that's so could the test be changed to be two functions we write ourselves, and step out of those?
>
> Yes, since step-out is to get the previous caller and we cannot assume different libc implementations have same call stack.
>
> I also try to create a testcase like the following:
>
> ```
> void g() {}
> void f() {g()}
> int main() {f()}
> ```
>
> and set a breakpoint on g(), step-out twice. It seems that simple program does not break lldb on FreeBSD.
One issue is that a userspace program can modify its memory mappings dynamically (e.g., adding or removing mappings). On FreeBSD's case, the runtime linker (rtld) may load libc after debugging has already started. At the moment, I don’t have a good way to create a generic test case for this scenario.
https://github.com/llvm/llvm-project/pull/195809
More information about the lldb-commits
mailing list