ki.stfu added inline comments.

================
Comment at: tools/lldb-mi/MICmdBase.cpp:102
@@ -99,2 +101,3 @@
     m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgFrame, 
m_FrameArgMandatory, true, CMICmdArgValListBase::eArgValType_Number, 1));
+    m_setCmdArgs.Add(new CMICmdArgValConsume(m_constStrArgConsume, false));
 }
----------------
abidh wrote:
> ki.stfu wrote:
> > Well, I thought it's mandatory argument according to its spec: 
> > https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Data-Manipulation.html
> > ```
> >       -data-disassemble
> >          [ -s start-addr -e end-addr ]
> >        | [ -f filename -l linenum [ -n lines ] ]
> >        -- mode
> > ```
> > 
> > But I think we can follow to the GDB syntax.
> If you read the following, you will see that "--" is not mandatory. It says 
> "Options occur first in the parameter list and can be delimited from normal 
> parameters using ‘--’ (this is useful when some parameters begin with a 
> dash)."
> 
> https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Input-Syntax.html#GDB_002fMI-Input-Syntax
As for me, it says that dashes aren't mandatory in general cases (i.e. unless 
otherwise specified in command's spec). In case of -data-disassemble, we know 
that `mode` is either 0, 1, 2, or 3, and therefore according to your [[ 
https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Input-Syntax.html#GDB_002fMI-Input-Syntax
 | link ]], the syntax would be:
```
-data-disassemble [ -s start-addr -e end-addr ] | [ -f filename -l linenum [ -n 
lines ] ] [--] mode
```
(i.e. "--" is optional)

But the [[ 
https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Data-Manipulation.html | 
spec ]] says that '--' is mandatory argument and I perceive it as a special 
case of usage '--'. Therefore I supposed that it's mandatory argument.


http://reviews.llvm.org/D14197



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to