This is an archive of the discontinued LLVM Phabricator instance.

[lldb] [Process/FreeBSDRemote] Implement GetLoadedModuleFileSpec() and GetFileLoadAddress()
ClosedPublic

Authored by mgorny on Nov 30 2020, 5:47 AM.

Details

Summary

Copy the Linux implementation of GetLoadedModuleFileSpec()
and GetFileLoadAddress() into NativeProcessFreeBSD. This does not seem
to change anything at the moment but reducing the differences between
the plugins should help us in the long term.

Diff Detail

Event Timeline

mgorny created this revision.Nov 30 2020, 5:47 AM
mgorny requested review of this revision.Nov 30 2020, 5:47 AM

No objection, but maybe add a comment explaining the status of this implementation? Does/will NetBSD do the same?

labath accepted this revision.Dec 1 2020, 5:21 AM

These are basically workarounds for dynamic linker bugs, when we're not able to get complete information via r_debug. If your dynamic linker (loader) behaves, then it's not surprising that they make no effect.

Implementing them is fine. It might be nice to also add some explicit tests for these functions (via lldb-server tests, perhaps). We should have done something like that when we were adding these in the first place, but we weren't so big on testing then...

This revision is now accepted and ready to land.Dec 1 2020, 5:21 AM
mgorny added a comment.Dec 6 2020, 3:27 PM

No objection, but maybe add a comment explaining the status of this implementation? Does/will NetBSD do the same?

I will add the comment, and I'm planning to sync NetBSD in my free time, later on.

mgorny updated this revision to Diff 309793.Dec 6 2020, 3:36 PM

Added an explanatory comment.

Herald added a project: Restricted Project. · View Herald TranscriptDec 7 2020, 12:57 AM