summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/Args.cpp
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2012-01-19 19:22:41 +0000
committerJohnny Chen <johnny.chen@apple.com>2012-01-19 19:22:41 +0000
commita28b89c700c5ec42efbf91b6294555a05e33c742 (patch)
tree797c122494eb35047377905c5aafb832f86e6aa4 /lldb/source/Interpreter/Args.cpp
parent8ee108bf98844d86dc856b636294044b8b8d0873 (diff)
downloadbcm5719-llvm-a28b89c700c5ec42efbf91b6294555a05e33c742.tar.gz
bcm5719-llvm-a28b89c700c5ec42efbf91b6294555a05e33c742.zip
rdar://problem/10712130
Fixed an issue where backtick char is not properly honored when setting the frame-format variable, like the following: (lldb) settings set frame-format frame #${frame.index}: ${frame.pc}{ ${module.file.basename}{`${function.name-with-args}${function.pc-offset}}}{ at ${line.file.basename}:${line.number}}\n (lldb) settings show frame-format frame-format (string) = "frame #${frame.index}: ${frame.pc}{ `${module.file.basename}{${function.name-with-args}${function.pc-offset}}}{` at ${line.file.basename}:${line.number}}\n" (lldb) o CommandObjectSettings.h/.cpp: Modify the command object impl to require raw command string instead of parsed command string, which also fixes an outstanding issue that customizing the prompt with trailing spaces doesn't work. o Args.cpp: During CommandInterpreter::HandleCommand(), there is a PreprocessCommand phase which already strips/processes pairs of backticks as an expression eval step. There's no need to treat a backtick as starting a quote. o TestAbbreviations.py and change_prompt.lldb: Fixed incorrect test case/logic. o TestSettings.py: Remove expectedFailure decorator. llvm-svn: 148491
Diffstat (limited to 'lldb/source/Interpreter/Args.cpp')
-rw-r--r--lldb/source/Interpreter/Args.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/lldb/source/Interpreter/Args.cpp b/lldb/source/Interpreter/Args.cpp
index f32b25c9127..dfd01ee1565 100644
--- a/lldb/source/Interpreter/Args.cpp
+++ b/lldb/source/Interpreter/Args.cpp
@@ -168,7 +168,7 @@ Args::SetCommandString (const char *command)
if (command && command[0])
{
static const char *k_space_separators = " \t";
- static const char *k_space_separators_with_slash_and_quotes = " \t \\'\"`";
+ static const char *k_space_separators_with_slash_and_quotes = " \t \\'\"";
const char *arg_end = NULL;
const char *arg_pos;
for (arg_pos = command;
@@ -280,10 +280,7 @@ Args::SetCommandString (const char *command)
first_quote_char = quote_char;
arg_pos = arg_end;
-
- if (quote_char != '`')
- ++arg_pos; // Skip the quote character if it is not a backtick
-
+ ++arg_pos; // Skip the quote character
arg_piece_start = arg_pos; // Note we are starting from later in the string
// Skip till the next quote character
@@ -298,13 +295,7 @@ Args::SetCommandString (const char *command)
if (end_quote)
{
if (end_quote > arg_piece_start)
- {
- // Keep the backtick quote on commands
- if (quote_char == '`')
- arg.append (arg_piece_start, end_quote + 1 - arg_piece_start);
- else
- arg.append (arg_piece_start, end_quote - arg_piece_start);
- }
+ arg.append (arg_piece_start, end_quote - arg_piece_start);
// If the next character is a space or the end of
// string, this argument is complete...
OpenPOWER on IntegriCloud