[Lldb-commits] [PATCH] D138724: [lldb][Target] Flush the scratch TypeSystem when process gets deleted

Michael Buch via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Dec 12 07:54:54 PST 2022


Michael137 added a comment.

In D138724#3988318 <https://reviews.llvm.org/D138724#3988318>, @labath wrote:

> I just found out that this test (the non-shared-library version) fails on linux if the executable is built with `-no-pie` (which is the default if the `CLANG_DEFAULT_PIE_ON_LINUX` option is not set, which happened to be the case for my build). I think the important fact here is that a PIE ELF executable gets its `e_type` field set to `ET_DYN`, which causes lldb to identify it as a shared library. However, it is not clear to me why would that matter in this case...

>From what I can tell the main difference with `no-PIE` executable is that `Target::ModulesDidUnload` doesn't get called when relaunching the process. Whereas in the `PIE` case we do:

  lldb_private::Target::ClearModules
  lldb_private::Target::SetExecutableModule
  lldb_private::DynamicLoader::GetTargetExecutable
  DynamicLoaderPOSIXDYLD::DidLaunch
  lldb_private::Process::Launch
  PlatformPOSIX::DebugProcess


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138724/new/

https://reviews.llvm.org/D138724



More information about the lldb-commits mailing list