[lldb-dev] host setting?

Greg Clayton gclayton at apple.com
Tue Aug 19 15:12:28 PDT 2014


and an import os...

script import sys; import os; sys.path[:0] = [os.path.expanduser('~')]; import binutils
command script add -f binutils.itob itob
command script add -f binutils.utob utob

To avoid this though, you should really use "command script import" which will add the path to the file to the python path if it is needed and import the module for you:

command script import ~/binutils.py
command script add -f binutils.itob itob
command script add -f binutils.utob utob


> On Aug 19, 2014, at 3:10 PM, Greg Clayton <gclayton at apple.com> wrote:
> 
> Looks like you missed an "import sys"
> 
> script import sys; sys.path[:0] = [os.path.expanduser('~')]; import binutils
> command script add -f binutils.itob itob
> command script add -f binutils.utob utob
> 
>> On Aug 18, 2014, at 12:58 PM, Jared Carlson <jared.carlson23 at gmail.com> wrote:
>> 
>> I’m running on OS X, but I’m confused, I can give it a script right?  So in this case if I do:
>> 
>> lldb <scriptname> it should load LLDB without a target but by adding any environment or other scripting variables right?  So I know I can use an .lldbinit such as: 
>> 
>> # So that ~/binutils.py takes precedence.
>> script sys.path[:0] = [os.path.expanduser('~')]
>> script import binutils
>> command script add -f binutils.itob itob
>> command script add -f binutils.utob utob
>> 
>> 
>> But I thought I could feed LLDB a script as the arg as well, no??
>> 
>> - Jared
>> 
>> 
>> 
>> On Aug 18, 2014, at 3:54 PM, Todd Fiala <tfiala at google.com> wrote:
>> 
>>> What kind of OS are you running on?  On several of our platforms, if you specify a directory rather than an exe (and it doesn't happen to be a MacOSX .app or some kind of special bundle), it will give you that message.
>>> 
>>> 
>>> On Mon, Aug 18, 2014 at 12:51 PM, Jared Carlson <jared.carlson23 at gmail.com> wrote:
>>> Afternoon,
>>> 
>>> When I try to set up lldb to run via a script, I get an error: “doesn’t contain any ‘host’ platform architectures: x86_64, i386”
>>> 
>>> I’m wondering what this means and where I can find more information about it?  Thanks!
>>> 
>>> - Jared
>>> 
>>> 
>>> _______________________________________________
>>> lldb-dev mailing list
>>> lldb-dev at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
>>> 
>>> 
>>> 
>>> 
>>> -- 
>>> Todd Fiala |	 Software Engineer |	 tfiala at google.com |	 650-943-3180
>>> 
>> 
>> _______________________________________________
>> 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