a shell would interpret it. A few examples that we now handle correctly
INPUT: "Hello "world
OUTPUT: "Hello World"
INPUT: "Hello "' World'
OUTPUT: "Hello World"
INPUT: Hello" World"
OUTPUT: "Hello World"
This broke the setting of dictionary values for the "settings set" command
for things like:
(lldb) settings set target.process.env-vars ["MY_ENV_VAR"]=YES
since we would drop the quotes. I fixed the user settings controller to use
a regular expression so it can accept any of the following inputs for
dictionary setting:
settings set target.process.env-vars ["MY_ENV_VAR"]=YES
settings set target.process.env-vars [MY_ENV_VAR]=YES
settings set target.process.env-vars MY_ENV_VAR=YES
We might want to eventually drop the first two syntaxes, but I won't make
that decision right now.
This allows more natural setting of the envirorment variables:
settings set target.process.env-vars MY_ENV_VAR=YES ABC=DEF CWD=/tmp
llvm-svn: 122166
- Added new utility function to Arg, GetQuotedCommandString, which re-assembles
the args into a string, replacing quotes that were originally there.
- Modified user settings stuff to always show individual elements when printing out
arrays and dictionaries.
- Added more extensive help to 'settings set', explaining more about dictionaries
and arrays (including current dictionary syntax).
- Fixed bug in user settings where quotes were being stripped and lost, so that
sometimes array or dictionary elements that ought to have been a single element
were being split up.
llvm-svn: 121438
not the command should take raw input, then handle & dispatch the arguments appropriately.
Also change the 'alias' command to be a command that takes raw input. This is necessary to
allow aliases to be created for other commands that take raw input and might want to include
raw input in the alias itself.
Fix a bug in the aliasing mechanism when creating aliases for commands with 3-or-more words.
Raw input should now be properly handled by all the command and alias mechanisms.
llvm-svn: 121423
- Add logging for command resolution ('log enable lldb commands')
- Fix alias resolution to properly handle commands that take raw input (resolve the alias, but
don't muck up the raw arguments).
Net result: Among other things, 'expr' command can now take strings with escaped characters and
not have the command handling & alias resolution code muck up the escaped characters. E.g.
'expr printf ("\n\n\tHello there!")' should now work properly.
Not working yet: Creating aliases with raw input for commands that take raw input. Working on that.
e.g. 'command alias print_hi expr printf ("\n\tHi!")' does not work yet.
llvm-svn: 121171
enabled LLVM make style building and made this compile LLDB on Mac OS X. We
can now iterate on this to make the build work on both linux and macosx.
llvm-svn: 108009