Author: ki.stfu
Date: Mon Mar 23 15:46:10 2015
New Revision: 233017
URL: http://llvm.org/viewvc/llvm-project?rev=233017&view=rev
Log:
Fix/Add comments in CMICmdCmdGdbSet (MI)
Modified:
lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.cpp
lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.h
Modified: lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.cpp
URL:
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.cpp?rev=233017&r1=233016&r2=233017&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.cpp Mon Mar 23 15:46:10 2015
@@ -1,4 +1,4 @@
-//===-- MICmdCmdGdbSet.cpp ------- -------------------------*- C++
-*-===//
+//===-- MICmdCmdGdbSet.cpp --------------------------------------*- C++
-*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -79,7 +79,7 @@ CMICmdCmdGdbSet::ParseArgs(void)
}
//++
------------------------------------------------------------------------------------
-// Details: The invoker requires this function. The command does work in this
function.
+// Details: The invoker requires this function. The command is executed in
this function.
// The command is likely to communicate with the LLDB SBDebugger in
here.
// Type: Overridden.
// Args: None.
@@ -132,7 +132,7 @@ CMICmdCmdGdbSet::Execute(void)
//++
------------------------------------------------------------------------------------
// Details: The invoker requires this function. The command prepares a MI
Record Result
-// for the work carried out in the Execute().
+// for the work carried out in the Execute() method.
// Type: Overridden.
// Args: None.
// Return: MIstatus::success - Functional succeeded.
@@ -142,6 +142,8 @@ CMICmdCmdGdbSet::Execute(void)
bool
CMICmdCmdGdbSet::Acknowledge(void)
{
+ // Print error if option isn't recognized:
+ // ^error,msg="The request '%s' was not recognized, not implemented"
if (!m_bGdbOptionRecognised)
{
const CMICmnMIValueConst miValueConst(
@@ -152,6 +154,7 @@ CMICmdCmdGdbSet::Acknowledge(void)
return MIstatus::success;
}
+ // ^done,value="%s"
if (m_bGdbOptionFnSuccessful)
{
const CMICmnMIResultRecord miRecordResult(m_cmdData.strMiCmdToken,
CMICmnMIResultRecord::eResultClass_Done);
@@ -159,6 +162,8 @@ CMICmdCmdGdbSet::Acknowledge(void)
return MIstatus::success;
}
+ // Print error if request failed:
+ // ^error,msg="The request '%s' failed.
const CMICmnMIValueConst
miValueConst(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INFO_PRINTFN_FAILED),
m_strGdbOptionFnError.c_str()));
const CMICmnMIValueResult miValueResult("msg", miValueConst);
const CMICmnMIResultRecord miRecordResult(m_cmdData.strMiCmdToken,
CMICmnMIResultRecord::eResultClass_Error, miValueResult);
@@ -238,8 +243,8 @@ CMICmdCmdGdbSet::OptionFnSolibSearchPath
}
//++
------------------------------------------------------------------------------------
-// Details: Carry out work to complete the GDB set option to prepare and send
back information
-// asked for.
+// Details: Carry out work to complete the GDB set option to prepare and send
back the
+// requested information.
// Type: Method.
// Args: None.
// Return: MIstatus::success - Functional succeeded.
@@ -251,8 +256,8 @@ CMICmdCmdGdbSet::OptionFnFallback(const
{
MIunused(vrWords);
- // Do nothing - intentional. This is a fallback temporary action function
to do nothing.
- // This allows the search for gdb-set options to always suceed when the
option is not
+ // Do nothing - intentional. This is a fallback function to do nothing.
+ // This allows the search for gdb-set options to always succeed when the
option is not
// found (implemented).
return MIstatus::success;
Modified: lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.h
URL:
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.h?rev=233017&r1=233016&r2=233017&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.h (original)
+++ lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.h Mon Mar 23 15:46:10 2015
@@ -1,4 +1,4 @@
-//===-- MICmdCmdGdbSet.h ------------- ---------------------*- C++
-*-===//
+//===-- MICmdCmdGdbSet.h ----------------------------------------*- C++
-*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -9,7 +9,7 @@
// Overview: CMICmdCmdGdbSet interface.
//
-// To implement new MI commands derive a new command class from
the command base
+// To implement new MI commands, derive a new command class from
the command base
// class. To enable the new command for interpretation add the
new command class
// to the command factory. The files of relevance are:
// MICmdCommands.cpp
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits