<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">The straightforward way to do specify a complex command line for debugging is:<div class=""><br class=""></div><div class="">lldb —arch=x86_64 — /bin/ls -IAF</div><div class=""><br class=""></div><div class="">everything after the — are arguments to the program.  This also allows you to cut & paste whole command lines.  It works by the trick that if you haven’t specified a file before the — then the first of these arguments will be the file.  The other way, where you supply the file in among the arguments was to accommodate the ordinary lldb usage in the case where you do something like:</div><div class=""><br class=""></div><div class="">lldb /bin/ls —arch=x86_64 — oops I forgot I wanted to add arguments</div><div class=""><br class=""></div><div class="">I don’t find either of these particularly confusing, the “—“ is used all over in unix & lldb, so that seems pretty straightforward, and I don’t think adding extra levels of quoting around the command line is going to make this any easier.</div><div class=""><br class=""></div><div class="">Jim</div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 29, 2016, at 10:52 AM, Zachary Turner via lldb-commits <<a href="mailto:lldb-commits@lists.llvm.org" class="">lldb-commits@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">long and short options are supported, but the one I'm not sure about is the case where you use a short option with no space.  Your example "-ax86_64" might not work.  It might, just that it should be tested.  I'm 99% confident the rest of them all work.<div class=""><br class=""></div><div class="">Also not sure about this example: "<span style="line-height:1.5" class="">% lldb /bin/ls --arch=x86_64 -- -lAF"</span></div><div class=""><span style="line-height:1.5" class=""><br class=""></span></div><div class=""><span style="line-height:1.5" class="">If I understand correctly, this runs LLDB with the --arch=x86_64 argument, and specifies the program to debug as "/bin/ls -IAF"?</span></div><div class=""><span style="line-height:1.5" class=""><br class=""></span></div><div class="">Seems like a confusing syntax to me, is there any other way to specify this currently?  like:</div><div class=""><br class=""></div><div class="">% lldb "/bin/ls -IAF" --arch=x86_64</div><div class="">% lldb /bin/ls --arch-x86_64 --args=-IAF</div><div class=""><br class=""></div><div class="">Or something along those lines?</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Mon, Feb 29, 2016 at 10:46 AM Greg Clayton <<a href="mailto:clayborg@gmail.com" class="">clayborg@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">clayborg added a comment.<br class="">
<br class="">
As long as both long and short options are still supported? Can you still type any of:<br class="">
<br class="">
- --arch=x86_64<br class="">
- --arch x86_64<br class="">
- -arch=x86_64<br class="">
- -arch x86_64<br class="">
- -ax86_64<br class="">
- -a x86_64<br class="">
<br class="">
Are we able to track which options can be used with other options with the llvm solution? I didn't look too close. There were bits in the old option definitions which defined with options could be specified with which other options. The other thing that might throw people for a loop is if llvm doesn't support this style:<br class="">
<br class="">
% lldb /bin/ls --arch=x86_64 -- -lAF<br class="">
<br class="">
getopt_long allowed you to have arguments mixed in between the options so the arguments would have bee "/bin/ls" and "-lAF". Options would have been "--arch=x86_64".<br class="">
<br class="">
<br class="">
<a href="http://reviews.llvm.org/D17724" rel="noreferrer" target="_blank" class="">http://reviews.llvm.org/D17724</a><br class="">
<br class="">
<br class="">
<br class="">
</blockquote></div>
_______________________________________________<br class="">lldb-commits mailing list<br class=""><a href="mailto:lldb-commits@lists.llvm.org" class="">lldb-commits@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits<br class=""></div></blockquote></div><br class=""></div></body></html>