[lldb-dev] host setting?

Ted Woodward ted.woodward at codeaurora.org
Tue Aug 19 14:17:22 PDT 2014


You can tell lldb to run a script with -s, or a one line command with -o.

 

I have a wrapper script around lldb that does two things:

-          Set PYTHONHOME to point to a python we're distributing; python
installs on different linuxes vary, and python will do anything from issue a
warning to crash if the python linked into lldb and the python modules don't
match

-          Load a script with target specific commands (such as "run a
simulator, connect with gdb-remote, set a breakpoint at main and continue"
or "get tlb info")

 

#!/bin/sh

DIR=$(dirname $0)

export PYTHONHOME=$DIR/..

export HEXAGON_LLDB_HOME=$DIR/

exec $DIR/hexagon-lldb-3.5.0 -o "command script import
$DIR/hexagon_utils.py" $*

 

Ted

 

From: lldb-dev-bounces at cs.uiuc.edu [mailto:lldb-dev-bounces at cs.uiuc.edu] On
Behalf Of Jared Carlson
Sent: Monday, August 18, 2014 2:58 PM
To: Todd Fiala
Cc: lldb-dev at cs.uiuc.edu
Subject: Re: [lldb-dev] host setting?

 

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 |

  <mailto:tfiala at google.com> tfiala at google.com |

 650-943-3180

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20140819/43528d66/attachment.html>


More information about the lldb-dev mailing list