[lldb] Fix Linux core file tests hanging on Windows (#142143) After https://github.com/llvm/llvm-project/pull/141670, TestLinuxCore.py was timing out on our Windows on Arm bot. Non-Linux core files were ok, as were Linux core files unless it was ppc64le, riscv64 or loongarch. I eventually noticed that it was attempting to create PlatformLinux many times before trying PlatformAndroid, PlatformMac etc., which it should never need to do. The tests passed on a Linux host too, to add to the mystery. Turns out, all I needed to do was mark those architectures as supported in the PlatformLinux constructor. If they're not listed there we get stuck here: ``` // Wait for a stopped event since we just posted one above... printf("waiting for process to stop...\n"); lldb::EventSP event_sp; StateType state = WaitForProcessToStop(std::nullopt, &event_sp, true, listener_sp, nullptr, true, SelectMostRelevantFrame); printf("process stopped\n"); ``` Waiting for a stop event that never comes, because it appears we try to treat the core as a real process? ``` DynamicLoaderPOSIXDYLD::virtual DynamicLoaderPOSIXDYLD::DidAttach pid 28147 executable '<null executable>', load_offset 0xffffffffffffffff <...> Process::ShouldBroadcastEvent (000002ABC43FF4A0) Restarting process from state: stopped Process::PrivateResume() m_stop_id = 1, public state: unloaded private state: stopped Process::PrivateResume() got an error "error: elf-core does not support resuming processes". Process::ShouldBroadcastEvent (000002ABC43FF4A0) => new state: stopped, last broadcast state: invalid - NO ``` Some actionable feedback here would be nice, but all I care about for now is that the tests run again. I have not added riscv32 as that appears to only be supported for Darwin at the moment (I expect someone will get burned by this when it is). I think debug on these architectures worked if they were also the host arch, if someone tried to remote debug them, I think it would have failed.
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.