<div dir="ltr">Hi Ilia,<div><br></div>This CL cause 2 new failure on the Linux build bots (<a href="http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/2414">http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/2414</a>). Please fix them if it is a trivial or XFAIL them to get the bot green again.<div><br></div><div>Thanks</div><div>Tamas</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 15, 2015 at 10:46 AM, Ilia K <span dir="ltr"><<a href="mailto:ki.stfu@gmail.com" target="_blank">ki.stfu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: ki.stfu<br>
Date: Fri May 15 04:46:28 2015<br>
New Revision: 237429<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=237429&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=237429&view=rev</a><br>
Log:<br>
Fix parsing of print-values arg (MI)<br>
<br>
# Add CMICmdArgValPrintValues argument<br>
# Rework -stack-list-arguments/-stack-list-locals/-stack-list-variables/-var-update/-var-list-children<br>
commands to use the CMICmdArgValPrintValues argument instead of usage of pair of non-mandatory<br>
arguments like: CMICmdArgValNumber(0) || CMICmdArgValLongOptions("no-values")<br>
<br>
<br>
Added:<br>
lldb/trunk/tools/lldb-mi/MICmdArgValPrintValues.cpp<br>
lldb/trunk/tools/lldb-mi/MICmdArgValPrintValues.h<br>
Modified:<br>
lldb/trunk/test/tools/lldb-mi/stack/TestMiStack.py<br>
lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py<br>
lldb/trunk/tools/lldb-mi/CMakeLists.txt<br>
lldb/trunk/tools/lldb-mi/MICmdCmdStack.cpp<br>
lldb/trunk/tools/lldb-mi/MICmdCmdStack.h<br>
lldb/trunk/tools/lldb-mi/MICmdCmdVar.cpp<br>
lldb/trunk/tools/lldb-mi/MICmdCmdVar.h<br>
<br>
Modified: lldb/trunk/test/tools/lldb-mi/stack/TestMiStack.py<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/stack/TestMiStack.py?rev=237429&r1=237428&r2=237429&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/stack/TestMiStack.py?rev=237429&r1=237428&r2=237429&view=diff</a><br>
==============================================================================<br>
--- lldb/trunk/test/tools/lldb-mi/stack/TestMiStack.py (original)<br>
+++ lldb/trunk/test/tools/lldb-mi/stack/TestMiStack.py Fri May 15 04:46:28 2015<br>
@@ -43,16 +43,14 @@ class MiStackTestCase(lldbmi_testcase.Mi<br>
# Test that -stack-list-arguments lists stack arguments with all values<br>
self.runCmd("-stack-list-arguments 1 0 0")<br>
self.expect("\^done,stack-args=\[frame={level=\"0\",args=\[{name=\"argc\",value=\"1\"},{name=\"argv\",value=\".*\"}\]}\]")<br>
- # FIXME: first 0 is treated as --no-values<br>
self.runCmd("-stack-list-arguments --all-values 0 0")<br>
- #self.expect("\^done,stack-args=\[frame={level=\"0\",args=\[{name=\"argc\",value=\"1\"},{name=\"argv\",value=\".*\"}\]}\]")<br>
+ self.expect("\^done,stack-args=\[frame={level=\"0\",args=\[{name=\"argc\",value=\"1\"},{name=\"argv\",value=\".*\"}\]}\]")<br>
<br>
# Test that -stack-list-arguments lists stack arguments with simple values<br>
self.runCmd("-stack-list-arguments 2 0 1")<br>
self.expect("\^done,stack-args=\[frame={level=\"0\",args=\[{name=\"argc\",value=\"1\"},{name=\"argv\",value=\".*\"}\]}")<br>
- # FIXME: first 0 is treated as --no-values<br>
self.runCmd("-stack-list-arguments --simple-values 0 1")<br>
- #self.expect("\^done,stack-args=\[frame={level=\"0\",args=\[{name=\"argc\",value=\"1\"},{name=\"argv\",value=\".*\"}\]}")<br>
+ self.expect("\^done,stack-args=\[frame={level=\"0\",args=\[{name=\"argc\",value=\"1\"},{name=\"argv\",value=\".*\"}\]}")<br>
<br>
# Test that an invalid low-frame is handled<br>
# FIXME: -1 is treated as unsigned int<br>
<br>
Modified: lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py?rev=237429&r1=237428&r2=237429&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py?rev=237429&r1=237428&r2=237429&view=diff</a><br>
==============================================================================<br>
--- lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py (original)<br>
+++ lldb/trunk/test/tools/lldb-mi/variable/TestMiVar.py Fri May 15 04:46:28 2015<br>
@@ -254,12 +254,12 @@ class MiVarTestCase(lldbmi_testcase.MiTe<br>
self.expect("\^done,name=\"var_complx_array\",numchild=\"2\",value=\"\[2\]\",type=\"complex_type \[2\]\",thread-id=\"1\",has_more=\"0\"")<br>
<br>
# Test that -var-list-children lists empty children if range is empty<br>
- # FIXME (and that print-values is optional)<br>
- self.runCmd("-var-list-children 0 var_complx 0 0")<br>
+ # (and that print-values is optional)<br>
+ self.runCmd("-var-list-children var_complx 0 0")<br>
self.expect("\^done,numchild=\"0\",has_more=\"1\"")<br>
- self.runCmd("-var-list-children 0 var_complx 99 0")<br>
+ self.runCmd("-var-list-children var_complx 99 0")<br>
self.expect("\^done,numchild=\"0\",has_more=\"1\"")<br>
- self.runCmd("-var-list-children 0 var_complx 99 3")<br>
+ self.runCmd("-var-list-children var_complx 99 3")<br>
self.expect("\^done,numchild=\"0\",has_more=\"0\"")<br>
<br>
# Test that -var-list-children lists all children with their values<br>
@@ -272,39 +272,32 @@ class MiVarTestCase(lldbmi_testcase.MiTe<br>
# Test that -var-list-children lists children without values<br>
self.runCmd("-var-list-children 0 var_complx 0 1")<br>
self.expect("\^done,numchild=\"1\",children=\[child=\{name=\"var_complx\.i\",exp=\"i\",numchild=\"0\",type=\"int\",thread-id=\"1\",has_more=\"0\"\}\],has_more=\"1\"")<br>
- # FIXME: first 0 is treated as --no-values<br>
self.runCmd("-var-list-children --no-values var_complx 0 1")<br>
- # self.expect("\^done,numchild=\"1\",children=\[child=\{name=\"var_complx\.i\",exp=\"i\",numchild=\"0\",type=\"int\",thread-id=\"1\",has_more=\"0\"\}\],has_more=\"1\"")<br>
+ self.expect("\^done,numchild=\"1\",children=\[child=\{name=\"var_complx\.i\",exp=\"i\",numchild=\"0\",type=\"int\",thread-id=\"1\",has_more=\"0\"\}\],has_more=\"1\"")<br>
<br>
# Test that -var-list-children lists children with all values<br>
self.runCmd("-var-list-children 1 var_complx 1 2")<br>
self.expect("\^done,numchild=\"1\",children=\[child=\{name=\"var_complx\.inner\",exp=\"inner\",numchild=\"1\",type=\"complex_type::\(anonymous struct\)\",thread-id=\"1\",value=\"\{\.\.\.\}\",has_more=\"0\"\}\],has_more=\"1\"")<br>
- # FIXME: first 1 is treated as --all-values<br>
self.runCmd("-var-list-children --all-values var_complx 1 2")<br>
- # self.expect("\^done,numchild=\"1\",children=\[child=\{name=\"var_complx\.inner\",exp=\"inner\",numchild=\"1\",type=\"complex_type::\(anonymous struct\)\",thread-id=\"1\",value=\"\{\.\.\.\}\",has_more=\"0\"\}\],has_more=\"1\"")<br>
+ self.expect("\^done,numchild=\"1\",children=\[child=\{name=\"var_complx\.inner\",exp=\"inner\",numchild=\"1\",type=\"complex_type::\(anonymous struct\)\",thread-id=\"1\",value=\"\{\.\.\.\}\",has_more=\"0\"\}\],has_more=\"1\"")<br>
<br>
# Test that -var-list-children lists children with simple values<br>
self.runCmd("-var-list-children 2 var_complx 2 4")<br>
self.expect("\^done,numchild=\"1\",children=\[child=\{name=\"var_complx\.complex_ptr\",exp=\"complex_ptr\",numchild=\"3\",type=\"complex_type \*\",thread-id=\"1\",has_more=\"0\"\}\],has_more=\"0\"")<br>
- # FIXME: first 2 is treated as --simple-values<br>
self.runCmd("-var-list-children --simple-values var_complx 2 4")<br>
- # self.expect("\^done,numchild=\"1\",children=\[child=\{name=\"var_complx\.complex_ptr\",exp=\"complex_ptr\",numchild=\"3\",type=\"complex_type \*\",thread-id=\"1\",has_more=\"0\"\}\],has_more=\"0\"")<br>
+ self.expect("\^done,numchild=\"1\",children=\[child=\{name=\"var_complx\.complex_ptr\",exp=\"complex_ptr\",numchild=\"3\",type=\"complex_type \*\",thread-id=\"1\",has_more=\"0\"\}\],has_more=\"0\"")<br>
<br>
# Test that an invalid from is handled<br>
- # FIXME: first 0 is treated as --no-values<br>
# FIXME: -1 is treated as unsigned int<br>
self.runCmd("-var-list-children 0 var_complx -1 0")<br>
#self.expect("\^error,msg=\"Command 'var-list-children'\. Variable children range invalid\"")<br>
<br>
# Test that an invalid to is handled<br>
- # FIXME: first 0 is treated as --no-values<br>
# FIXME: -1 is treated as unsigned int<br>
self.runCmd("-var-list-children 0 var_complx 0 -1")<br>
#self.expect("\^error,msg=\"Command 'var-list-children'\. Variable children range invalid\"")<br>
<br>
# Test that a missing low-frame or high-frame is handled<br>
- # FIXME: first 0 is treated as --no-values<br>
- # FIXME: -1 is treated as unsigned int<br>
self.runCmd("-var-list-children 0 var_complx 0")<br>
self.expect("\^error,msg=\"Command 'var-list-children'. Variable children range invalid\"")<br>
<br>
<br>
Modified: lldb/trunk/tools/lldb-mi/CMakeLists.txt<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/CMakeLists.txt?rev=237429&r1=237428&r2=237429&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/CMakeLists.txt?rev=237429&r1=237428&r2=237429&view=diff</a><br>
==============================================================================<br>
--- lldb/trunk/tools/lldb-mi/CMakeLists.txt (original)<br>
+++ lldb/trunk/tools/lldb-mi/CMakeLists.txt Fri May 15 04:46:28 2015<br>
@@ -11,6 +11,7 @@ set(LLDB_MI_SOURCES<br>
MICmdArgValNumber.cpp<br>
MICmdArgValOptionLong.cpp<br>
MICmdArgValOptionShort.cpp<br>
+ MICmdArgValPrintValues.cpp<br>
MICmdArgValString.cpp<br>
MICmdArgValThreadGrp.cpp<br>
MICmdBase.cpp<br>
<br>
Added: lldb/trunk/tools/lldb-mi/MICmdArgValPrintValues.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdArgValPrintValues.cpp?rev=237429&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdArgValPrintValues.cpp?rev=237429&view=auto</a><br>
==============================================================================<br>
--- lldb/trunk/tools/lldb-mi/MICmdArgValPrintValues.cpp (added)<br>
+++ lldb/trunk/tools/lldb-mi/MICmdArgValPrintValues.cpp Fri May 15 04:46:28 2015<br>
@@ -0,0 +1,129 @@<br>
+//===-- MICmdArgValPrintValues.cpp ------------------------------*- C++ -*-===//<br>
+//<br>
+// The LLVM Compiler Infrastructure<br>
+//<br>
+// This file is distributed under the University of Illinois Open Source<br>
+// License. See LICENSE.TXT for details.<br>
+//<br>
+//===----------------------------------------------------------------------===//<br>
+<br>
+// In-house headers:<br>
+#include "MICmdArgValPrintValues.h"<br>
+#include "MICmdArgContext.h"<br>
+<br>
+//++ ------------------------------------------------------------------------------------<br>
+// Details: CMICmdArgValPrintValues constructor.<br>
+// Type: Method.<br>
+// Args: None.<br>
+// Return: None.<br>
+// Throws: None.<br>
+//--<br>
+CMICmdArgValPrintValues::CMICmdArgValPrintValues(void)<br>
+ : m_nPrintValues(0)<br>
+{<br>
+}<br>
+<br>
+//++ ------------------------------------------------------------------------------------<br>
+// Details: CMICmdArgValPrintValues constructor.<br>
+// Type: Method.<br>
+// Args: vrArgName - (R) Argument's name to search by.<br>
+// vbMandatory - (R) True = Yes must be present, false = optional argument.<br>
+// vbHandleByCmd - (R) True = Command processes *this option, false = not handled.<br>
+// Return: None.<br>
+// Throws: None.<br>
+//--<br>
+CMICmdArgValPrintValues::CMICmdArgValPrintValues(const CMIUtilString &vrArgName, const bool vbMandatory, const bool vbHandleByCmd)<br>
+ : CMICmdArgValBaseTemplate(vrArgName, vbMandatory, vbHandleByCmd)<br>
+ , m_nPrintValues(0)<br>
+{<br>
+}<br>
+<br>
+//++ ------------------------------------------------------------------------------------<br>
+// Details: CMICmdArgValPrintValues destructor.<br>
+// Type: Overridden.<br>
+// Args: None.<br>
+// Return: None.<br>
+// Throws: None.<br>
+//--<br>
+CMICmdArgValPrintValues::~CMICmdArgValPrintValues(void)<br>
+{<br>
+}<br>
+<br>
+//++ ------------------------------------------------------------------------------------<br>
+// Details: Parse the command's argument options string and try to extract the value *this<br>
+// argument is looking for.<br>
+// Type: Overridden.<br>
+// Args: vwArgContext - (RW) The command's argument options string.<br>
+// Return: MIstatus::success - Functional succeeded.<br>
+// MIstatus::failure - Functional failed.<br>
+// Throws: None.<br>
+//--<br>
+bool<br>
+CMICmdArgValPrintValues::Validate(CMICmdArgContext &vwArgContext)<br>
+{<br>
+ if (vwArgContext.IsEmpty())<br>
+ return MIstatus::success;<br>
+<br>
+ const CMIUtilString &rArg(vwArgContext.GetArgs()[0]);<br>
+ if (IsArgPrintValues(rArg) && ExtractPrintValues(rArg))<br>
+ {<br>
+ m_bFound = true;<br>
+ m_bValid = true;<br>
+ m_argValue = GetPrintValues();<br>
+ vwArgContext.RemoveArg(rArg);<br>
+ return MIstatus::success;<br>
+ }<br>
+<br>
+ return MIstatus::failure;<br>
+}<br>
+<br>
+//++ ------------------------------------------------------------------------------------<br>
+// Details: Examine the string and determine if it is a valid string type argument.<br>
+// Type: Method.<br>
+// Args: vrTxt - (R) Some text.<br>
+// Return: bool - True = yes valid arg, false = no.<br>
+// Throws: None.<br>
+//--<br>
+bool<br>
+CMICmdArgValPrintValues::IsArgPrintValues(const CMIUtilString &vrTxt) const<br>
+{<br>
+ return (CMIUtilString::Compare(vrTxt, "0") || CMIUtilString::Compare(vrTxt, "--no-values") ||<br>
+ CMIUtilString::Compare(vrTxt, "1") || CMIUtilString::Compare(vrTxt, "--all-values") ||<br>
+ CMIUtilString::Compare(vrTxt, "2") || CMIUtilString::Compare(vrTxt, "--simple-values"));<br>
+}<br>
+<br>
+//++ ------------------------------------------------------------------------------------<br>
+// Details: Extract the print-values from the print-values argument.<br>
+// Type: Method.<br>
+// Args: vrTxt - (R) Some text.<br>
+// Return: MIstatus::success - Functional succeeded.<br>
+// MIstatus::failure - Functional failed.<br>
+// Throws: None.<br>
+//--<br>
+bool<br>
+CMICmdArgValPrintValues::ExtractPrintValues(const CMIUtilString &vrTxt)<br>
+{<br>
+ if (CMIUtilString::Compare(vrTxt, "0") || CMIUtilString::Compare(vrTxt, "--no-values"))<br>
+ m_nPrintValues = 0;<br>
+ else if (CMIUtilString::Compare(vrTxt, "1") || CMIUtilString::Compare(vrTxt, "--all-values"))<br>
+ m_nPrintValues = 1;<br>
+ else if (CMIUtilString::Compare(vrTxt, "2") || CMIUtilString::Compare(vrTxt, "--simple-values"))<br>
+ m_nPrintValues = 2;<br>
+ else<br>
+ return MIstatus::failure;<br>
+<br>
+ return MIstatus::success;<br>
+}<br>
+<br>
+//++ ------------------------------------------------------------------------------------<br>
+// Details: Retrieve the print-values found in the argument.<br>
+// Type: Method.<br>
+// Args: None.<br>
+// Return: MIuint - The print-values.<br>
+// Throws: None.<br>
+//--<br>
+MIuint<br>
+CMICmdArgValPrintValues::GetPrintValues(void) const<br>
+{<br>
+ return m_nPrintValues;<br>
+}<br>
<br>
Added: lldb/trunk/tools/lldb-mi/MICmdArgValPrintValues.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdArgValPrintValues.h?rev=237429&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdArgValPrintValues.h?rev=237429&view=auto</a><br>
==============================================================================<br>
--- lldb/trunk/tools/lldb-mi/MICmdArgValPrintValues.h (added)<br>
+++ lldb/trunk/tools/lldb-mi/MICmdArgValPrintValues.h Fri May 15 04:46:28 2015<br>
@@ -0,0 +1,53 @@<br>
+//===-- MICmdArgValPrintValues.h --------------------------------*- C++ -*-===//<br>
+//<br>
+// The LLVM Compiler Infrastructure<br>
+//<br>
+// This file is distributed under the University of Illinois Open Source<br>
+// License. See LICENSE.TXT for details.<br>
+//<br>
+//===----------------------------------------------------------------------===//<br>
+<br>
+#pragma once<br>
+<br>
+// In-house headers:<br>
+#include "MICmdArgValBase.h"<br>
+<br>
+// Declarations:<br>
+class CMICmdArgContext;<br>
+<br>
+//++ ============================================================================<br>
+// Details: MI common code class. Command argument class. Arguments object<br>
+// needing specialization derived from the CMICmdArgValBase class.<br>
+// An argument knows what type of argument it is and how it is to<br>
+// interpret the options (context) string to find and validate a matching<br>
+// argument and so extract a value from it. The print-values looks like:<br>
+// 0 or --no-values<br>
+// 1 or --all-values<br>
+// 2 or --simple-values<br>
+// Based on the Interpreter pattern.<br>
+//--<br>
+class CMICmdArgValPrintValues : public CMICmdArgValBaseTemplate<MIuint><br>
+{<br>
+ // Methods:<br>
+ public:<br>
+ /* ctor */ CMICmdArgValPrintValues(void);<br>
+ /* ctor */ CMICmdArgValPrintValues(const CMIUtilString &vrArgName, const bool vbMandatory, const bool vbHandleByCmd);<br>
+ //<br>
+ bool IsArgPrintValues(const CMIUtilString &vrTxt) const;<br>
+<br>
+ // Overridden:<br>
+ public:<br>
+ // From CMICmdArgValBase<br>
+ /* dtor */ virtual ~CMICmdArgValPrintValues(void);<br>
+ // From CMICmdArgSet::IArg<br>
+ virtual bool Validate(CMICmdArgContext &vArgContext);<br>
+<br>
+ // Methods:<br>
+ private:<br>
+ bool ExtractPrintValues(const CMIUtilString &vrTxt);<br>
+ MIuint GetPrintValues(void) const;<br>
+<br>
+ // Attributes:<br>
+ private:<br>
+ MIuint m_nPrintValues;<br>
+};<br>
<br>
Modified: lldb/trunk/tools/lldb-mi/MICmdCmdStack.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdStack.cpp?rev=237429&r1=237428&r2=237429&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdStack.cpp?rev=237429&r1=237428&r2=237429&view=diff</a><br>
==============================================================================<br>
--- lldb/trunk/tools/lldb-mi/MICmdCmdStack.cpp (original)<br>
+++ lldb/trunk/tools/lldb-mi/MICmdCmdStack.cpp Fri May 15 04:46:28 2015<br>
@@ -29,6 +29,7 @@<br>
#include "MICmdArgValThreadGrp.h"<br>
#include "MICmdArgValOptionLong.h"<br>
#include "MICmdArgValOptionShort.h"<br>
+#include "MICmdArgValPrintValues.h"<br>
#include "MICmdArgValListOfN.h"<br>
<br>
//++ ------------------------------------------------------------------------------------<br>
@@ -449,9 +450,6 @@ CMICmdCmdStackListArguments::CMICmdCmdSt<br>
, m_miValueList(true)<br>
, m_constStrArgThread("thread")<br>
, m_constStrArgPrintValues("print-values")<br>
- , m_constStrArgNoValues("no-values")<br>
- , m_constStrArgAllValues("all-values")<br>
- , m_constStrArgSimpleValues("simple-values")<br>
, m_constStrArgFrameLow("low-frame")<br>
, m_constStrArgFrameHigh("high-frame")<br>
{<br>
@@ -487,10 +485,7 @@ CMICmdCmdStackListArguments::ParseArgs(v<br>
{<br>
bool bOk =<br>
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));<br>
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgPrintValues, false, true)));<br>
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgNoValues, false, true)));<br>
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgAllValues, false, true)));<br>
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgSimpleValues, false, true)));<br>
+ bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValPrintValues(m_constStrArgPrintValues, true, true)));<br>
bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgFrameLow, false, true)));<br>
bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgFrameHigh, false, true)));<br>
return (bOk && ParseValidateCmdOptions());<br>
@@ -509,10 +504,7 @@ bool<br>
CMICmdCmdStackListArguments::Execute(void)<br>
{<br>
CMICMDBASE_GETOPTION(pArgThread, OptionLong, m_constStrArgThread);<br>
- CMICMDBASE_GETOPTION(pArgPrintValues, Number, m_constStrArgPrintValues);<br>
- CMICMDBASE_GETOPTION(pArgNoValues, OptionLong, m_constStrArgNoValues);<br>
- CMICMDBASE_GETOPTION(pArgAllValues, OptionLong, m_constStrArgAllValues);<br>
- CMICMDBASE_GETOPTION(pArgSimpleValues, OptionLong, m_constStrArgSimpleValues);<br>
+ CMICMDBASE_GETOPTION(pArgPrintValues, PrintValues, m_constStrArgPrintValues);<br>
CMICMDBASE_GETOPTION(pArgFrameLow, Number, m_constStrArgFrameLow);<br>
CMICMDBASE_GETOPTION(pArgFrameHigh, Number, m_constStrArgFrameHigh);<br>
<br>
@@ -527,28 +519,7 @@ CMICmdCmdStackListArguments::Execute(voi<br>
}<br>
}<br>
<br>
- CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e eVarInfoFormat;<br>
- if (pArgPrintValues->GetFound())<br>
- {<br>
- const MIuint nPrintValues = pArgPrintValues->GetValue();<br>
- if (nPrintValues >= CMICmnLLDBDebugSessionInfo::kNumVariableInfoFormats)<br>
- {<br>
- SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_PRINT_VALUES), m_cmdData.strMiCmd.c_str()));<br>
- return MIstatus::failure;<br>
- }<br>
- eVarInfoFormat = static_cast<CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e>(nPrintValues);<br>
- }<br>
- else if (pArgNoValues->GetFound())<br>
- eVarInfoFormat = CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_NoValues;<br>
- else if (pArgAllValues->GetFound())<br>
- eVarInfoFormat = CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_AllValues;<br>
- else if (pArgSimpleValues->GetFound())<br>
- eVarInfoFormat = CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_SimpleValues;<br>
- else<br>
- {<br>
- SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_PRINT_VALUES), m_cmdData.strMiCmd.c_str()));<br>
- return MIstatus::failure;<br>
- }<br>
+ const CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e eVarInfoFormat = static_cast<CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e>(pArgPrintValues->GetValue());<br>
<br>
MIuint nFrameLow = 0;<br>
MIuint nFrameHigh = UINT32_MAX;<br>
@@ -667,9 +638,6 @@ CMICmdCmdStackListLocals::CMICmdCmdStack<br>
, m_constStrArgThread("thread")<br>
, m_constStrArgFrame("frame")<br>
, m_constStrArgPrintValues("print-values")<br>
- , m_constStrArgNoValues("no-values")<br>
- , m_constStrArgAllValues("all-values")<br>
- , m_constStrArgSimpleValues("simple-values")<br>
{<br>
// Command factory matches this name with that received from the stdin stream<br>
m_strMiCmd = "stack-list-locals";<br>
@@ -705,10 +673,7 @@ CMICmdCmdStackListLocals::ParseArgs(void<br>
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));<br>
bOk = bOk &&<br>
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgFrame, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));<br>
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgPrintValues, false, true)));<br>
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgNoValues, false, true)));<br>
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgAllValues, false, true)));<br>
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgSimpleValues, false, true)));<br>
+ bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValPrintValues(m_constStrArgPrintValues, true, true)));<br>
return (bOk && ParseValidateCmdOptions());<br>
}<br>
<br>
@@ -726,10 +691,7 @@ CMICmdCmdStackListLocals::Execute(void)<br>
{<br>
CMICMDBASE_GETOPTION(pArgThread, OptionLong, m_constStrArgThread);<br>
CMICMDBASE_GETOPTION(pArgFrame, OptionLong, m_constStrArgFrame);<br>
- CMICMDBASE_GETOPTION(pArgPrintValues, Number, m_constStrArgPrintValues);<br>
- CMICMDBASE_GETOPTION(pArgNoValues, OptionLong, m_constStrArgNoValues);<br>
- CMICMDBASE_GETOPTION(pArgAllValues, OptionLong, m_constStrArgAllValues);<br>
- CMICMDBASE_GETOPTION(pArgSimpleValues, OptionLong, m_constStrArgSimpleValues);<br>
+ CMICMDBASE_GETOPTION(pArgPrintValues, PrintValues, m_constStrArgPrintValues);<br>
<br>
// Retrieve the --thread option's thread ID (only 1)<br>
MIuint64 nThreadId = UINT64_MAX;<br>
@@ -752,28 +714,7 @@ CMICmdCmdStackListLocals::Execute(void)<br>
}<br>
}<br>
<br>
- CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e eVarInfoFormat;<br>
- if (pArgPrintValues->GetFound())<br>
- {<br>
- const MIuint nPrintValues = pArgPrintValues->GetValue();<br>
- if (nPrintValues >= CMICmnLLDBDebugSessionInfo::kNumVariableInfoFormats)<br>
- {<br>
- SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_PRINT_VALUES), m_cmdData.strMiCmd.c_str()));<br>
- return MIstatus::failure;<br>
- }<br>
- eVarInfoFormat = static_cast<CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e>(nPrintValues);<br>
- }<br>
- else if (pArgNoValues->GetFound())<br>
- eVarInfoFormat = CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_NoValues;<br>
- else if (pArgAllValues->GetFound())<br>
- eVarInfoFormat = CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_AllValues;<br>
- else if (pArgSimpleValues->GetFound())<br>
- eVarInfoFormat = CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_SimpleValues;<br>
- else<br>
- {<br>
- SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_PRINT_VALUES), m_cmdData.strMiCmd.c_str()));<br>
- return MIstatus::failure;<br>
- }<br>
+ const CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e eVarInfoFormat = static_cast<CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e>(pArgPrintValues->GetValue());<br>
<br>
CMICmnLLDBDebugSessionInfo &rSessionInfo(CMICmnLLDBDebugSessionInfo::Instance());<br>
lldb::SBProcess sbProcess = rSessionInfo.GetProcess();<br>
@@ -862,9 +803,6 @@ CMICmdCmdStackListVariables::CMICmdCmdSt<br>
, m_constStrArgThread("thread")<br>
, m_constStrArgFrame("frame")<br>
, m_constStrArgPrintValues("print-values")<br>
- , m_constStrArgNoValues("no-values")<br>
- , m_constStrArgAllValues("all-values")<br>
- , m_constStrArgSimpleValues("simple-values")<br>
{<br>
// Command factory matches this name with that received from the stdin stream<br>
m_strMiCmd = "stack-list-variables";<br>
@@ -900,10 +838,7 @@ CMICmdCmdStackListVariables::ParseArgs(v<br>
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));<br>
bOk = bOk &&<br>
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgFrame, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));<br>
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgPrintValues, false, true)));<br>
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgNoValues, false, true)));<br>
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgAllValues, false, true)));<br>
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgSimpleValues, false, true)));<br>
+ bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValPrintValues(m_constStrArgPrintValues, true, true)));<br>
return (bOk && ParseValidateCmdOptions());<br>
}<br>
<br>
@@ -921,10 +856,7 @@ CMICmdCmdStackListVariables::Execute(voi<br>
{<br>
CMICMDBASE_GETOPTION(pArgThread, OptionLong, m_constStrArgThread);<br>
CMICMDBASE_GETOPTION(pArgFrame, OptionLong, m_constStrArgFrame);<br>
- CMICMDBASE_GETOPTION(pArgPrintValues, Number, m_constStrArgPrintValues);<br>
- CMICMDBASE_GETOPTION(pArgNoValues, OptionLong, m_constStrArgNoValues);<br>
- CMICMDBASE_GETOPTION(pArgAllValues, OptionLong, m_constStrArgAllValues);<br>
- CMICMDBASE_GETOPTION(pArgSimpleValues, OptionLong, m_constStrArgSimpleValues);<br>
+ CMICMDBASE_GETOPTION(pArgPrintValues, PrintValues, m_constStrArgPrintValues);<br>
<br>
// Retrieve the --thread option's thread ID (only 1)<br>
MIuint64 nThreadId = UINT64_MAX;<br>
@@ -947,28 +879,7 @@ CMICmdCmdStackListVariables::Execute(voi<br>
}<br>
}<br>
<br>
- CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e eVarInfoFormat;<br>
- if (pArgPrintValues->GetFound())<br>
- {<br>
- const MIuint nPrintValues = pArgPrintValues->GetValue();<br>
- if (nPrintValues >= CMICmnLLDBDebugSessionInfo::kNumVariableInfoFormats)<br>
- {<br>
- SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_PRINT_VALUES), m_cmdData.strMiCmd.c_str()));<br>
- return MIstatus::failure;<br>
- }<br>
- eVarInfoFormat = static_cast<CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e>(nPrintValues);<br>
- }<br>
- else if (pArgNoValues->GetFound())<br>
- eVarInfoFormat = CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_NoValues;<br>
- else if (pArgAllValues->GetFound())<br>
- eVarInfoFormat = CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_AllValues;<br>
- else if (pArgSimpleValues->GetFound())<br>
- eVarInfoFormat = CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_SimpleValues;<br>
- else<br>
- {<br>
- SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_PRINT_VALUES), m_cmdData.strMiCmd.c_str()));<br>
- return MIstatus::failure;<br>
- }<br>
+ const CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e eVarInfoFormat = static_cast<CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e>(pArgPrintValues->GetValue());<br>
<br>
CMICmnLLDBDebugSessionInfo &rSessionInfo(CMICmnLLDBDebugSessionInfo::Instance());<br>
lldb::SBProcess sbProcess = rSessionInfo.GetProcess();<br>
<br>
Modified: lldb/trunk/tools/lldb-mi/MICmdCmdStack.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdStack.h?rev=237429&r1=237428&r2=237429&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdStack.h?rev=237429&r1=237428&r2=237429&view=diff</a><br>
==============================================================================<br>
--- lldb/trunk/tools/lldb-mi/MICmdCmdStack.h (original)<br>
+++ lldb/trunk/tools/lldb-mi/MICmdCmdStack.h Fri May 15 04:46:28 2015<br>
@@ -166,9 +166,6 @@ class CMICmdCmdStackListArguments : publ<br>
CMICmnMIValueList m_miValueList;<br>
const CMIUtilString m_constStrArgThread; // Not specified in MI spec but Eclipse gives this option<br>
const CMIUtilString m_constStrArgPrintValues;<br>
- const CMIUtilString m_constStrArgNoValues;<br>
- const CMIUtilString m_constStrArgAllValues;<br>
- const CMIUtilString m_constStrArgSimpleValues;<br>
const CMIUtilString m_constStrArgFrameLow;<br>
const CMIUtilString m_constStrArgFrameHigh;<br>
};<br>
@@ -207,9 +204,6 @@ class CMICmdCmdStackListLocals : public<br>
const CMIUtilString m_constStrArgThread; // Not specified in MI spec but Eclipse gives this option<br>
const CMIUtilString m_constStrArgFrame; // Not specified in MI spec but Eclipse gives this option<br>
const CMIUtilString m_constStrArgPrintValues;<br>
- const CMIUtilString m_constStrArgNoValues;<br>
- const CMIUtilString m_constStrArgAllValues;<br>
- const CMIUtilString m_constStrArgSimpleValues;<br>
};<br>
<br>
//++ ============================================================================<br>
@@ -243,9 +237,6 @@ private:<br>
const CMIUtilString m_constStrArgThread;<br>
const CMIUtilString m_constStrArgFrame;<br>
const CMIUtilString m_constStrArgPrintValues;<br>
- const CMIUtilString m_constStrArgNoValues;<br>
- const CMIUtilString m_constStrArgAllValues;<br>
- const CMIUtilString m_constStrArgSimpleValues;<br>
};<br>
<br>
//++ ============================================================================<br>
<br>
Modified: lldb/trunk/tools/lldb-mi/MICmdCmdVar.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdVar.cpp?rev=237429&r1=237428&r2=237429&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdVar.cpp?rev=237429&r1=237428&r2=237429&view=diff</a><br>
==============================================================================<br>
--- lldb/trunk/tools/lldb-mi/MICmdCmdVar.cpp (original)<br>
+++ lldb/trunk/tools/lldb-mi/MICmdCmdVar.cpp Fri May 15 04:46:28 2015<br>
@@ -33,6 +33,7 @@<br>
#include "MICmdArgValThreadGrp.h"<br>
#include "MICmdArgValOptionLong.h"<br>
#include "MICmdArgValOptionShort.h"<br>
+#include "MICmdArgValPrintValues.h"<br>
#include "MICmdArgValListOfN.h"<br>
#include "MICmnLLDBProxySBValue.h"<br>
#include "MICmnLLDBUtilSBValue.h"<br>
@@ -322,9 +323,6 @@ CMICmdCmdVarCreate::CompleteSBValue(lldb<br>
CMICmdCmdVarUpdate::CMICmdCmdVarUpdate(void)<br>
: m_constStrArgPrintValues("print-values")<br>
, m_constStrArgName("name")<br>
- , m_constStrArgNoValues("no-values")<br>
- , m_constStrArgAllValues("all-values")<br>
- , m_constStrArgSimpleValues("simple-values")<br>
, m_bValueChanged(false)<br>
, m_miValueList(true)<br>
{<br>
@@ -358,10 +356,7 @@ CMICmdCmdVarUpdate::~CMICmdCmdVarUpdate(<br>
bool<br>
CMICmdCmdVarUpdate::ParseArgs(void)<br>
{<br>
- bool bOk = m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgPrintValues, false, true)));<br>
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgNoValues, false, true)));<br>
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgAllValues, false, true)));<br>
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgSimpleValues, false, true)));<br>
+ bool bOk = m_setCmdArgs.Add(*(new CMICmdArgValPrintValues(m_constStrArgPrintValues, false, true)));<br>
bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgName, true, true)));<br>
return (bOk && ParseValidateCmdOptions());<br>
}<br>
@@ -378,32 +373,12 @@ CMICmdCmdVarUpdate::ParseArgs(void)<br>
bool<br>
CMICmdCmdVarUpdate::Execute(void)<br>
{<br>
- CMICMDBASE_GETOPTION(pArgPrintValues, Number, m_constStrArgPrintValues);<br>
- CMICMDBASE_GETOPTION(pArgNoValues, OptionLong, m_constStrArgNoValues);<br>
- CMICMDBASE_GETOPTION(pArgAllValues, OptionLong, m_constStrArgAllValues);<br>
- CMICMDBASE_GETOPTION(pArgSimpleValues, OptionLong, m_constStrArgSimpleValues);<br>
+ CMICMDBASE_GETOPTION(pArgPrintValues, PrintValues, m_constStrArgPrintValues);<br>
CMICMDBASE_GETOPTION(pArgName, String, m_constStrArgName);<br>
<br>
- CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e eVarInfoFormat;<br>
+ CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e eVarInfoFormat = CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_NoValues;<br>
if (pArgPrintValues->GetFound())<br>
- {<br>
- const MIuint nPrintValues = pArgPrintValues->GetValue();<br>
- if (nPrintValues >= CMICmnLLDBDebugSessionInfo::kNumVariableInfoFormats)<br>
- {<br>
- SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_PRINT_VALUES), m_cmdData.strMiCmd.c_str()));<br>
- return MIstatus::failure;<br>
- }<br>
- eVarInfoFormat = static_cast<CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e>(nPrintValues);<br>
- }<br>
- else if (pArgNoValues->GetFound())<br>
- eVarInfoFormat = CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_NoValues;<br>
- else if (pArgAllValues->GetFound())<br>
- eVarInfoFormat = CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_AllValues;<br>
- else if (pArgSimpleValues->GetFound())<br>
- eVarInfoFormat = CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_SimpleValues;<br>
- else<br>
- // If no print-values, default is "no-values"<br>
- eVarInfoFormat = CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_NoValues;<br>
+ eVarInfoFormat = static_cast<CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e>(pArgPrintValues->GetValue());<br>
<br>
const CMIUtilString &rVarObjName(pArgName->GetValue());<br>
CMICmnLLDBDebugSessionInfoVarObj varObj;<br>
@@ -945,9 +920,6 @@ CMICmdCmdVarSetFormat::CreateSelf(void)<br>
//--<br>
CMICmdCmdVarListChildren::CMICmdCmdVarListChildren(void)<br>
: m_constStrArgPrintValues("print-values")<br>
- , m_constStrArgNoValues("no-values")<br>
- , m_constStrArgAllValues("all-values")<br>
- , m_constStrArgSimpleValues("simple-values")<br>
, m_constStrArgName("name")<br>
, m_constStrArgFrom("from")<br>
, m_constStrArgTo("to")<br>
@@ -986,10 +958,7 @@ CMICmdCmdVarListChildren::~CMICmdCmdVarL<br>
bool<br>
CMICmdCmdVarListChildren::ParseArgs(void)<br>
{<br>
- bool bOk = m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgPrintValues, false, true)));<br>
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgNoValues, false, true)));<br>
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgAllValues, false, true)));<br>
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgSimpleValues, false, true)));<br>
+ bool bOk = m_setCmdArgs.Add(*(new CMICmdArgValPrintValues(m_constStrArgPrintValues, false, true)));<br>
bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgName, true, true)));<br>
bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgFrom, false, true)));<br>
bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgTo, false, true)));<br>
@@ -1008,34 +977,14 @@ CMICmdCmdVarListChildren::ParseArgs(void<br>
bool<br>
CMICmdCmdVarListChildren::Execute(void)<br>
{<br>
- CMICMDBASE_GETOPTION(pArgPrintValues, Number, m_constStrArgPrintValues);<br>
- CMICMDBASE_GETOPTION(pArgNoValues, OptionLong, m_constStrArgNoValues);<br>
- CMICMDBASE_GETOPTION(pArgAllValues, OptionLong, m_constStrArgAllValues);<br>
- CMICMDBASE_GETOPTION(pArgSimpleValues, OptionLong, m_constStrArgSimpleValues);<br>
+ CMICMDBASE_GETOPTION(pArgPrintValues, PrintValues, m_constStrArgPrintValues);<br>
CMICMDBASE_GETOPTION(pArgName, String, m_constStrArgName);<br>
CMICMDBASE_GETOPTION(pArgFrom, Number, m_constStrArgFrom);<br>
CMICMDBASE_GETOPTION(pArgTo, Number, m_constStrArgTo);<br>
<br>
- CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e eVarInfoFormat;<br>
+ CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e eVarInfoFormat = CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_NoValues;<br>
if (pArgPrintValues->GetFound())<br>
- {<br>
- const MIuint nPrintValues = pArgPrintValues->GetValue();<br>
- if (nPrintValues >= CMICmnLLDBDebugSessionInfo::kNumVariableInfoFormats)<br>
- {<br>
- SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_PRINT_VALUES), m_cmdData.strMiCmd.c_str()));<br>
- return MIstatus::failure;<br>
- }<br>
- eVarInfoFormat = static_cast<CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e>(nPrintValues);<br>
- }<br>
- else if (pArgNoValues->GetFound())<br>
- eVarInfoFormat = CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_NoValues;<br>
- else if (pArgAllValues->GetFound())<br>
- eVarInfoFormat = CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_AllValues;<br>
- else if (pArgSimpleValues->GetFound())<br>
- eVarInfoFormat = CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_SimpleValues;<br>
- else<br>
- // If no print-values, default is "no-values"<br>
- eVarInfoFormat = CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_NoValues;<br>
+ eVarInfoFormat = static_cast<CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e>(pArgPrintValues->GetValue());<br>
<br>
const CMIUtilString &rVarObjName(pArgName->GetValue());<br>
CMICmnLLDBDebugSessionInfoVarObj varObj;<br>
<br>
Modified: lldb/trunk/tools/lldb-mi/MICmdCmdVar.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdVar.h?rev=237429&r1=237428&r2=237429&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdVar.h?rev=237429&r1=237428&r2=237429&view=diff</a><br>
==============================================================================<br>
--- lldb/trunk/tools/lldb-mi/MICmdCmdVar.h (original)<br>
+++ lldb/trunk/tools/lldb-mi/MICmdCmdVar.h Fri May 15 04:46:28 2015<br>
@@ -128,9 +128,6 @@ class CMICmdCmdVarUpdate : public CMICmd<br>
private:<br>
const CMIUtilString m_constStrArgPrintValues;<br>
const CMIUtilString m_constStrArgName;<br>
- const CMIUtilString m_constStrArgNoValues;<br>
- const CMIUtilString m_constStrArgAllValues;<br>
- const CMIUtilString m_constStrArgSimpleValues;<br>
bool m_bValueChanged; // True = yes value changed, false = no change<br>
CMICmnMIValueList m_miValueList;<br>
};<br>
@@ -266,9 +263,6 @@ class CMICmdCmdVarListChildren : public<br>
// Attributes:<br>
private:<br>
const CMIUtilString m_constStrArgPrintValues;<br>
- const CMIUtilString m_constStrArgNoValues;<br>
- const CMIUtilString m_constStrArgAllValues;<br>
- const CMIUtilString m_constStrArgSimpleValues;<br>
const CMIUtilString m_constStrArgName;<br>
const CMIUtilString m_constStrArgFrom;<br>
const CMIUtilString m_constStrArgTo;<br>
<br>
<br>
_______________________________________________<br>
lldb-commits mailing list<br>
<a href="mailto:lldb-commits@cs.uiuc.edu">lldb-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits</a><br>
</blockquote></div><br></div>