[all-commits] [llvm/llvm-project] 75c487: [ORC] Add a MachOBuilder utility, use it to build ...

lhames via All-commits all-commits at lists.llvm.org
Thu Sep 7 10:35:12 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 75c487602a8af130ec0aedf398e318cb57063f2d
      https://github.com/llvm/llvm-project/commit/75c487602a8af130ec0aedf398e318cb57063f2d
  Author: Lang Hames <lhames at gmail.com>
  Date:   2023-09-07 (Thu, 07 Sep 2023)

  Changed paths:
    A llvm/include/llvm/ExecutionEngine/Orc/MachOBuilder.h
    M llvm/lib/ExecutionEngine/Orc/DebuggerSupportPlugin.cpp

  Log Message:
  -----------
  [ORC] Add a MachOBuilder utility, use it to build MachO debug objects.

Adds a utility for creating MachO objects. In this patch we use this utility to
construct "debug objects" for the debugger support plugin; however, this utility
should be reusable for other purposes, e.g. constructing object files for
registration with the ObjC runtime.

The debug objects in this patch are created by the MachO JIT debugging-support
plugin. The debug objects hold the debug info for object files loaded under the
JIT, and are registered with the debugger via the GDB-JIT interface. Previously
the plugin created these objects manually using direct writes to a buffer, but
this was difficult to read and modify and had become an impediment to improving
debugger support (e.g. getting source debugging working in the presence of
dead-stripping). Using the MachOBuilder utility should make the debugger
support plugin easier to maintain and improve.

This initial change to MachO JIT'd code debugging aims for feature parity with
the existing plugin (though the debug objects produced are slightly different).
Improvements to JIT'd code debugging will be tackled in follow-up patches.




More information about the All-commits mailing list