<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Dec 7, 2018, at 8:10 AM, Zachary Turner via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" class="">lldb-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">“Unknown” is a perfectly fine value for the os though, and I’m not suggesting to change that.<br class=""><br class="">My point is simply that Jason’s situation (baremetal) is one that is not even expressible by the Triple syntax. As long as there’s some enum value that describes the situation (of which unknown is a valid choice), the problem goes away.<br class=""></div></blockquote><div><br class=""></div>We current use a "specified unknown" (where enum and string are unknown) to mean "none", which is what we use to say specify bare metal (no OS). I am happy to change that though. If we change this, then a few people's workflows might have to change where they used to say "armv7-apple-unknown" to "armv7-apple-none". Not a big deal since not many people are using LLDB for bare board debugging right now, but something we will need to document.</div><div><br class=""></div><div>Greg</div><div><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class=""><div class="gmail_quote"><div dir="ltr" class="">On Fri, Dec 7, 2018 at 8:06 AM <<a href="mailto:ted.woodward@codeaurora.org" class="">ted.woodward@codeaurora.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple" class=""><div class="m_-7281115728987606888WordSection1"><p class="MsoNormal">We use 2 triples for Hexagon:<u class=""></u><u class=""></u></p><p class="MsoNormal">hexagon-unknown-elf (which becomes hexagon-unknown-unknown-elf internally), and hexagon-unknown-linux.<u class=""></u><u class=""></u></p><p class="MsoNormal"><u class=""></u> <u class=""></u></p><p class="MsoNormal">We follow the Linux standard and add in magic to the elf to identify it as a Linux binary. But in the hexagon-unknown-elf case we have no way to distinguish between standalone (no OS, running on our simulator) or QuRT (proprietary OS, could be running on hardware or simulator). In fact, the same shared library that has no OS calls (just standard library calls that go into the appropriate .so) could run under either one.<u class=""></u><u class=""></u></p><p class="MsoNormal"><u class=""></u> <u class=""></u></p><p class="MsoNormal">I think requiring a value for every OS would be a non-starter for us.<u class=""></u><u class=""></u></p><p class="MsoNormal"><u class=""></u> <u class=""></u></p><p class="MsoNormal">--<u class=""></u><u class=""></u></p><p class="MsoNormal">Ted Woodward<u class=""></u><u class=""></u></p><p class="MsoNormal">Qualcomm Innovation Center, Inc.<u class=""></u><u class=""></u></p><p class="MsoNormal">Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project<u class=""></u><u class=""></u></p><p class="MsoNormal"><u class=""></u> <u class=""></u></p><p class="MsoNormal"><b class="">From:</b> lldb-dev <<a href="mailto:lldb-dev-bounces@lists.llvm.org" target="_blank" class="">lldb-dev-bounces@lists.llvm.org</a>> <b class="">On Behalf Of </b>Zachary Turner via lldb-dev<br class=""><b class="">Sent:</b> Friday, December 7, 2018 4:38 AM<br class=""><b class="">To:</b> Pavel Labath <<a href="mailto:pavel@labath.sk" target="_blank" class="">pavel@labath.sk</a>><br class=""><b class="">Cc:</b> LLDB <<a href="mailto:lldb-dev@lists.llvm.org" target="_blank" class="">lldb-dev@lists.llvm.org</a>><br class=""><b class="">Subject:</b> Re: [lldb-dev] When should ArchSpecs match?<u class=""></u><u class=""></u></p></div></div><div lang="EN-US" link="blue" vlink="purple" class=""><div class="m_-7281115728987606888WordSection1"><p class="MsoNormal"><u class=""></u> <u class=""></u></p><p class="MsoNormal">We can already say that with OSType::Unknown. That’s different than “i know that no OS exists”<u class=""></u><u class=""></u></p><div class=""><div class=""><p class="MsoNormal">On Fri, Dec 7, 2018 at 12:00 AM Pavel Labath <<a href="mailto:pavel@labath.sk" target="_blank" class="">pavel@labath.sk</a>> wrote:<u class=""></u><u class=""></u></p></div><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in" class=""><p class="MsoNormal">On 07/12/2018 01:22, Jason Molenda via lldb-dev wrote:<br class="">> Oh sorry I missed that. Yes, I think a value added to the OSType for NoOS or something would work. We need to standardize on a textual representation for this in a triple string as well, like 'none'. Then with arm64-- and arm64-*-* as UnknownVendor + UnknownOS we can have these marked as "compatible" with any other value in the case Adrian is looking at.<br class="">> <br class="">> <br class=""><br class="">Sounds good to me.<br class=""><br class="">As another data point, it is usually impossible to tell from looking at <br class="">an ELF file which os it is intended to run on. You can tell the <br class="">architecture because it's right in the elf header, but that's about it. <br class="">Some OSs get around this by adding a special section like <br class="">.this.is.an.android.binary, but not all of them. So in general, we need <br class="">to be able to say "I have no idea which OS is this binary intended for".<br class=""><br class="">pl<u class=""></u><u class=""></u></p></blockquote></div></div></div></blockquote></div>
_______________________________________________<br class="">lldb-dev mailing list<br class=""><a href="mailto:lldb-dev@lists.llvm.org" class="">lldb-dev@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev<br class=""></div></blockquote></div><br class=""></body></html>