Enable Linux distribution in vendor portion of host triple.
This change does the following:
- enables building lldb-gdbserver on linux_x86-64 platforms.
Note - it builds but it has several run-time issues where many gdb remote protocol features are not properly implemented yet. I'm working on these one at a time.
- lldb-gdbserver: does not enable the eLaunchFlagDebug launch flag on Linux. Currently the POSIX launch routine will assert if that flag is passed in, presumably because that launch mode is not yet available. This prevents lldb-gdbserver from asserting the moment it launches the debuggee process.
- Adds ConstString& Host::GetDistributionId ()
This method is defined to return an empty result on all platforms except for Linux. On Linux, it makes one attempt to execute 'lsb_release -i' (both /usr/bin/lsb_release, where it appears on ubuntu, and /bin/lsb_release, where it appears on fedora if the redhat-lsb package is installed). If lsb_release is not found in either of those locations, or if 'lsb_release -i' does not return the first line starting with "Distributor ID:\t", then the distribution id is empty. The method will lower-case the id and replace whitespace with underscores.
- Modify Host::GetArchitecture () so that linux replaces an unknown vendor portion with the results of GetDistributionId () if that is non-empty. This shows up now in qHostInfo remote packet responses and on the lldb host side. Tested with ubuntu and fedora (the latter both with the default of not having lsb_release installed, and with having lsb_release installed via the redhat-lsb package).
Examples of triples on Linux after this change:
- x86_64 Unbuntu 12.04 LTS: x86_64-ubuntu-linux-gnu
- x86_64 Fedora 20 Desktop with redhat-lsb package installed x86_64-fedora-linux-gnu
- x86_64 Fedora 20 Desktop without redhat-lsb-core installed
- (i.e. no /bin/lsb_release available)
- same as before the change x86_64--linux-gnu
Note I intend to have Android respond with:
when I get to implementing Android lldb-gdbserver support.