This is an archive of the discontinued LLVM Phabricator instance.

Fix problem where 32-bit statically built lldb-platform cannot find lldb-gdbserver.
ClosedPublic

Authored by chaoren on Feb 9 2015, 2:16 PM.

Details

Reviewers
ovyalov
Summary

Adding x86 to supported architectures on x86_64.

Failsafe directory for shared objects and support executables.

Diff Detail

Event Timeline

chaoren updated this revision to Diff 19615.Feb 9 2015, 2:16 PM
chaoren retitled this revision from to Fix problem where 32-bit statically built lldb-platform cannot find lldb-gdbserver..
chaoren updated this object.
chaoren edited the test plan for this revision. (Show Details)
chaoren added a reviewer: ovyalov.
chaoren added a subscriber: Unknown Object (MLST).
ovyalov edited edge metadata.Feb 9 2015, 2:49 PM

Please see my comments.

source/Host/linux/HostInfoLinux.cpp
228

Could you check return value of HostInfoPosix::ComputeSharedLibraryDirectory?
You may return true immediately if HostInfoPosix::ComputeSharedLibraryDirectory return true and fall back to GetProgramFileSpec().GetDirectory().

source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
222 ↗(On Diff #19615)

Do we need this condition only for remote debugging of Linux target? Or is it required for local LLGS debugging as well?
I'm wondering whether an alternative solution is appropriate - override HostInfoLinux::GetArchitecture(..) and put this condition in there. In this case it will be supported either with local or remote debugging, with and without LLGS.

source/Plugins/Process/Utility/RegisterContextLinux_i386.cpp
114–115

case llvm::Triple::x86:
case llvm::Triple::x86_64:

return g_register_infos_i386;

?

chaoren updated this revision to Diff 19694.Feb 10 2015, 10:28 AM
chaoren edited edge metadata.
ovyalov accepted this revision.Feb 10 2015, 10:29 AM
ovyalov edited edge metadata.

lgtm

This revision is now accepted and ready to land.Feb 10 2015, 10:29 AM
chaoren closed this revision.Feb 12 2015, 10:40 AM
chaoren added inline comments.
source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
222 ↗(On Diff #19615)

I actually don't need this part for what I'm doing. Just in case I don't break anything without noticing, I'm going to remove this change.