Skip to content

Commit 75c4876

Browse files
committed
[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.
1 parent 401e457 commit 75c4876

File tree

2 files changed

+641
-225
lines changed

2 files changed

+641
-225
lines changed

0 commit comments

Comments
 (0)