This is an archive of the discontinued LLVM Phabricator instance.

Change Linux Platform to support non-host Linux architectures
ClosedPublic

Authored by ted on May 11 2015, 2:50 PM.

Details

Summary

This was originally http://reviews.llvm.org/D8709 , but I didn't commit it correctly.

Since then GetSupportedArchitectureAtIndex() has been changed. That change, http://reviews.llvm.org/D9511 , breaks non-x86 linux implementations, so this change goes back to the old implementation and adds remote linux support from D8709.

D8709 summary:

The Linux Platform currently will only say the Host architecture is supported. This patch retains that behavior for the Host Platform, but adds a list of architectures for the Remote Platform.

Diff Detail

Event Timeline

ted updated this revision to Diff 25516.May 11 2015, 2:50 PM
ted retitled this revision from to Change Linux Platform to support non-host Linux architectures.
ted updated this object.
ted edited the test plan for this revision. (Show Details)
ted added reviewers: clayborg, flackr.
ted added a subscriber: Unknown Object (MLST).
flackr edited edge metadata.May 11 2015, 5:20 PM

Repeating my comment in what seems to be the active patch. Do we need to enumerate all of the architectures? I put up http://reviews.llvm.org/D9672 earlier today to get non x86 working again where it queries the remote PlatformGdbServer if not the host. WDTY?

clayborg accepted this revision.May 12 2015, 10:17 AM
clayborg edited edge metadata.

Ideally we should only be enumerating the architectures that are actually built into the llvm/clang that we build, but this is much better than what was being done before.

This revision is now accepted and ready to land.May 12 2015, 10:17 AM
ted added a comment.May 12 2015, 11:11 AM

What I'm trying to do is allow a user to load an arbitrary Linux binary and have LLDB select the Remote Linux Platform, if the architecture is one of our supported Linuxes. My goal is to be able to remotely debug Hexagon Linux binaries on Windows.

Currently, this only works if the Host and Remote architectures match. Querying the gdbserver will only work if you're connected, which is not the case when you are doing a target create.

This is ok. This needs to be merged with the other patch where in the non host else clause it will check if it is connected and if it is connected, it queries the remote platform for the result.

So the else clause should check if connected to the remote platform, and if it is, check with the connected remote platform, else do what you do in the else clause. We don't require being connected in order to have a platform say that it can handle an architecture.

ted updated this revision to Diff 25704.May 13 2015, 10:02 AM
ted edited edge metadata.

Adding table after check for remote platform, as requested.

ted closed this revision.May 13 2015, 11:56 AM