SuccessChanges

Summary

  1. [WebAssembly] Fix split-dwarf not emitting DW_OP_WASM_location correctly (details)
  2. [x86] add tests for select-of-bools; NFC (details)
  3. [AArch64] add tests for select-of-bools; NFC (details)
  4. [lld/mac] Prefix errors with "ld64.lld" instead of just "lld" (details)
  5. [lld/mac] Make -v print version and search paths in additon to linking, not instead of linking (details)
  6. [lldb/Commands] Fix short option collision for `process launch` (details)
  7. [lldb/Commands] Add command options for ScriptedProcess to ProcessLaunch (details)
  8. [lldb/Interpreter] Add ScriptInterpreter Wrapper for ScriptedProcess (details)
  9. [lldb/bindings] Add Python ScriptedProcess base class to lldb module (details)
  10. [lldb/Plugins] Add ScriptedProcess Process Plugin (details)
  11. [flang] Runtime: SCAN and VERIFY (details)
  12. [lld/mac on non-mac] fix test/MachO/search-paths.test after ab45289d2e7ce (details)
  13. [lld/mac] Use libSystem.dylib instead of libSystem.B.dylib in tests (details)
  14. [lld/mac] Add support for -flat_namespace (details)
Commit a0f4526836a76a5e2f56d25c7e35cfd89b2d0908 by aardappel
[WebAssembly] Fix split-dwarf not emitting DW_OP_WASM_location correctly

It was using the regular path for target indices that uses uleb, but TI_GLOBAL_RELOC needs to be uint32_t.
Introduced here: https://reviews.llvm.org/D85685
Fixes: https://github.com/emscripten-core/emscripten/issues/13240

Differential Revision: https://reviews.llvm.org/D97564
The file was modifiedllvm/test/MC/WebAssembly/dwarfdump.ll (diff)
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp (diff)
Commit bcd504d8a3ba9ca4a490420a96aa94326070190d by spatel
[x86] add tests for select-of-bools; NFC
The file was modifiedllvm/test/CodeGen/X86/select-with-and-or.ll (diff)
Commit fd64580f74c9c40c1dead1a7a11774199c49917d by spatel
[AArch64] add tests for select-of-bools; NFC
The file was addedllvm/test/CodeGen/AArch64/select-with-and-or.ll
Commit bacacb9d5c979b2c32ef76ac00acfa445187028f by thakis
[lld/mac] Prefix errors with "ld64.lld" instead of just "lld"

Matches the ELF and COFF ports, which use ld.lld and lld-link, respectively.

While here, also move up `cleanupCallback` to match ELF / COFF.

Differential Revision: https://reviews.llvm.org/D97715
The file was modifiedlld/MachO/Driver.cpp (diff)
Commit ab45289d2e7ce224ee938c45aa07c5d7119fdb6f by thakis
[lld/mac] Make -v print version and search paths in additon to linking, not instead of linking

This matches ld64's behavior.

Differential Revision: https://reviews.llvm.org/D97718
The file was modifiedlld/MachO/Options.td (diff)
The file was modifiedlld/test/MachO/syslibroot.test (diff)
The file was modifiedlld/MachO/Driver.cpp (diff)
The file was modifiedlld/test/MachO/silent-ignore.test (diff)
Commit 103ad3f90708eceddd9fea484ce82354e5a9d62d by medismail.bennani
[lldb/Commands] Fix short option collision for `process launch`

This patch changes the short option used in `CommandOptionsProcessLaunch`
for the `-v|--environment` command option to `-E|--environment`.

The reason for that is, that it collides with the `-v|--structured-data-value`
command option generated by `OptionGroupPythonClassWithDict` that
I'm using in an upcoming patch for the `process launch` command.

The long option `--environment` remains the same.

Differential Review: https://reviews.llvm.org/D95100

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
The file was modifiedlldb/source/Commands/Options.td (diff)
The file was modifiedlldb/source/Commands/CommandOptionsProcessLaunch.cpp (diff)
The file was modifiedlldb/docs/use/map.rst (diff)
Commit d62a53aaf1d38a55d1affbd3a30d564a4e9d3171 by medismail.bennani
[lldb/Commands] Add command options for ScriptedProcess to ProcessLaunch

This patch adds a new command options to the CommandObjectProcessLaunch
for scripted processes.

Among the options, the user need to specify the class name managing the
scripted process. The user can also use a key-value dictionary holding
arbitrary data that will be passed to the managing class.

This patch also adds getters and setters to `SBLaunchInfo` for the
class name managing the scripted process and the dictionary.

rdar://65508855

Differential Review: https://reviews.llvm.org/D95710

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
The file was modifiedlldb/source/Commands/CommandObjectPlatform.cpp (diff)
The file was modifiedlldb/include/lldb/API/SBStructuredData.h (diff)
The file was modifiedlldb/bindings/interface/SBLaunchInfo.i (diff)
The file was modifiedlldb/include/lldb/API/SBLaunchInfo.h (diff)
The file was modifiedlldb/source/API/SBTarget.cpp (diff)
The file was modifiedlldb/source/API/SBLaunchInfo.cpp (diff)
The file was modifiedlldb/source/Commands/CommandObjectProcess.cpp (diff)
The file was modifiedlldb/source/Commands/CommandOptionsProcessLaunch.cpp (diff)
The file was modifiedlldb/source/Commands/CommandOptionsProcessLaunch.h (diff)
The file was modifiedlldb/include/lldb/API/SBStream.h (diff)
The file was modifiedlldb/source/Host/common/ProcessLaunchInfo.cpp (diff)
The file was modifiedlldb/include/lldb/Host/ProcessLaunchInfo.h (diff)
Commit 182f0d1a34419445bb19d67581d6ac1afc98b7fa by medismail.bennani
[lldb/Interpreter] Add ScriptInterpreter Wrapper for ScriptedProcess

This patch adds a ScriptedProcess interface to the ScriptInterpreter and
more specifically, to the ScriptInterpreterPython.

This interface will be used in the C++ `ScriptProcess` Process Plugin to
call the script methods.

At the moment, not all methods are implemented, they will upstreamed in
upcoming patches.

This patch also adds helper methods to the ScriptInterpreter to
convert `SBAPI` Types (SBData & SBError) to `lldb_private` types
(DataExtractor & Status).

rdar://65508855

Differential Revision: https://reviews.llvm.org/D95711

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
The file was addedlldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h
The file was modifiedlldb/include/lldb/API/SBError.h (diff)
The file was modifiedlldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt (diff)
The file was modifiedlldb/include/lldb/API/SBThreadPlan.h (diff)
The file was addedlldb/include/lldb/Interpreter/ScriptedProcessInterface.h
The file was modifiedlldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h (diff)
The file was modifiedlldb/bindings/python/python-wrapper.swig (diff)
The file was modifiedlldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp (diff)
The file was modifiedlldb/include/lldb/lldb-forward.h (diff)
The file was modifiedlldb/source/Interpreter/ScriptInterpreter.cpp (diff)
The file was modifiedlldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h (diff)
The file was modifiedlldb/include/lldb/API/SBData.h (diff)
The file was addedlldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.cpp
The file was addedlldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.cpp
The file was modifiedlldb/include/lldb/Interpreter/ScriptInterpreter.h (diff)
The file was addedlldb/source/Plugins/ScriptInterpreter/Python/ScriptedProcessPythonInterface.h
The file was modifiedlldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp (diff)
Commit 2cff3dec1171188ce04ab1a4373cc1885ab97be1 by medismail.bennani
[lldb/bindings] Add Python ScriptedProcess base class to lldb module

In order to facilitate the writting of Scripted Processes, this patch
introduces a `ScriptedProcess` python base class in the lldb module.

The base class holds the python interface with all the - abstract -
methods that need to be implemented by the inherited class but also some
methods that can be overwritten.

This patch also provides an example of a Scripted Process with the
`MyScriptedProcess` class.

rdar://65508855

Differential Revision: https://reviews.llvm.org/D95712

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
The file was modifiedlldb/bindings/python/CMakeLists.txt (diff)
The file was addedlldb/examples/python/scripted_process/my_scripted_process.py
The file was addedlldb/examples/python/scripted_process/scripted_process.py
The file was addedlldb/test/API/functionalities/scripted_process/Makefile
The file was addedlldb/test/API/functionalities/scripted_process/TestScriptedProcess.py
The file was addedlldb/test/API/functionalities/scripted_process/main.c
Commit 46796762afe76496ec4dd900f64d0cf4cdc30e99 by medismail.bennani
[lldb/Plugins] Add ScriptedProcess Process Plugin

This patch introduces Scripted Processes to lldb.

The goal, here, is to be able to attach in the debugger to fake processes
that are backed by script files (in Python, Lua, Swift, etc ...) and
inspect them statically.

Scripted Processes can be used in cooperative multithreading environments
like the XNU Kernel or other real-time operating systems, but it can
also help us improve the debugger testing infrastructure by writting
synthetic tests that simulates hard-to-reproduce process/thread states.

Although ScriptedProcess is not feature-complete at the moment, it has
basic execution capabilities and will improve in the following patches.

rdar://65508855

Differential Revision: https://reviews.llvm.org/D95713

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
The file was modifiedlldb/source/Plugins/Process/CMakeLists.txt (diff)
The file was addedlldb/source/Plugins/Process/scripted/ScriptedProcess.cpp
The file was addedlldb/source/Plugins/Process/scripted/ScriptedProcess.h
The file was modifiedlldb/include/lldb/Target/Process.h (diff)
The file was modifiedlldb/bindings/python/CMakeLists.txt (diff)
The file was modifiedlldb/source/Target/Target.cpp (diff)
The file was modifiedlldb/test/API/functionalities/scripted_process/TestScriptedProcess.py (diff)
The file was addedlldb/source/Plugins/Process/scripted/CMakeLists.txt
Commit 5a451a428904168a02483510235c66a4c82fdaab by pklausler
[flang] Runtime: SCAN and VERIFY

Implement the related character intrinsic functions
SCAN and VERIFY.

Differential Revision: https://reviews.llvm.org/D97580
The file was modifiedflang/unittests/Runtime/character.cpp (diff)
The file was modifiedflang/runtime/character.cpp (diff)
The file was modifiedflang/runtime/character.h (diff)
Commit 2e803ec746ac3669efc47de58001dfee82cb8fe3 by thakis
[lld/mac on non-mac] fix test/MachO/search-paths.test after ab45289d2e7ce
The file was modifiedlld/test/MachO/search-paths.test (diff)
Commit 3e6b6cee00819d256f30e84aec7ae634e0725534 by thakis
[lld/mac] Use libSystem.dylib instead of libSystem.B.dylib in tests

For -flat_namespace, lld needs to load dylibs in LC_LOAD_DYLIB.
The current setup meant that libSystem.dylib would cause a LC_LOAD_DYLIB
with libSystem.B.dylib, but that didn't exist in our libsysroot for
tests. So just drop the .B.

See https://reviews.llvm.org/D97641#2595237 and
https://reviews.llvm.org/D97641#2595270
The file was modifiedlld/test/MachO/implicit-dylibs.s (diff)
The file was modifiedlld/test/MachO/Inputs/MacOSX.sdk/usr/lib/libSystem.tbd (diff)
The file was modifiedlld/test/MachO/lc-linker-option.ll (diff)
The file was modifiedlld/test/MachO/Inputs/iPhoneSimulator.sdk/usr/lib/libSystem.tbd (diff)
The file was modifiedlld/test/MachO/link-search-order.s (diff)
The file was modifiedlld/test/MachO/weak-import.s (diff)
The file was modifiedlld/test/MachO/stub-link.s (diff)
Commit 8174f33dc9bf34e1cde57931e2e028bd4d49c98e by thakis
[lld/mac] Add support for -flat_namespace

-flat_namespace makes lld emit binaries that use name lookup that's more in
line with other POSIX systems: Instead of looking up symbols as (dylib,name)
pairs by dyld, they're instead looked up just by name.

-flat_namespace has three effects:

1. MH_TWOLEVEL and MH_NNOUNDEFS are no longer set in the Mach-O header
2. All symbols use BIND_SPECIAL_DYLIB_FLAT_LOOKUP as ordinal
3. When a dylib is added to the link, its dependent dylibs are also added,
   so that lld can verify that no undefined symbols remain at the end of
   a link with -flat_namespace. These transitive dylibs are added for symbol
   resolution, but they are not emitted in LC_LOAD_COMMANDs.

-undefined with -flat_namespace still isn't implemented. Before this change,
it was impossible to hit that combination because -flat_namespace caused a
diagnostic. Now that it no longer does, emit a dedicated temporary diagnostic
when both flags are used.

Differential Revision: https://reviews.llvm.org/D97641
The file was modifiedlld/MachO/InputFiles.cpp (diff)
The file was addedlld/test/MachO/flat-namespace.s
The file was modifiedlld/MachO/SyntheticSections.cpp (diff)
The file was modifiedlld/MachO/Driver.cpp (diff)
The file was modifiedlld/MachO/SymbolTable.cpp (diff)
The file was modifiedlld/MachO/Options.td (diff)
The file was modifiedlld/test/MachO/header.s (diff)