[all-commits] [llvm/llvm-project] cf2c8e: [lldb] Fix TestDyldExecLinux with xml enabled

Pavel Labath via All-commits all-commits at lists.llvm.org
Tue Jun 14 02:49:32 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cf2c8e419dbc6575f82b8ac44b62a2306624899a
  Author: Pavel Labath <pavel at labath.sk>
  Date:   2022-06-14 (Tue, 14 Jun 2022)

  Changed paths:
    M lldb/include/lldb/Host/common/NativeProcessProtocol.h
    M lldb/source/Host/common/NativeProcessProtocol.cpp
    M lldb/source/Plugins/Process/POSIX/NativeProcessELF.cpp
    M lldb/source/Plugins/Process/POSIX/NativeProcessELF.h
    M lldb/test/API/functionalities/dyld-exec-linux/TestDyldExecLinux.py

  Log Message:
  [lldb] Fix TestDyldExecLinux with xml enabled

NativeProcessLinux is not able to properly read libraries-svr4 data when
running with ld.so as the "main" executable. Normally, this is not a big
problem, as it returns an error message, and lldb can fallback to manual
library loading.

Unfortunately, lldb-server also does not clear cached svr4 data on exec,
which means that it does *not* return an error when the application
execs from the "regular" to the "ld.so" mode. Instead it returns
incorrect data (it is missing the main executable) and causes
TestDyldExecLinux to fail (but only when building with xml support

This patch makes ensures that cached process data is cleared on exec,
fixing the test. Since TestDyldExecLinux has shown to be sensitive to
the way we read library info, I fork it into two (with svr4 enabled and

More information about the All-commits mailing list