[lldb-dev] How to set argument -Xxm100M for an executable?
yin at affinic.com
Mon Oct 7 16:03:03 PDT 2013
Since there is no way to work around –Xxm100M problem, I know we can define
our own command. I am wondering if it is possible to expend set command in llvm
by importing a python file, like set args xxx, it will call my python function
to use API to do the job? If yes, could you provide me a simple example about how
to do this?
From: Enrico Granata [mailto:egranata at apple.com]
Sent: Monday, October 07, 2013 2:55 PM
To: Yin Ma
Subject: Re: [lldb-dev] How to set argument -Xxm100M for an executable?
On Oct 7, 2013, at 2:27 PM, Yin Ma <yin at affinic.com> wrote:
To set up a run argument, based on the document, it should be
Settings set target.run-args , like gdb set args
However, no matter how, I cannot set my argument to –Xxm100M
Settings set target.run-args –Xxm100M
Lldb: invalid option – X
I also tried
Settings set target.run-args “-Xxm100M”
Unfortunately you seem to be right. The only way I have been able to make this work is by saying:
(lldb) sett set target.run-args -- --Xxm100M
Process 5112 launched: '/private/tmp/args' (x86_64)
argv = args
argv = --
argv = --Xxm100M
but as you can see, this causes a spurious - - (double dash) to be passed down to your inferior process
Seems worth of a bugzilla to me. With that said, while I have not tried it, I am kinda optimistic that SBLaunchInfo (the API class) would not be subject to the same bug, since this is more of a command-line issue than anything
Could somebody let me know how to correctly set an argument.
On gdb, if we run
This means no argument
However, under lldb
Settings set target.run-args
It will report an error
Is this a good behavior?
In LLDB, you would say
(lldb) sett set target.run-args ""
Since our settings set command is meant to set any kind of setting, it makes sense that we ask for an argument. If we were to allow setting set <foo> <end of command>, we would probably need a way to know which is the “default value” for any specific setting. Feel free to file an ER bugzilla for that too
lldb-dev mailing list
<mailto:lldb-dev at cs.uiuc.edu> lldb-dev at cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the lldb-dev