[lldb-dev] LLDB sets process arch to *-apple-macosx in doubt
Greg Clayton
gclayton at apple.com
Wed Sep 4 09:58:34 PDT 2013
On Sep 3, 2013, at 7:02 PM, Félix Cloutier <felixcca at yahoo.ca> wrote:
> Heh, just as I was done porting my disassembler over. :)
>
> Do I need to do anything about the target triple, or will it be happy simply to see the PowerPC part?
I believe it will be happy with any vendor and os.
>
> Félix
>
> Le 2013-09-03 à 12:42:18, Greg Clayton <gclayton at apple.com> a écrit :
>
>> I don't believe we enable the PowerPC targets in LLDB. You will need to add it in the following file:
>>
>> http://llvm.org/svn/llvm-project/lldb/trunk/scripts/build-llvm.pl
>>
>> I think the only line you will need to change is:
>>
>> my $lldb_configuration_options = "--enable-targets=x86_64,arm $common_configure_options $llvm_config_href->{configure_options}";
>>
>> Note only "x86_64" and "arm" targets are enabled.
>>
>> This should be enough to compile in PowerPC support.
>>
>> Greg
>>
>>
>> On Aug 30, 2013, at 9:00 PM, Félix Cloutier <felixcca at yahoo.ca> wrote:
>>
>>> Hello again,
>>>
>>> LLDB says I need a disassembler plugin to get disassembly. Since PowerPC is a supported LLVM target, I figured DisassemblerLLVMC would do it for me. However, it turns out that LLDB thinks I'm a powerpc-apple-macosx target, even though I'm not pretending that (I'm saying I'm a powerpc-unknown-unknown); and LLVM won't produce a Target for that triple.
>>>
>>> This seems to happen because GDBRemoteCommunicationClient::GetCurrentProcessInfo() will eventually do `m_process_arch.SetArchitecture(eArchTypeMachO, cpu, sub)`, and ArchSpec will set the OS to Mac OS X and the vendor to Apple if it sees that the arch type is Mach-O. Interestingly, m_host_arch stays untouched.
>>>
>>> I suppose the triple is kind of a big deal to get the right plugins, but I already have an ABI plugin and I wouldn't really mind throwing in the disassembler I already have, and I'm not sure which other plugins I'll find myself missing.
>>>
>>> What's the suggested course of action? Fix the process triple and hope LLVM likes powerpc-unknown-unknown better? Bring in my disassembler? Fix the process triple and bring in my disassembler anyways?
>>>
>>> Félix
>>> _______________________________________________
>>> lldb-dev mailing list
>>> lldb-dev at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
>>
>
More information about the lldb-dev
mailing list