Skip to content

Add JITLink ELF debugger support#47037

Merged
pchintalapudi merged 2 commits intomasterfrom
pc/jitlink-gdb-linux
May 11, 2023
Merged

Add JITLink ELF debugger support#47037
pchintalapudi merged 2 commits intomasterfrom
pc/jitlink-gdb-linux

Conversation

@pchintalapudi
Copy link
Copy Markdown
Member

GDBJITDebugInfoRegistrationPlugin only supports MachO debugger support; EPCDebugObjectRegistrar is used for ELF debugger support.

Copy link
Copy Markdown
Member

@vtjnash vtjnash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM. But I don't know anything about this

@dnadlinger dnadlinger removed their request for review October 4, 2022 17:31
@dnadlinger
Copy link
Copy Markdown
Member

dnadlinger commented Oct 4, 2022

Apolgoies, won't have any bandwidth for this for a few days (and haven't looked at EPCDebugObjectRegistrar yet). If it a) compiles on macOS/ARM64, and b) registers a code block with LLDB in a cursory test (I forget whether there is CI test coverage), it's probably fine.

@dnadlinger
Copy link
Copy Markdown
Member

dnadlinger commented May 10, 2023

Just saw that this is still sitting unmerged – I'm not sure I have much useful to add (and no commit access either way).

I might have enabled DebugObjectManagerPlugin only when targeting ELF and
GDBJITDebugInfoRegistrationPlugin only when targeting MachO to avoid the performance overhead, but I suppose the cost should be very small.

I'm also not sure whether there is any advantage to synthesising the JITDylib entries only for Create to the immediately look them up; or rather, the AllocAction – I think llvm_orc_registerJITLoaderGDBWrapper is only used by the EPCDebugObjectRegistrar.

@pchintalapudi pchintalapudi force-pushed the pc/jitlink-gdb-linux branch from d168c14 to becc171 Compare May 10, 2023 23:58
@gbaraldi
Copy link
Copy Markdown
Member

Does this turn off the ability to do JIT debugging on macho? (I'm not sure this ever worked but in a more theoritical sense)

@pchintalapudi
Copy link
Copy Markdown
Member Author

I'm also not sure whether there is any advantage to synthesising the JITDylib entries only for Create to the immediately look them up; or rather, the AllocAction – I think llvm_orc_registerJITLoaderGDBWrapper is only used by the EPCDebugObjectRegistrar.

There isn't any immediate benefit, but I figure the cost is pretty low to route it through Create, and maybe in the future upstream LLVM will do something fancy in Create that can't be applied to a new call (e.g. give back the correct plugin).

Does this turn off the ability to do JIT debugging on macho? (I'm not sure this ever worked but in a more theoritical sense)

No, we still add the MachO plugin when we're emitting to MachO format.

@pchintalapudi pchintalapudi added compiler:llvm For issues that relate to LLVM merge me PR is reviewed. Merge when all tests are passing labels May 11, 2023
@pchintalapudi pchintalapudi merged commit c714e2e into master May 11, 2023
@pchintalapudi pchintalapudi deleted the pc/jitlink-gdb-linux branch May 11, 2023 17:09
@pchintalapudi pchintalapudi removed the merge me PR is reviewed. Merge when all tests are passing label May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compiler:llvm For issues that relate to LLVM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants