[Lldb-commits] [lldb] r106034 - in /lldb/trunk: include/lldb/Core/ include/lldb/Interpreter/ lldb.xcodeproj/ source/ source/API/ source/Breakpoint/ source/Commands/ source/Core/ source/Interpreter/ source/Plugins/Process/MacOSX-User/source/ source/Plugins/Process/gdb-remote/ source/Plugins/SymbolFile/DWARF/

Jim Ingham jingham at apple.com
Tue Jun 15 12:49:27 PDT 2010


Author: jingham
Date: Tue Jun 15 14:49:27 2010
New Revision: 106034

URL: http://llvm.org/viewvc/llvm-project?rev=106034&view=rev
Log:
Move Args.{cpp,h} and Options.{cpp,h} to Interpreter where they really belong.


Added:
    lldb/trunk/include/lldb/Interpreter/Args.h
      - copied, changed from r106033, lldb/trunk/include/lldb/Core/Args.h
    lldb/trunk/include/lldb/Interpreter/Options.h
      - copied, changed from r106033, lldb/trunk/include/lldb/Core/Options.h
    lldb/trunk/source/Interpreter/Args.cpp
      - copied, changed from r106033, lldb/trunk/source/Core/Args.cpp
    lldb/trunk/source/Interpreter/Options.cpp
      - copied, changed from r106033, lldb/trunk/source/Core/Options.cpp
Removed:
    lldb/trunk/include/lldb/Core/Args.h
    lldb/trunk/include/lldb/Core/Options.h
    lldb/trunk/source/Core/Args.cpp
    lldb/trunk/source/Core/Options.cpp
Modified:
    lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h
    lldb/trunk/include/lldb/Interpreter/CommandObject.h
    lldb/trunk/include/lldb/Interpreter/CommandObjectCrossref.h
    lldb/trunk/include/lldb/Interpreter/StateVariable.h
    lldb/trunk/lldb.xcodeproj/project.pbxproj
    lldb/trunk/source/API/SBCommandInterpreter.cpp
    lldb/trunk/source/API/SBDebugger.cpp
    lldb/trunk/source/API/SBProcess.cpp
    lldb/trunk/source/API/SBTarget.cpp
    lldb/trunk/source/Breakpoint/BreakpointIDList.cpp
    lldb/trunk/source/Commands/CommandCompletions.cpp
    lldb/trunk/source/Commands/CommandObjectAdd.cpp
    lldb/trunk/source/Commands/CommandObjectAlias.cpp
    lldb/trunk/source/Commands/CommandObjectApropos.cpp
    lldb/trunk/source/Commands/CommandObjectArgs.cpp
    lldb/trunk/source/Commands/CommandObjectArgs.h
    lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
    lldb/trunk/source/Commands/CommandObjectBreakpoint.h
    lldb/trunk/source/Commands/CommandObjectBreakpointCommand.h
    lldb/trunk/source/Commands/CommandObjectCall.cpp
    lldb/trunk/source/Commands/CommandObjectCall.h
    lldb/trunk/source/Commands/CommandObjectDisassemble.cpp
    lldb/trunk/source/Commands/CommandObjectDisassemble.h
    lldb/trunk/source/Commands/CommandObjectExpression.cpp
    lldb/trunk/source/Commands/CommandObjectExpression.h
    lldb/trunk/source/Commands/CommandObjectFile.cpp
    lldb/trunk/source/Commands/CommandObjectFile.h
    lldb/trunk/source/Commands/CommandObjectFrame.cpp
    lldb/trunk/source/Commands/CommandObjectFrame.h
    lldb/trunk/source/Commands/CommandObjectHelp.cpp
    lldb/trunk/source/Commands/CommandObjectImage.cpp
    lldb/trunk/source/Commands/CommandObjectLog.cpp
    lldb/trunk/source/Commands/CommandObjectMemory.cpp
    lldb/trunk/source/Commands/CommandObjectMultiword.cpp
    lldb/trunk/source/Commands/CommandObjectProcess.cpp
    lldb/trunk/source/Commands/CommandObjectRegister.cpp
    lldb/trunk/source/Commands/CommandObjectSource.cpp
    lldb/trunk/source/Commands/CommandObjectSourceFile.cpp
    lldb/trunk/source/Commands/CommandObjectSourceFile.h
    lldb/trunk/source/Commands/CommandObjectSyntax.cpp
    lldb/trunk/source/Commands/CommandObjectTarget.cpp
    lldb/trunk/source/Commands/CommandObjectTarget.h
    lldb/trunk/source/Commands/CommandObjectThread.cpp
    lldb/trunk/source/Commands/CommandObjectTranslate.cpp
    lldb/trunk/source/Commands/CommandObjectVariable.cpp
    lldb/trunk/source/Core/ConnectionFileDescriptor.cpp
    lldb/trunk/source/Core/Scalar.cpp
    lldb/trunk/source/Interpreter/CommandInterpreter.cpp
    lldb/trunk/source/Interpreter/CommandObject.cpp
    lldb/trunk/source/Interpreter/CommandObjectScript.cpp
    lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSXLog.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp
    lldb/trunk/source/lldb-log.cpp

Removed: lldb/trunk/include/lldb/Core/Args.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Args.h?rev=106033&view=auto
==============================================================================
--- lldb/trunk/include/lldb/Core/Args.h (original)
+++ lldb/trunk/include/lldb/Core/Args.h (removed)
@@ -1,368 +0,0 @@
-//===-- Args.h --------------------------------------------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_Command_h_
-#define liblldb_Command_h_
-
-// C Includes
-#include <getopt.h>
-
-// C++ Includes
-#include <list>
-#include <string>
-#include <vector>
-#include <utility>
-
-// Other libraries and framework includes
-// Project includes
-#include "lldb/lldb-private.h"
-#include "lldb/Core/Error.h"
-#include "lldb/lldb-types.h"
-
-namespace lldb_private {
-
-typedef std::pair<std::string, std::string> OptionArgPair;
-typedef std::vector<OptionArgPair> OptionArgVector;
-typedef lldb::SharedPtr<OptionArgVector>::Type OptionArgVectorSP;
-
-struct OptionArgElement
-{
-    OptionArgElement (int defs_index, int pos, int arg_pos) :
-        opt_defs_index(defs_index),
-        opt_pos (pos),
-        opt_arg_pos (arg_pos)
-    {
-    }
-
-    int opt_defs_index;
-    int opt_pos;
-    int opt_arg_pos;
-};
-
-typedef std::vector<OptionArgElement> OptionElementVector;
-
-//----------------------------------------------------------------------
-/// @class Args Args.h "lldb/Core/Args.h"
-/// @brief A command line argument class.
-///
-/// The Args class is designed to be fed a command line. The
-/// command line is copied into an internal buffer and then split up
-/// into arguments. Arguments are space delimited if there are no quotes
-/// (single, double, or backtick quotes) surrounding the argument. Spaces
-/// can be escaped using a \ character to avoid having to surround an
-/// argument that contains a space with quotes.
-//----------------------------------------------------------------------
-class Args
-{
-public:
-
-    //------------------------------------------------------------------
-    /// Construct with an option command string.
-    ///
-    /// @param[in] command
-    ///     A NULL terminated command that will be copied and split up
-    ///     into arguments.
-    ///
-    /// @see Args::SetCommandString(const char *)
-    //------------------------------------------------------------------
-    Args (const char *command = NULL);
-
-    Args (const char *command, size_t len);
-
-    //------------------------------------------------------------------
-    /// Destructor.
-    //------------------------------------------------------------------
-    ~Args();
-
-    //------------------------------------------------------------------
-    /// Dump all arguments to the stream \a s.
-    ///
-    /// @param[in] s
-    ///     The stream to which to dump all arguments in the argument
-    ///     vector.
-    //------------------------------------------------------------------
-    void
-    Dump (Stream *s);
-
-    //------------------------------------------------------------------
-    /// Sets the command string contained by this object.
-    ///
-    /// The command string will be copied and split up into arguments
-    /// that can be accessed via the accessor functions.
-    ///
-    /// @param[in] command
-    ///     A NULL terminated command that will be copied and split up
-    ///     into arguments.
-    ///
-    /// @see Args::GetArgumentCount() const
-    /// @see Args::GetArgumentAtIndex (size_t) const
-    /// @see Args::GetArgumentVector ()
-    /// @see Args::Shift ()
-    /// @see Args::Unshift (const char *)
-    //------------------------------------------------------------------
-    void
-    SetCommandString (const char *command);
-
-    void
-    SetCommandString (const char *command, size_t len);
-
-    bool
-    GetCommandString (std::string &command);
-
-    //------------------------------------------------------------------
-    /// Gets the number of arguments left in this command object.
-    ///
-    /// @return
-    ///     The number or arguments in this object.
-    //------------------------------------------------------------------
-    size_t
-    GetArgumentCount () const;
-
-    //------------------------------------------------------------------
-    /// Gets the NULL terminated C string argument pointer for the
-    /// argument at index \a idx.
-    ///
-    /// @return
-    ///     The NULL terminated C string argument pointer if \a idx is a
-    ///     valid argument index, NULL otherwise.
-    //------------------------------------------------------------------
-    const char *
-    GetArgumentAtIndex (size_t idx) const;
-
-    char
-    GetArgumentQuoteCharAtIndex (size_t idx) const;
-
-    //------------------------------------------------------------------
-    /// Gets the argument vector.
-    ///
-    /// The value returned by this function can be used by any function
-    /// that takes and vector. The return value is just like \a argv
-    /// in the standard C entry point function:
-    ///     \code
-    ///         int main (int argc, const char **argv);
-    ///     \endcode
-    ///
-    /// @return
-    ///     An array of NULL terminated C string argument pointers that
-    ///     also has a terminating NULL C string pointer
-    //------------------------------------------------------------------
-    char **
-    GetArgumentVector ();
-
-    //------------------------------------------------------------------
-    /// Gets the argument vector.
-    ///
-    /// The value returned by this function can be used by any function
-    /// that takes and vector. The return value is just like \a argv
-    /// in the standard C entry point function:
-    ///     \code
-    ///         int main (int argc, const char **argv);
-    ///     \endcode
-    ///
-    /// @return
-    ///     An array of NULL terminate C string argument pointers that
-    ///     also has a terminating NULL C string pointer
-    //------------------------------------------------------------------
-    const char **
-    GetConstArgumentVector () const;
-
-
-    //------------------------------------------------------------------
-    /// Appends a new argument to the end of the list argument list.
-    ///
-    /// @param[in] arg_cstr
-    ///     The new argument as a NULL terminated C string.
-    ///
-    /// @param[in] quote_char
-    ///     If the argument was originally quoted, put in the quote char here.
-    ///
-    /// @return
-    ///     The NULL terminated C string of the copy of \a arg_cstr.
-    //------------------------------------------------------------------
-    const char *
-    AppendArgument (const char *arg_cstr, char quote_char = '\0');
-
-    void
-    AppendArguments (const Args &rhs);
-    //------------------------------------------------------------------
-    /// Insert the argument value at index \a idx to \a arg_cstr.
-    ///
-    /// @param[in] idx
-    ///     The index of where to insert the argument.
-    ///
-    /// @param[in] arg_cstr
-    ///     The new argument as a NULL terminated C string.
-    ///
-    /// @param[in] quote_char
-    ///     If the argument was originally quoted, put in the quote char here.
-    ///
-    /// @return
-    ///     The NULL terminated C string of the copy of \a arg_cstr.
-    //------------------------------------------------------------------
-    const char *
-    InsertArgumentAtIndex (size_t idx, const char *arg_cstr, char quote_char = '\0');
-
-    //------------------------------------------------------------------
-    /// Replaces the argument value at index \a idx to \a arg_cstr
-    /// if \a idx is a valid argument index.
-    ///
-    /// @param[in] idx
-    ///     The index of the argument that will have its value replaced.
-    ///
-    /// @param[in] arg_cstr
-    ///     The new argument as a NULL terminated C string.
-    ///
-    /// @param[in] quote_char
-    ///     If the argument was originally quoted, put in the quote char here.
-    ///
-    /// @return
-    ///     The NULL terminated C string of the copy of \a arg_cstr if
-    ///     \a idx was a valid index, NULL otherwise.
-    //------------------------------------------------------------------
-    const char *
-    ReplaceArgumentAtIndex (size_t idx, const char *arg_cstr, char quote_char = '\0');
-
-    //------------------------------------------------------------------
-    /// Deletes the argument value at index
-    /// if \a idx is a valid argument index.
-    ///
-    /// @param[in] idx
-    ///     The index of the argument that will have its value replaced.
-    ///
-    //------------------------------------------------------------------
-    void
-    DeleteArgumentAtIndex (size_t idx);
-
-    //------------------------------------------------------------------
-    /// Sets the argument vector value, optionally copying all
-    /// arguments into an internal buffer.
-    ///
-    /// Sets the arguments to match those found in \a argv. All argument
-    /// strings will be copied into an internal buffers.
-    //
-    //  FIXME: Handle the quote character somehow.
-    //------------------------------------------------------------------
-    void
-    SetArguments (int argc, const char **argv);
-
-    //------------------------------------------------------------------
-    /// Shifts the first argument C string value of the array off the
-    /// argument array.
-    ///
-    /// The string value will be freed, so a copy of the string should
-    /// be made by calling Args::GetArgumentAtIndex (size_t) const
-    /// first and copying the returned value before calling
-    /// Args::Shift().
-    ///
-    /// @see Args::GetArgumentAtIndex (size_t) const
-    //------------------------------------------------------------------
-    void
-    Shift ();
-
-    //------------------------------------------------------------------
-    /// Inserts a class owned copy of \a arg_cstr at the beginning of
-    /// the argument vector.
-    ///
-    /// A copy \a arg_cstr will be made.
-    ///
-    /// @param[in] arg_cstr
-    ///     The argument to push on the front the the argument stack.
-    ///
-    /// @param[in] quote_char
-    ///     If the argument was originally quoted, put in the quote char here.
-    ///
-    /// @return
-    ///     A pointer to the copy of \a arg_cstr that was made.
-    //------------------------------------------------------------------
-    const char *
-    Unshift (const char *arg_cstr, char quote_char = '\0');
-
-    //------------------------------------------------------------------
-    /// Parse the arguments in the contained arguments.
-    ///
-    /// The arguments that are consumed by the argument parsing process
-    /// will be removed from the argument vector. The arguements that
-    /// get processed start at the second argument. The first argument
-    /// is assumed to be the command and will not be touched.
-    ///
-    /// @see class Options
-    //------------------------------------------------------------------
-    Error
-    ParseOptions (Options &options);
-
-    // The following works almost identically to ParseOptions, except that no option is required to have arguments,
-    // and it builds up the option_arg_vector as it parses the options.
-
-    void
-    ParseAliasOptions (Options &options, CommandReturnObject &result, OptionArgVector *option_arg_vector);
-
-    void
-    ParseArgsForCompletion (Options &options, OptionElementVector &option_element_vector);
-
-    //------------------------------------------------------------------
-    // Clear the arguments.
-    //
-    // For re-setting or blanking out the list of arguments.
-    //------------------------------------------------------------------
-    void
-    Clear ();
-
-    static int32_t
-    StringToSInt32 (const char *s, int32_t fail_value = 0, int base = 0, bool *success_ptr = NULL);
-
-    static uint32_t
-    StringToUInt32 (const char *s, uint32_t fail_value = 0, int base = 0, bool *success_ptr = NULL);
-
-    static int64_t
-    StringToSInt64 (const char *s, int64_t fail_value = 0, int base = 0, bool *success_ptr = NULL);
-
-    static uint64_t
-    StringToUInt64 (const char *s, uint64_t fail_value = 0, int base = 0, bool *success_ptr = NULL);
-
-    static lldb::addr_t
-    StringToAddress (const char *s, lldb::addr_t fail_value = LLDB_INVALID_ADDRESS, bool *success_ptr = NULL);
-
-    static bool
-    StringToBoolean (const char *s, bool fail_value, bool *success_ptr);
-    
-    static int32_t
-    StringToOptionEnum (const char *s, lldb::OptionEnumValueElement *enum_values, int32_t fail_value, bool *success_ptr);
-
-    static lldb::ScriptLanguage
-    StringToScriptLanguage (const char *s, lldb::ScriptLanguage fail_value, bool *success_ptr);
-
-    static Error
-    StringToFormat (const char *s, lldb::Format &format);
-
-    // This one isn't really relevant to Arguments per se, but we're using the Args as a
-    // general strings container, so...
-    void
-    LongestCommonPrefix (std::string &common_prefix);
-
-protected:
-    //------------------------------------------------------------------
-    // Classes that inherit from Args can see and modify these
-    //------------------------------------------------------------------
-    typedef std::list<std::string> arg_sstr_collection;
-    typedef std::vector<const char *> arg_cstr_collection;
-    typedef std::vector<char> arg_quote_char_collection;
-    arg_sstr_collection m_args;
-    arg_cstr_collection m_argv; ///< The current argument vector.
-    arg_quote_char_collection m_args_quote_char;
-
-    void
-    UpdateArgsAfterOptionParsing ();
-
-    void
-    UpdateArgvFromArgs ();
-};
-
-} // namespace lldb_private
-
-#endif  // liblldb_Command_h_

Removed: lldb/trunk/include/lldb/Core/Options.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Options.h?rev=106033&view=auto
==============================================================================
--- lldb/trunk/include/lldb/Core/Options.h (original)
+++ lldb/trunk/include/lldb/Core/Options.h (removed)
@@ -1,299 +0,0 @@
-//===-- Options.h -----------------------------------------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_Options_h_
-#define liblldb_Options_h_
-
-// C Includes
-#include <getopt.h>
-
-// C++ Includes
-#include <set>
-#include <vector>
-
-// Other libraries and framework includes
-// Project includes
-#include "lldb/lldb-private.h"
-#include "lldb/lldb-defines.h"
-#include "lldb/Core/Args.h"
-
-namespace lldb_private {
-
-//----------------------------------------------------------------------
-/// @class Options Options.h "lldb/Core/Options.h"
-/// @brief A command line option parsing protocol class.
-///
-/// Options is designed to be subclassed to contain all needed
-/// options for a given command. The options can be parsed by calling:
-/// \code
-///     Error Args::ParseOptions (Options &);
-/// \endcode
-///
-/// The options are specified using the format defined for the libc
-/// options parsing function getopt_long:
-/// \code
-///     #include <getopt.h>
-///     int getopt_long(int argc, char * const *argv, const char *optstring, const struct option *longopts, int *longindex);
-/// \endcode
-///
-/// Example code:
-/// \code
-///     #include <getopt.h>
-///     #include <string>
-///
-///     class CommandOptions : public Options
-///     {
-///     public:
-///         virtual struct option *
-///         GetLongOptions() {
-///             return g_options;
-///         }
-///
-///         virtual Error
-///         SetOptionValue (int option_idx, int option_val, const char *option_arg)
-///         {
-///             Error error;
-///             switch (option_val)
-///             {
-///             case 'g': debug = true; break;
-///             case 'v': verbose = true; break;
-///             case 'l': log_file = option_arg; break;
-///             case 'f': log_flags = strtoull(option_arg, NULL, 0); break;
-///             default:
-///                 error.SetErrorStringWithFormat("unrecognized short option %c", option_val);
-///                 break;
-///             }
-///
-///             return error;
-///         }
-///
-///         CommandOptions () : debug (true), verbose (false), log_file (), log_flags (0)
-///         {}
-///
-///         bool debug;
-///         bool verbose;
-///         std::string log_file;
-///         uint32_t log_flags;
-///
-///         static struct option g_options[];
-///
-///     };
-///
-///     struct option CommandOptions::g_options[] =
-///     {
-///         { "debug",              no_argument,        NULL,   'g' },
-///         { "log-file",           required_argument,  NULL,   'l' },
-///         { "log-flags",          required_argument,  NULL,   'f' },
-///         { "verbose",            no_argument,        NULL,   'v' },
-///         { NULL,                 0,                  NULL,   0   }
-///     };
-///
-///     int main (int argc, const char **argv, const char **envp)
-///     {
-///         CommandOptions options;
-///         Args main_command;
-///         main_command.SetArguments(argc, argv, false);
-///         main_command.ParseOptions(options);
-///
-///         if (options.verbose)
-///         {
-///             std::cout << "verbose is on" << std::endl;
-///         }
-///     }
-/// \endcode
-//----------------------------------------------------------------------
-class Options
-{
-public:
-
-    Options ();
-
-    virtual
-    ~Options ();
-
-    void
-    BuildGetoptTable ();
-
-    void
-    BuildValidOptionSets ();
-
-    uint32_t
-    NumCommandOptions ();
-
-    //------------------------------------------------------------------
-    /// Get the option definitions to use when parsing Args options.
-    ///
-    /// @see Args::ParseOptions (Options&)
-    /// @see man getopt_long
-    //------------------------------------------------------------------
-    struct option *
-    GetLongOptions ();
-
-    // This gets passed the short option as an integer...
-    void
-    OptionSeen (int short_option);
-
-    bool
-    VerifyOptions (CommandReturnObject &result);
-
-    // Verify that the options given are in the options table and can be used together, but there may be
-    // some required options that are missing (used to verify options that get folded into command aliases).
-
-    bool
-    VerifyPartialOptions (CommandReturnObject &result);
-
-//    void
-//    BuildAliasOptions (OptionArgVector *option_arg_vector, Args args);
-
-    void
-    OutputFormattedUsageText (Stream &strm,
-                              const char *text,
-                              uint32_t output_max_columns);
-
-    void
-    GenerateOptionUsage (Stream &strm,
-                         CommandObject *cmd,
-                         const char *program_name = NULL);
-
-    // The following two pure virtual functions must be defined by every class that inherits from
-    // this class.
-
-    virtual const lldb::OptionDefinition*
-    GetDefinitions () { return NULL; };
-
-    virtual void
-    ResetOptionValues ();
-
-    //------------------------------------------------------------------
-    /// Set the value of an option.
-    ///
-    /// @param[in] option_idx
-    ///     The index into the "struct option" array that was returned
-    ///     by Options::GetLongOptions().
-    ///
-    /// @param[in] option_arg
-    ///     The argument value for the option that the user entered, or
-    ///     NULL if there is no argument for the current option.
-    ///
-    ///
-    /// @see Args::ParseOptions (Options&)
-    /// @see man getopt_long
-    //------------------------------------------------------------------
-    virtual Error
-    SetOptionValue (int option_idx, const char *option_arg) = 0;
-
-    //------------------------------------------------------------------
-    ///  Handles the generic bits of figuring out whether we are in an option, and if so completing
-    /// it.
-    ///
-    /// @param[in] input
-    ///    The command line parsed into words
-    ///
-    /// @param[in] cursor_index
-    ///     The index in \ainput of the word in which the cursor lies.
-    ///
-    /// @param[in] char_pos
-    ///     The character position of the cursor in its argument word.
-    ///
-    /// @param[in] match_start_point
-    /// @param[in] match_return_elements
-    ///     See CommandObject::HandleCompletions for a description of how these work.
-    ///
-    /// @param[in] interpreter
-    ///     The interpreter that's doing the completing.
-    ///
-    /// @param[out] matches
-    ///     The array of matches returned.
-    ///
-    /// FIXME: This is the wrong return value, since we also need to make a distinction between
-    /// total number of matches, and the window the user wants returned.
-    ///
-    /// @return
-    ///     \btrue if we were in an option, \bfalse otherwise.
-    //------------------------------------------------------------------
-    bool
-    HandleOptionCompletion (Args &input,
-                            OptionElementVector &option_map,
-                            int cursor_index,
-                            int char_pos,
-                            int match_start_point,
-                            int max_return_elements,
-                            lldb_private::CommandInterpreter *interpreter,
-                            lldb_private::StringList &matches);
-
-    //------------------------------------------------------------------
-    ///  Handles the generic bits of figuring out whether we are in an option, and if so completing
-    /// it.
-    ///
-    /// @param[in] input
-    ///    The command line parsed into words
-    ///
-    /// @param[in] cursor_index
-    ///     The index in \ainput of the word in which the cursor lies.
-    ///
-    /// @param[in] char_pos
-    ///     The character position of the cursor in its argument word.
-    ///
-    /// @param[in] opt_element_vector
-    ///     The results of the options parse of \a input.
-    ///
-    /// @param[in] opt_element_index
-    ///     The position in \a opt_element_vector of the word in \a input containing the cursor.
-    ///
-    /// @param[in] match_start_point
-    /// @param[in] match_return_elements
-    ///     See CommandObject::HandleCompletions for a description of how these work.
-    ///
-    /// @param[in] interpreter
-    ///     The interpreter that's doing the completing.
-    ///
-    /// @param[out] matches
-    ///     The array of matches returned.
-    ///
-    /// FIXME: This is the wrong return value, since we also need to make a distinction between
-    /// total number of matches, and the window the user wants returned.
-    ///
-    /// @return
-    ///     \btrue if we were in an option, \bfalse otherwise.
-    //------------------------------------------------------------------
-    virtual bool
-    HandleOptionArgumentCompletion (Args &input,
-                                            int cursor_index,
-                                            int char_pos,
-                                            OptionElementVector &opt_element_vector,
-                                            int opt_element_index,
-                                            int match_start_point,
-                                            int max_return_elements,
-                                            CommandInterpreter *interpreter,
-                                            StringList &matches);
-
-protected:
-    // This is a set of options expressed as indexes into the options table for this Option.
-    typedef std::set<char> OptionSet;
-
-    std::vector<struct option> m_getopt_table;
-    OptionSet m_seen_options;
-    std::vector<OptionSet> m_required_options;
-    std::vector<OptionSet> m_optional_options;
-
-
-
-    bool
-    IsASubset (const OptionSet& set_a, const OptionSet& set_b);
-
-    size_t
-    OptionsSetDiff (const OptionSet &set_a, const OptionSet &set_b, OptionSet &diffs);
-
-    void
-    OptionsSetUnion (const OptionSet &set_a, const OptionSet &set_b, OptionSet &union_set);
-};
-
-} // namespace lldb_private
-
-#endif  // liblldb_Options_h_

Copied: lldb/trunk/include/lldb/Interpreter/Args.h (from r106033, lldb/trunk/include/lldb/Core/Args.h)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/Args.h?p2=lldb/trunk/include/lldb/Interpreter/Args.h&p1=lldb/trunk/include/lldb/Core/Args.h&r1=106033&r2=106034&rev=106034&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Args.h (original)
+++ lldb/trunk/include/lldb/Interpreter/Args.h Tue Jun 15 14:49:27 2010
@@ -48,7 +48,7 @@
 typedef std::vector<OptionArgElement> OptionElementVector;
 
 //----------------------------------------------------------------------
-/// @class Args Args.h "lldb/Core/Args.h"
+/// @class Args Args.h "lldb/Interpreter/Args.h"
 /// @brief A command line argument class.
 ///
 /// The Args class is designed to be fed a command line. The

Modified: lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h (original)
+++ lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h Tue Jun 15 14:49:27 2010
@@ -22,7 +22,7 @@
 #include "lldb/Interpreter/ScriptInterpreter.h"
 #include "lldb/Interpreter/StateVariable.h"
 #include "lldb/Core/Event.h"
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 #include "lldb/Core/StringList.h"
 
 namespace lldb_private {

Modified: lldb/trunk/include/lldb/Interpreter/CommandObject.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandObject.h?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/CommandObject.h (original)
+++ lldb/trunk/include/lldb/Interpreter/CommandObject.h Tue Jun 15 14:49:27 2010
@@ -16,7 +16,7 @@
 #include <vector>
 
 #include "lldb/lldb-private.h"
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 #include "lldb/Core/StringList.h"
 #include "lldb/Core/Flags.h"
 

Modified: lldb/trunk/include/lldb/Interpreter/CommandObjectCrossref.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandObjectCrossref.h?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/CommandObjectCrossref.h (original)
+++ lldb/trunk/include/lldb/Interpreter/CommandObjectCrossref.h Tue Jun 15 14:49:27 2010
@@ -15,7 +15,7 @@
 // Other libraries and framework includes
 // Project includes
 #include "lldb/Interpreter/CommandObject.h"
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 
 namespace lldb_private {
 

Copied: lldb/trunk/include/lldb/Interpreter/Options.h (from r106033, lldb/trunk/include/lldb/Core/Options.h)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/Options.h?p2=lldb/trunk/include/lldb/Interpreter/Options.h&p1=lldb/trunk/include/lldb/Core/Options.h&r1=106033&r2=106034&rev=106034&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Options.h (original)
+++ lldb/trunk/include/lldb/Interpreter/Options.h Tue Jun 15 14:49:27 2010
@@ -21,12 +21,12 @@
 // Project includes
 #include "lldb/lldb-private.h"
 #include "lldb/lldb-defines.h"
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 
 namespace lldb_private {
 
 //----------------------------------------------------------------------
-/// @class Options Options.h "lldb/Core/Options.h"
+/// @class Options Options.h "lldb/Interpreter/Options.h"
 /// @brief A command line option parsing protocol class.
 ///
 /// Options is designed to be subclassed to contain all needed

Modified: lldb/trunk/include/lldb/Interpreter/StateVariable.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/StateVariable.h?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/StateVariable.h (original)
+++ lldb/trunk/include/lldb/Interpreter/StateVariable.h Tue Jun 15 14:49:27 2010
@@ -16,7 +16,7 @@
 // Other libraries and framework includes
 // Project includes
 #include "lldb/lldb-private.h"
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 
 namespace lldb_private {
 

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Tue Jun 15 14:49:27 2010
@@ -623,7 +623,7 @@
 		26BC7D5010F1B77400F91463 /* Address.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Address.h; path = include/lldb/Core/Address.h; sourceTree = "<group>"; };
 		26BC7D5110F1B77400F91463 /* AddressRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AddressRange.h; path = include/lldb/Core/AddressRange.h; sourceTree = "<group>"; };
 		26BC7D5210F1B77400F91463 /* ArchSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ArchSpec.h; path = include/lldb/Core/ArchSpec.h; sourceTree = "<group>"; };
-		26BC7D5310F1B77400F91463 /* Args.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Args.h; path = include/lldb/Core/Args.h; sourceTree = "<group>"; };
+		26BC7D5310F1B77400F91463 /* Args.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Args.h; path = include/lldb/Interpreter/Args.h; sourceTree = "<group>"; };
 		26BC7D5410F1B77400F91463 /* Broadcaster.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Broadcaster.h; path = include/lldb/Core/Broadcaster.h; sourceTree = "<group>"; };
 		26BC7D5510F1B77400F91463 /* ClangForward.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangForward.h; path = include/lldb/Core/ClangForward.h; sourceTree = "<group>"; };
 		26BC7D5610F1B77400F91463 /* Communication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Communication.h; path = include/lldb/Core/Communication.h; sourceTree = "<group>"; };
@@ -649,7 +649,7 @@
 		26BC7D6A10F1B77400F91463 /* Module.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Module.h; path = include/lldb/Core/Module.h; sourceTree = "<group>"; };
 		26BC7D6B10F1B77400F91463 /* ModuleChild.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ModuleChild.h; path = include/lldb/Core/ModuleChild.h; sourceTree = "<group>"; };
 		26BC7D6C10F1B77400F91463 /* ModuleList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ModuleList.h; path = include/lldb/Core/ModuleList.h; sourceTree = "<group>"; };
-		26BC7D6D10F1B77400F91463 /* Options.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Options.h; path = include/lldb/Core/Options.h; sourceTree = "<group>"; };
+		26BC7D6D10F1B77400F91463 /* Options.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Options.h; path = include/lldb/Interpreter/Options.h; sourceTree = "<group>"; };
 		26BC7D7010F1B77400F91463 /* PluginInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PluginInterface.h; path = include/lldb/Core/PluginInterface.h; sourceTree = "<group>"; };
 		26BC7D7110F1B77400F91463 /* PluginManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PluginManager.h; path = include/lldb/Core/PluginManager.h; sourceTree = "<group>"; };
 		26BC7D7310F1B77400F91463 /* RegularExpression.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegularExpression.h; path = include/lldb/Core/RegularExpression.h; sourceTree = "<group>"; };
@@ -746,7 +746,7 @@
 		26BC7E6910F1B85900F91463 /* Address.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Address.cpp; path = source/Core/Address.cpp; sourceTree = "<group>"; };
 		26BC7E6A10F1B85900F91463 /* AddressRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AddressRange.cpp; path = source/Core/AddressRange.cpp; sourceTree = "<group>"; };
 		26BC7E6B10F1B85900F91463 /* ArchSpec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ArchSpec.cpp; path = source/Core/ArchSpec.cpp; sourceTree = "<group>"; };
-		26BC7E6C10F1B85900F91463 /* Args.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Args.cpp; path = source/Core/Args.cpp; sourceTree = "<group>"; };
+		26BC7E6C10F1B85900F91463 /* Args.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Args.cpp; path = source/Interpreter/Args.cpp; sourceTree = "<group>"; };
 		26BC7E6D10F1B85900F91463 /* Broadcaster.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Broadcaster.cpp; path = source/Core/Broadcaster.cpp; sourceTree = "<group>"; };
 		26BC7E6E10F1B85900F91463 /* Communication.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Communication.cpp; path = source/Core/Communication.cpp; sourceTree = "<group>"; };
 		26BC7E6F10F1B85900F91463 /* Connection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Connection.cpp; path = source/Core/Connection.cpp; sourceTree = "<group>"; };
@@ -770,7 +770,7 @@
 		26BC7E8110F1B85900F91463 /* Module.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Module.cpp; path = source/Core/Module.cpp; sourceTree = "<group>"; };
 		26BC7E8210F1B85900F91463 /* ModuleChild.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ModuleChild.cpp; path = source/Core/ModuleChild.cpp; sourceTree = "<group>"; };
 		26BC7E8310F1B85900F91463 /* ModuleList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ModuleList.cpp; path = source/Core/ModuleList.cpp; sourceTree = "<group>"; };
-		26BC7E8610F1B85900F91463 /* Options.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Options.cpp; path = source/Core/Options.cpp; sourceTree = "<group>"; };
+		26BC7E8610F1B85900F91463 /* Options.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Options.cpp; path = source/Interpreter/Options.cpp; sourceTree = "<group>"; };
 		26BC7E8A10F1B85900F91463 /* PluginManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PluginManager.cpp; path = source/Core/PluginManager.cpp; sourceTree = "<group>"; };
 		26BC7E8C10F1B85900F91463 /* RegularExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegularExpression.cpp; path = source/Core/RegularExpression.cpp; sourceTree = "<group>"; };
 		26BC7E8D10F1B85900F91463 /* Scalar.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Scalar.cpp; path = source/Core/Scalar.cpp; sourceTree = "<group>"; };
@@ -1556,8 +1556,6 @@
 				9AC7034411752C790086C050 /* AddressResolverName.cpp */,
 				26BC7D5210F1B77400F91463 /* ArchSpec.h */,
 				26BC7E6B10F1B85900F91463 /* ArchSpec.cpp */,
-				26BC7D5310F1B77400F91463 /* Args.h */,
-				26BC7E6C10F1B85900F91463 /* Args.cpp */,
 				26A0604711A5BC7A00F75969 /* Baton.h */,
 				26A0604811A5D03C00F75969 /* Baton.cpp */,
 				26BC7D5410F1B77400F91463 /* Broadcaster.h */,
@@ -1611,8 +1609,6 @@
 				26BC7E8210F1B85900F91463 /* ModuleChild.cpp */,
 				26BC7D6C10F1B77400F91463 /* ModuleList.h */,
 				26BC7E8310F1B85900F91463 /* ModuleList.cpp */,
-				26BC7D6D10F1B77400F91463 /* Options.h */,
-				26BC7E8610F1B85900F91463 /* Options.cpp */,
 				26BC7D7010F1B77400F91463 /* PluginInterface.h */,
 				26BC7D7110F1B77400F91463 /* PluginManager.h */,
 				26BC7E8A10F1B85900F91463 /* PluginManager.cpp */,
@@ -1875,6 +1871,8 @@
 		26BC7DDF10F1B7E200F91463 /* Interpreter */ = {
 			isa = PBXGroup;
 			children = (
+				26BC7D5310F1B77400F91463 /* Args.h */,
+				26BC7E6C10F1B85900F91463 /* Args.cpp */,
 				26A4EEB511682AAC007A372A /* LLDBWrapPython.cpp */,
 				4C09CB73116BD98B00C7A725 /* CommandCompletions.h */,
 				4C09CB74116BD98B00C7A725 /* CommandCompletions.cpp */,
@@ -1892,6 +1890,8 @@
 				26DFBC59113B48F300DD817F /* CommandObjectRegexCommand.cpp */,
 				26BC7DE410F1B7F900F91463 /* CommandReturnObject.h */,
 				26BC7F0A10F1B8DD00F91463 /* CommandReturnObject.cpp */,
+				26BC7D6D10F1B77400F91463 /* Options.h */,
+				26BC7E8610F1B85900F91463 /* Options.cpp */,
 				26BC7DE510F1B7F900F91463 /* ScriptInterpreter.h */,
 				9A82010B10FFB49800182560 /* ScriptInterpreter.cpp */,
 				9A2771FB1135A35C00E6ADB6 /* ScriptInterpreterNone.h */,

Modified: lldb/trunk/source/API/SBCommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBCommandInterpreter.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/API/SBCommandInterpreter.cpp (original)
+++ lldb/trunk/source/API/SBCommandInterpreter.cpp Tue Jun 15 14:49:27 2010
@@ -8,7 +8,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "lldb/lldb-types.h"
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 #include "lldb/Core/SourceManager.h"
 #include "lldb/Core/Listener.h"
 #include "lldb/Interpreter/CommandInterpreter.h"

Modified: lldb/trunk/source/API/SBDebugger.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBDebugger.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/API/SBDebugger.cpp (original)
+++ lldb/trunk/source/API/SBDebugger.cpp Tue Jun 15 14:49:27 2010
@@ -10,7 +10,7 @@
 #include "lldb/API/SBDebugger.h"
 
 #include "lldb/lldb-include.h"
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/State.h"
 #include "lldb/Target/Process.h"

Modified: lldb/trunk/source/API/SBProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBProcess.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/API/SBProcess.cpp (original)
+++ lldb/trunk/source/API/SBProcess.cpp Tue Jun 15 14:49:27 2010
@@ -12,7 +12,7 @@
 #include "lldb/lldb-defines.h"
 #include "lldb/lldb-types.h"
 
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 #include "lldb/Core/DataBufferHeap.h"
 #include "lldb/Core/DataExtractor.h"
 #include "lldb/Core/State.h"

Modified: lldb/trunk/source/API/SBTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTarget.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTarget.cpp (original)
+++ lldb/trunk/source/API/SBTarget.cpp Tue Jun 15 14:49:27 2010
@@ -20,7 +20,7 @@
 #include "lldb/Core/Address.h"
 #include "lldb/Core/AddressResolver.h"
 #include "lldb/Core/AddressResolverName.h"
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 #include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/Disassembler.h"

Modified: lldb/trunk/source/Breakpoint/BreakpointIDList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointIDList.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointIDList.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointIDList.cpp Tue Jun 15 14:49:27 2010
@@ -12,7 +12,7 @@
 #include "lldb/Breakpoint/Breakpoint.h"
 #include "lldb/Breakpoint/BreakpointLocation.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 #include "lldb/Target/Target.h"
 
 using namespace lldb;

Modified: lldb/trunk/source/Commands/CommandCompletions.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandCompletions.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandCompletions.cpp (original)
+++ lldb/trunk/source/Commands/CommandCompletions.cpp Tue Jun 15 14:49:27 2010
@@ -12,7 +12,7 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Core/FileSpecList.h"
 #include "lldb/Target/Target.h"

Modified: lldb/trunk/source/Commands/CommandObjectAdd.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectAdd.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectAdd.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectAdd.cpp Tue Jun 15 14:49:27 2010
@@ -14,7 +14,7 @@
 // Other libraries and framework includes
 // Project includes
 #include "lldb/Interpreter/CommandInterpreter.h"
-#include "lldb/Core/Options.h"
+#include "lldb/Interpreter/Options.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
 
 using namespace lldb;

Modified: lldb/trunk/source/Commands/CommandObjectAlias.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectAlias.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectAlias.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectAlias.cpp Tue Jun 15 14:49:27 2010
@@ -15,8 +15,8 @@
 // Other libraries and framework includes
 // Project includes
 #include "lldb/Interpreter/CommandObjectMultiword.h"
-#include "lldb/Core/Args.h"
-#include "lldb/Core/Options.h"
+#include "lldb/Interpreter/Args.h"
+#include "lldb/Interpreter/Options.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
 #include "lldb/Interpreter/CommandInterpreter.h"

Modified: lldb/trunk/source/Commands/CommandObjectApropos.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectApropos.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectApropos.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectApropos.cpp Tue Jun 15 14:49:27 2010
@@ -13,8 +13,8 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "lldb/Core/Args.h"
-#include "lldb/Core/Options.h"
+#include "lldb/Interpreter/Args.h"
+#include "lldb/Interpreter/Options.h"
 
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/CommandReturnObject.h"

Modified: lldb/trunk/source/Commands/CommandObjectArgs.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectArgs.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectArgs.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectArgs.cpp Tue Jun 15 14:49:27 2010
@@ -13,7 +13,7 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 #include "lldb/Core/Value.h"
 #include "lldb/Expression/ClangExpression.h"
 #include "lldb/Expression/ClangExpressionVariable.h"

Modified: lldb/trunk/source/Commands/CommandObjectArgs.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectArgs.h?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectArgs.h (original)
+++ lldb/trunk/source/Commands/CommandObjectArgs.h Tue Jun 15 14:49:27 2010
@@ -15,7 +15,7 @@
 // Other libraries and framework includes
 // Project includes
 #include "lldb/Interpreter/CommandObject.h"
-#include "lldb/Core/Options.h"
+#include "lldb/Interpreter/Options.h"
 #include "lldb/Core/Language.h"
 
 namespace lldb_private {

Modified: lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp Tue Jun 15 14:49:27 2010
@@ -17,7 +17,7 @@
 #include "lldb/Breakpoint/Breakpoint.h"
 #include "lldb/Breakpoint/BreakpointIDList.h"
 #include "lldb/Breakpoint/BreakpointLocation.h"
-#include "lldb/Core/Options.h"
+#include "lldb/Interpreter/Options.h"
 #include "lldb/Core/RegularExpression.h"
 #include "lldb/Core/StreamString.h"
 #include "lldb/Interpreter/CommandInterpreter.h"

Modified: lldb/trunk/source/Commands/CommandObjectBreakpoint.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpoint.h?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpoint.h (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpoint.h Tue Jun 15 14:49:27 2010
@@ -20,7 +20,7 @@
 // Project includes
 #include "lldb/Core/Address.h"
 #include "lldb/Interpreter/CommandObjectMultiword.h"
-#include "lldb/Core/Options.h"
+#include "lldb/Interpreter/Options.h"
 #include "lldb/Core/STLUtils.h"
 
 namespace lldb_private {

Modified: lldb/trunk/source/Commands/CommandObjectBreakpointCommand.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpointCommand.h?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpointCommand.h (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpointCommand.h Tue Jun 15 14:49:27 2010
@@ -18,7 +18,7 @@
 // Project includes
 
 #include "lldb/lldb-types.h"
-#include "lldb/Core/Options.h"
+#include "lldb/Interpreter/Options.h"
 #include "lldb/Core/InputReader.h"
 #include "lldb/Interpreter/CommandObject.h"
 #include "lldb/Interpreter/CommandReturnObject.h"

Modified: lldb/trunk/source/Commands/CommandObjectCall.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectCall.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectCall.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectCall.cpp Tue Jun 15 14:49:27 2010
@@ -13,7 +13,7 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 #include "lldb/Core/Value.h"
 #include "lldb/Expression/ClangExpression.h"
 #include "lldb/Expression/ClangExpressionVariable.h"

Modified: lldb/trunk/source/Commands/CommandObjectCall.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectCall.h?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectCall.h (original)
+++ lldb/trunk/source/Commands/CommandObjectCall.h Tue Jun 15 14:49:27 2010
@@ -15,7 +15,7 @@
 // Other libraries and framework includes
 // Project includes
 #include "lldb/Interpreter/CommandObject.h"
-#include "lldb/Core/Options.h"
+#include "lldb/Interpreter/Options.h"
 #include "lldb/Core/Language.h"
 
 namespace lldb_private {

Modified: lldb/trunk/source/Commands/CommandObjectDisassemble.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectDisassemble.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectDisassemble.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectDisassemble.cpp Tue Jun 15 14:49:27 2010
@@ -14,12 +14,12 @@
 // Other libraries and framework includes
 // Project includes
 #include "lldb/Core/AddressRange.h"
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 #include "lldb/Interpreter/CommandCompletions.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
 #include "lldb/Core/Disassembler.h"
-#include "lldb/Core/Options.h"
+#include "lldb/Interpreter/Options.h"
 #include "lldb/Core/SourceManager.h"
 #include "lldb/Target/StackFrame.h"
 #include "lldb/Symbol/Symbol.h"

Modified: lldb/trunk/source/Commands/CommandObjectDisassemble.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectDisassemble.h?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectDisassemble.h (original)
+++ lldb/trunk/source/Commands/CommandObjectDisassemble.h Tue Jun 15 14:49:27 2010
@@ -15,7 +15,7 @@
 // Other libraries and framework includes
 // Project includes
 #include "lldb/Interpreter/CommandObject.h"
-#include "lldb/Core/Options.h"
+#include "lldb/Interpreter/Options.h"
 
 namespace lldb_private {
 

Modified: lldb/trunk/source/Commands/CommandObjectExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectExpression.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectExpression.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectExpression.cpp Tue Jun 15 14:49:27 2010
@@ -13,7 +13,7 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 #include "lldb/Core/Value.h"
 #include "lldb/Core/InputReader.h"
 #include "lldb/Expression/ClangExpression.h"

Modified: lldb/trunk/source/Commands/CommandObjectExpression.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectExpression.h?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectExpression.h (original)
+++ lldb/trunk/source/Commands/CommandObjectExpression.h Tue Jun 15 14:49:27 2010
@@ -15,7 +15,7 @@
 // Other libraries and framework includes
 // Project includes
 #include "lldb/Interpreter/CommandObject.h"
-#include "lldb/Core/Options.h"
+#include "lldb/Interpreter/Options.h"
 #include "lldb/Core/Language.h"
 #include "lldb/Target/ExecutionContext.h"
 

Modified: lldb/trunk/source/Commands/CommandObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectFile.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectFile.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectFile.cpp Tue Jun 15 14:49:27 2010
@@ -13,7 +13,7 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/Timer.h"
 #include "lldb/Interpreter/CommandContext.h"

Modified: lldb/trunk/source/Commands/CommandObjectFile.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectFile.h?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectFile.h (original)
+++ lldb/trunk/source/Commands/CommandObjectFile.h Tue Jun 15 14:49:27 2010
@@ -14,7 +14,7 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "lldb/Core/Options.h"
+#include "lldb/Interpreter/Options.h"
 #include "lldb/Core/ArchSpec.h"
 #include "lldb/Interpreter/CommandObject.h"
 

Modified: lldb/trunk/source/Commands/CommandObjectFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectFrame.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectFrame.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectFrame.cpp Tue Jun 15 14:49:27 2010
@@ -13,7 +13,7 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/Timer.h"
 #include "lldb/Interpreter/CommandContext.h"

Modified: lldb/trunk/source/Commands/CommandObjectFrame.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectFrame.h?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectFrame.h (original)
+++ lldb/trunk/source/Commands/CommandObjectFrame.h Tue Jun 15 14:49:27 2010
@@ -14,7 +14,7 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "lldb/Core/Options.h"
+#include "lldb/Interpreter/Options.h"
 #include "lldb/Core/ArchSpec.h"
 #include "lldb/Interpreter/CommandObjectMultiword.h"
 

Modified: lldb/trunk/source/Commands/CommandObjectHelp.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectHelp.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectHelp.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectHelp.cpp Tue Jun 15 14:49:27 2010
@@ -15,7 +15,7 @@
 // Project includes
 #include "lldb/Interpreter/CommandObjectMultiword.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
-#include "lldb/Core/Options.h"
+#include "lldb/Interpreter/Options.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
 
 using namespace lldb;

Modified: lldb/trunk/source/Commands/CommandObjectImage.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectImage.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectImage.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectImage.cpp Tue Jun 15 14:49:27 2010
@@ -13,9 +13,9 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 #include "lldb/Interpreter/CommandContext.h"
-#include "lldb/Core/Options.h"
+#include "lldb/Interpreter/Options.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
 #include "lldb/Core/FileSpec.h"
 #include "lldb/Symbol/LineTable.h"

Modified: lldb/trunk/source/Commands/CommandObjectLog.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectLog.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectLog.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectLog.cpp Tue Jun 15 14:49:27 2010
@@ -15,12 +15,12 @@
 // Project includes
 #include "lldb/lldb-private-log.h"
 
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/FileSpec.h"
 #include "lldb/Core/Log.h"
 #include "lldb/Core/Module.h"
-#include "lldb/Core/Options.h"
+#include "lldb/Interpreter/Options.h"
 #include "lldb/Core/RegularExpression.h"
 #include "lldb/Core/Stream.h"
 #include "lldb/Core/StreamFile.h"

Modified: lldb/trunk/source/Commands/CommandObjectMemory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectMemory.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectMemory.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectMemory.cpp Tue Jun 15 14:49:27 2010
@@ -13,10 +13,10 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 #include "lldb/Core/DataBufferHeap.h"
 #include "lldb/Core/DataExtractor.h"
-#include "lldb/Core/Options.h"
+#include "lldb/Interpreter/Options.h"
 #include "lldb/Core/StreamString.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
 #include "lldb/Interpreter/CommandContext.h"

Modified: lldb/trunk/source/Commands/CommandObjectMultiword.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectMultiword.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectMultiword.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectMultiword.cpp Tue Jun 15 14:49:27 2010
@@ -14,7 +14,7 @@
 // Project includes
 #include "lldb/Interpreter/CommandContext.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
-#include "lldb/Core/Options.h"
+#include "lldb/Interpreter/Options.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
 
 using namespace lldb;

Modified: lldb/trunk/source/Commands/CommandObjectProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectProcess.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectProcess.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectProcess.cpp Tue Jun 15 14:49:27 2010
@@ -13,8 +13,8 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "lldb/Core/Args.h"
-#include "lldb/Core/Options.h"
+#include "lldb/Interpreter/Args.h"
+#include "lldb/Interpreter/Options.h"
 #include "lldb/Core/State.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/CommandReturnObject.h"

Modified: lldb/trunk/source/Commands/CommandObjectRegister.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectRegister.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectRegister.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectRegister.cpp Tue Jun 15 14:49:27 2010
@@ -13,7 +13,7 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 #include "lldb/Core/DataExtractor.h"
 #include "lldb/Core/Scalar.h"
 #include "lldb/Interpreter/CommandContext.h"

Modified: lldb/trunk/source/Commands/CommandObjectSource.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectSource.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectSource.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectSource.cpp Tue Jun 15 14:49:27 2010
@@ -13,7 +13,7 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 #include "lldb/Interpreter/CommandContext.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/CommandReturnObject.h"

Modified: lldb/trunk/source/Commands/CommandObjectSourceFile.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectSourceFile.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectSourceFile.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectSourceFile.cpp Tue Jun 15 14:49:27 2010
@@ -13,7 +13,7 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 #include "lldb/Interpreter/CommandContext.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/CommandReturnObject.h"

Modified: lldb/trunk/source/Commands/CommandObjectSourceFile.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectSourceFile.h?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectSourceFile.h (original)
+++ lldb/trunk/source/Commands/CommandObjectSourceFile.h Tue Jun 15 14:49:27 2010
@@ -15,7 +15,7 @@
 // Other libraries and framework includes
 // Project includes
 #include "lldb/Interpreter/CommandObject.h"
-#include "lldb/Core/Options.h"
+#include "lldb/Interpreter/Options.h"
 #include "lldb/Core/FileSpec.h"
 
 namespace lldb_private {

Modified: lldb/trunk/source/Commands/CommandObjectSyntax.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectSyntax.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectSyntax.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectSyntax.cpp Tue Jun 15 14:49:27 2010
@@ -13,8 +13,8 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "lldb/Core/Args.h"
-#include "lldb/Core/Options.h"
+#include "lldb/Interpreter/Args.h"
+#include "lldb/Interpreter/Options.h"
 
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/CommandReturnObject.h"

Modified: lldb/trunk/source/Commands/CommandObjectTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectTarget.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectTarget.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectTarget.cpp Tue Jun 15 14:49:27 2010
@@ -15,7 +15,7 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/Timer.h"
 #include "lldb/Interpreter/CommandContext.h"

Modified: lldb/trunk/source/Commands/CommandObjectTarget.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectTarget.h?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectTarget.h (original)
+++ lldb/trunk/source/Commands/CommandObjectTarget.h Tue Jun 15 14:49:27 2010
@@ -14,7 +14,7 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "lldb/Core/Options.h"
+#include "lldb/Interpreter/Options.h"
 #include "lldb/Core/ArchSpec.h"
 #include "lldb/Interpreter/CommandObjectMultiword.h"
 

Modified: lldb/trunk/source/Commands/CommandObjectThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectThread.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectThread.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectThread.cpp Tue Jun 15 14:49:27 2010
@@ -13,7 +13,7 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "lldb/Core/Options.h"
+#include "lldb/Interpreter/Options.h"
 #include "lldb/Core/State.h"
 #include "lldb/Core/SourceManager.h"
 

Modified: lldb/trunk/source/Commands/CommandObjectTranslate.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectTranslate.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectTranslate.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectTranslate.cpp Tue Jun 15 14:49:27 2010
@@ -13,8 +13,8 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "lldb/Core/Args.h"
-#include "lldb/Core/Options.h"
+#include "lldb/Interpreter/Args.h"
+#include "lldb/Interpreter/Options.h"
 
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/CommandReturnObject.h"

Modified: lldb/trunk/source/Commands/CommandObjectVariable.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectVariable.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectVariable.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectVariable.cpp Tue Jun 15 14:49:27 2010
@@ -13,7 +13,7 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "lldb/Core/Options.h"
+#include "lldb/Interpreter/Options.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/StreamFile.h"
 #include "lldb/Core/Value.h"

Removed: lldb/trunk/source/Core/Args.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Args.cpp?rev=106033&view=auto
==============================================================================
--- lldb/trunk/source/Core/Args.cpp (original)
+++ lldb/trunk/source/Core/Args.cpp (removed)
@@ -1,1103 +0,0 @@
-//===-- Args.cpp ------------------------------------------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// C Includes
-#include <getopt.h>
-#include <cstdlib>
-// C++ Includes
-// Other libraries and framework includes
-// Project includes
-#include "lldb/Core/Args.h"
-#include "lldb/Core/Stream.h"
-#include "lldb/Core/StreamFile.h"
-#include "lldb/Core/StreamString.h"
-#include "lldb/Core/Options.h"
-#include "lldb/Interpreter/CommandReturnObject.h"
-
-using namespace lldb;
-using namespace lldb_private;
-
-static const char *k_space_characters = "\t\n\v\f\r ";
-static const char *k_space_characters_with_slash = "\t\n\v\f\r \\";
-
-
-//----------------------------------------------------------------------
-// Args constructor
-//----------------------------------------------------------------------
-Args::Args (const char *command) :
-    m_args(),
-    m_argv()
-{
-    SetCommandString (command);
-}
-
-
-Args::Args (const char *command, size_t len) :
-    m_args(),
-    m_argv()
-{
-    SetCommandString (command, len);
-}
-
-
-
-//----------------------------------------------------------------------
-// Destructor
-//----------------------------------------------------------------------
-Args::~Args ()
-{
-}
-
-void
-Args::Dump (Stream *s)
-{
-//    int argc = GetArgumentCount();
-//
-//    arg_sstr_collection::const_iterator pos, begin = m_args.begin(), end = m_args.end();
-//    for (pos = m_args.begin(); pos != end; ++pos)
-//    {
-//        s->Indent();
-//        s->Printf("args[%zu]=%s\n", std::distance(begin, pos), pos->c_str());
-//    }
-//    s->EOL();
-    const int argc = m_argv.size();
-    for (int i=0; i<argc; ++i)
-    {
-        s->Indent();
-        const char *arg_cstr = m_argv[i];
-        if (arg_cstr)
-            s->Printf("argv[%i]=\"%s\"\n", i, arg_cstr);
-        else
-            s->Printf("argv[%i]=NULL\n", i);
-    }
-    s->EOL();
-}
-
-bool
-Args::GetCommandString (std::string &command)
-{
-    command.clear();
-    int argc = GetArgumentCount();
-    for (int i=0; i<argc; ++i)
-    {
-        if (i > 0)
-            command += ' ';
-        command += m_argv[i];
-    }
-    return argc > 0;
-}
-
-void
-Args::SetCommandString (const char *command, size_t len)
-{
-    // Use std::string to make sure we get a NULL terminated string we can use
-    // as "command" could point to a string within a large string....
-    std::string null_terminated_command(command, len);
-    SetCommandString(null_terminated_command.c_str());
-}
-
-void
-Args::SetCommandString (const char *command)
-{
-    m_args.clear();
-    m_argv.clear();
-    if (command && command[0])
-    {
-        const char *arg_start;
-        const char *next_arg_start;
-        for (arg_start = command, next_arg_start = NULL;
-             arg_start && arg_start[0];
-             arg_start = next_arg_start, next_arg_start = NULL)
-        {
-            // Skip any leading space characters
-            arg_start = ::strspn (arg_start, k_space_characters) + arg_start;
-
-            // If there were only space characters to the end of the line, then
-            // we're done.
-            if (*arg_start == '\0')
-                break;
-
-            std::string arg;
-            const char *arg_end = NULL;
-
-            switch (*arg_start)
-            {
-            case '\'':
-            case '"':
-            case '`':
-                {
-                    // Look for either a quote character, or the backslash
-                    // character
-                    const char quote_char = *arg_start;
-                    char find_chars[3] = { quote_char, '\\' , '\0'};
-                    bool is_backtick = (quote_char == '`');
-                    if (quote_char == '"' || quote_char == '`')
-                        m_args_quote_char.push_back(quote_char);
-                    else
-                        m_args_quote_char.push_back('\0');
-
-                    while (*arg_start != '\0')
-                    {
-                        arg_end = ::strcspn (arg_start + 1, find_chars) + arg_start + 1;
-
-                        if (*arg_end == '\0')
-                        {
-                            arg.append (arg_start);
-                            break;
-                        }
-
-                        // Watch out for quote characters prefixed with '\'
-                        if (*arg_end == '\\')
-                        {
-                            if (arg_end[1] == quote_char)
-                            {
-                                // The character following the '\' is our quote
-                                // character so strip the backslash character
-                                arg.append (arg_start, arg_end);
-                            }
-                            else
-                            {
-                                // The character following the '\' is NOT our
-                                // quote character, so include the backslash
-                                // and continue
-                                arg.append (arg_start, arg_end + 1);
-                            }
-                            arg_start = arg_end + 1;
-                            continue;
-                        }
-                        else
-                        {
-                            arg.append (arg_start, arg_end + 1);
-                            next_arg_start = arg_end + 1;
-                            break;
-                        }
-                    }
-
-                    // Skip single and double quotes, but leave backtick quotes
-                    if (!is_backtick)
-                    {
-                        char first_c = arg[0];
-                        arg.erase(0,1);
-                        // Only erase the last character if it is the same as the first.
-                        // Otherwise, we're parsing an incomplete command line, and we
-                        // would be stripping off the last character of that string.
-                        if (arg[arg.size() - 1] == first_c)
-                            arg.erase(arg.size() - 1, 1);
-                    }
-                }
-                break;
-            default:
-                {
-                    m_args_quote_char.push_back('\0');
-                    // Look for the next non-escaped space character
-                    while (*arg_start != '\0')
-                    {
-                        arg_end = ::strcspn (arg_start, k_space_characters_with_slash) + arg_start;
-
-                        if (arg_end == NULL)
-                        {
-                            arg.append(arg_start);
-                            break;
-                        }
-
-                        if (*arg_end == '\\')
-                        {
-                            // Append up to the '\' char
-                            arg.append (arg_start, arg_end);
-
-                            if (arg_end[1] == '\0')
-                                break;
-
-                            // Append the character following the '\' if it isn't
-                            // the end of the string
-                            arg.append (1, arg_end[1]);
-                            arg_start = arg_end + 2;
-                            continue;
-                        }
-                        else
-                        {
-                            arg.append (arg_start, arg_end);
-                            next_arg_start = arg_end;
-                            break;
-                        }
-                    }
-                }
-                break;
-            }
-
-            m_args.push_back(arg);
-        }
-    }
-    UpdateArgvFromArgs();
-}
-
-void
-Args::UpdateArgsAfterOptionParsing()
-{
-    // Now m_argv might be out of date with m_args, so we need to fix that
-    arg_cstr_collection::const_iterator argv_pos, argv_end = m_argv.end();
-    arg_sstr_collection::iterator args_pos;
-    arg_quote_char_collection::iterator quotes_pos;
-
-    for (argv_pos = m_argv.begin(), args_pos = m_args.begin(), quotes_pos = m_args_quote_char.begin();
-         argv_pos != argv_end && args_pos != m_args.end();
-         ++argv_pos)
-    {
-        const char *argv_cstr = *argv_pos;
-        if (argv_cstr == NULL)
-            break;
-
-        while (args_pos != m_args.end())
-        {
-            const char *args_cstr = args_pos->c_str();
-            if (args_cstr == argv_cstr)
-            {
-                // We found the argument that matches the C string in the
-                // vector, so we can now look for the next one
-                ++args_pos;
-                ++quotes_pos;
-                break;
-            }
-            else
-            {
-                quotes_pos = m_args_quote_char.erase (quotes_pos);
-                args_pos = m_args.erase (args_pos);
-            }
-        }
-    }
-
-    if (args_pos != m_args.end())
-        m_args.erase (args_pos, m_args.end());
-
-    if (quotes_pos != m_args_quote_char.end())
-        m_args_quote_char.erase (quotes_pos, m_args_quote_char.end());
-}
-
-void
-Args::UpdateArgvFromArgs()
-{
-    m_argv.clear();
-    arg_sstr_collection::const_iterator pos, end = m_args.end();
-    for (pos = m_args.begin(); pos != end; ++pos)
-        m_argv.push_back(pos->c_str());
-    m_argv.push_back(NULL);
-}
-
-size_t
-Args::GetArgumentCount() const
-{
-    if (m_argv.empty())
-        return 0;
-    return m_argv.size() - 1;
-}
-
-const char *
-Args::GetArgumentAtIndex (size_t idx) const
-{
-    if (idx < m_argv.size())
-        return m_argv[idx];
-    return NULL;
-}
-
-char
-Args::GetArgumentQuoteCharAtIndex (size_t idx) const
-{
-    if (idx < m_args_quote_char.size())
-        return m_args_quote_char[idx];
-    return '\0';
-}
-
-char **
-Args::GetArgumentVector()
-{
-    if (!m_argv.empty())
-        return (char **)&m_argv[0];
-    return NULL;
-}
-
-const char **
-Args::GetConstArgumentVector() const
-{
-    if (!m_argv.empty())
-        return (const char **)&m_argv[0];
-    return NULL;
-}
-
-void
-Args::Shift ()
-{
-    // Don't pop the last NULL terminator from the argv array
-    if (m_argv.size() > 1)
-    {
-        m_argv.erase(m_argv.begin());
-        m_args.pop_front();
-        m_args_quote_char.erase(m_args_quote_char.begin());
-    }
-}
-
-const char *
-Args::Unshift (const char *arg_cstr, char quote_char)
-{
-    m_args.push_front(arg_cstr);
-    m_argv.insert(m_argv.begin(), m_args.front().c_str());
-    m_args_quote_char.insert(m_args_quote_char.begin(), quote_char);
-    return GetArgumentAtIndex (0);
-}
-
-void
-Args::AppendArguments (const Args &rhs)
-{
-    const size_t rhs_argc = rhs.GetArgumentCount();
-    for (size_t i=0; i<rhs_argc; ++i)
-        AppendArgument(rhs.GetArgumentAtIndex(i));
-}
-
-const char *
-Args::AppendArgument (const char *arg_cstr, char quote_char)
-{
-    return InsertArgumentAtIndex (GetArgumentCount(), arg_cstr, quote_char);
-}
-
-const char *
-Args::InsertArgumentAtIndex (size_t idx, const char *arg_cstr, char quote_char)
-{
-    // Since we are using a std::list to hold onto the copied C string and
-    // we don't have direct access to the elements, we have to iterate to
-    // find the value.
-    arg_sstr_collection::iterator pos, end = m_args.end();
-    size_t i = idx;
-    for (pos = m_args.begin(); i > 0 && pos != end; ++pos)
-        --i;
-
-    pos = m_args.insert(pos, arg_cstr);
-    
-
-    m_args_quote_char.insert(m_args_quote_char.begin() + idx, quote_char);
-    
-    UpdateArgvFromArgs();
-    return GetArgumentAtIndex(idx);
-}
-
-const char *
-Args::ReplaceArgumentAtIndex (size_t idx, const char *arg_cstr, char quote_char)
-{
-    // Since we are using a std::list to hold onto the copied C string and
-    // we don't have direct access to the elements, we have to iterate to
-    // find the value.
-    arg_sstr_collection::iterator pos, end = m_args.end();
-    size_t i = idx;
-    for (pos = m_args.begin(); i > 0 && pos != end; ++pos)
-        --i;
-
-    if (pos != end)
-    {
-        pos->assign(arg_cstr);
-        assert(idx < m_argv.size() - 1);
-        m_argv[idx] = pos->c_str();
-        m_args_quote_char[idx] = quote_char;
-        return GetArgumentAtIndex(idx);
-    }
-    return NULL;
-}
-
-void
-Args::DeleteArgumentAtIndex (size_t idx)
-{
-    // Since we are using a std::list to hold onto the copied C string and
-    // we don't have direct access to the elements, we have to iterate to
-    // find the value.
-    arg_sstr_collection::iterator pos, end = m_args.end();
-    size_t i = idx;
-    for (pos = m_args.begin(); i > 0 && pos != end; ++pos)
-        --i;
-
-    if (pos != end)
-    {
-        m_args.erase (pos);
-        assert(idx < m_argv.size() - 1);
-        m_argv.erase(m_argv.begin() + idx);
-        m_args_quote_char.erase(m_args_quote_char.begin() + idx);
-    }
-}
-
-void
-Args::SetArguments (int argc, const char **argv)
-{
-    // m_argv will be rebuilt in UpdateArgvFromArgs() below, so there is
-    // no need to clear it here.
-    m_args.clear();
-    m_args_quote_char.clear();
-
-    // Make a copy of the arguments in our internal buffer
-    size_t i;
-    // First copy each string
-    for (i=0; i<argc; ++i)
-    {
-        m_args.push_back (argv[i]);
-        if ((argv[i][0] == '"') || (argv[i][0] == '`'))
-            m_args_quote_char.push_back (argv[i][0]);
-        else
-            m_args_quote_char.push_back ('\0');
-    }
-
-    UpdateArgvFromArgs();
-}
-
-
-Error
-Args::ParseOptions (Options &options)
-{
-    StreamString sstr;
-    int i;
-    Error error;
-    struct option *long_options = options.GetLongOptions();
-    if (long_options == NULL)
-    {
-        error.SetErrorStringWithFormat("Invalid long options.\n");
-        return error;
-    }
-
-    for (i=0; long_options[i].name != NULL; ++i)
-    {
-        if (long_options[i].flag == NULL)
-        {
-            sstr << (char)long_options[i].val;
-            switch (long_options[i].has_arg)
-            {
-            default:
-            case no_argument:                       break;
-            case required_argument: sstr << ':';    break;
-            case optional_argument: sstr << "::";   break;
-            }
-        }
-    }
-#ifdef __GLIBC__
-    optind = 0;
-#else
-    optreset = 1;
-    optind = 1;
-#endif
-    int val;
-    while (1)
-    {
-        int long_options_index = -1;
-        val = ::getopt_long(GetArgumentCount(), GetArgumentVector(), sstr.GetData(), long_options,
-                            &long_options_index);
-        if (val == -1)
-            break;
-
-        // Did we get an error?
-        if (val == '?')
-        {
-            error.SetErrorStringWithFormat("Unknown or ambiguous option.\n");
-            break;
-        }
-        // The option auto-set itself
-        if (val == 0)
-            continue;
-
-        ((Options *) &options)->OptionSeen (val);
-
-        // Lookup the long option index
-        if (long_options_index == -1)
-        {
-            for (int i=0;
-                 long_options[i].name || long_options[i].has_arg || long_options[i].flag || long_options[i].val;
-                 ++i)
-            {
-                if (long_options[i].val == val)
-                {
-                    long_options_index = i;
-                    break;
-                }
-            }
-        }
-        // Call the callback with the option
-        if (long_options_index >= 0)
-        {
-            error = options.SetOptionValue(long_options_index,
-                                           long_options[long_options_index].has_arg == no_argument ? NULL : optarg);
-        }
-        else
-        {
-            error.SetErrorStringWithFormat("Invalid option with value '%i'.\n", val);
-        }
-        if (error.Fail())
-            break;
-    }
-
-    // Update our ARGV now that get options has consumed all the options
-    m_argv.erase(m_argv.begin(), m_argv.begin() + optind);
-    UpdateArgsAfterOptionParsing ();
-    return error;
-}
-
-void
-Args::Clear ()
-{
-    m_args.clear ();
-    m_argv.clear ();
-    m_args_quote_char.clear();
-}
-
-int32_t
-Args::StringToSInt32 (const char *s, int32_t fail_value, int base, bool *success_ptr)
-{
-    if (s && s[0])
-    {
-        char *end = NULL;
-        int32_t uval = ::strtol (s, &end, base);
-        if (*end == '\0')
-        {
-            if (success_ptr) *success_ptr = true;
-            return uval; // All characters were used, return the result
-        }
-    }
-    if (success_ptr) *success_ptr = false;
-    return fail_value;
-}
-
-uint32_t
-Args::StringToUInt32 (const char *s, uint32_t fail_value, int base, bool *success_ptr)
-{
-    if (s && s[0])
-    {
-        char *end = NULL;
-        uint32_t uval = ::strtoul (s, &end, base);
-        if (*end == '\0')
-        {
-            if (success_ptr) *success_ptr = true;
-            return uval; // All characters were used, return the result
-        }
-    }
-    if (success_ptr) *success_ptr = false;
-    return fail_value;
-}
-
-
-int64_t
-Args::StringToSInt64 (const char *s, int64_t fail_value, int base, bool *success_ptr)
-{
-    if (s && s[0])
-    {
-        char *end = NULL;
-        int64_t uval = ::strtoll (s, &end, base);
-        if (*end == '\0')
-        {
-            if (success_ptr) *success_ptr = true;
-            return uval; // All characters were used, return the result
-        }
-    }
-    if (success_ptr) *success_ptr = false;
-    return fail_value;
-}
-
-uint64_t
-Args::StringToUInt64 (const char *s, uint64_t fail_value, int base, bool *success_ptr)
-{
-    if (s && s[0])
-    {
-        char *end = NULL;
-        uint64_t uval = ::strtoull (s, &end, base);
-        if (*end == '\0')
-        {
-            if (success_ptr) *success_ptr = true;
-            return uval; // All characters were used, return the result
-        }
-    }
-    if (success_ptr) *success_ptr = false;
-    return fail_value;
-}
-
-lldb::addr_t
-Args::StringToAddress (const char *s, lldb::addr_t fail_value, bool *success_ptr)
-{
-    if (s && s[0])
-    {
-        char *end = NULL;
-        lldb::addr_t addr = ::strtoull (s, &end, 0);
-        if (*end == '\0')
-        {
-            if (success_ptr) *success_ptr = true;
-            return addr; // All characters were used, return the result
-        }
-        // Try base 16 with no prefix...
-        addr = ::strtoull (s, &end, 16);
-        if (*end == '\0')
-        {
-            if (success_ptr) *success_ptr = true;
-            return addr; // All characters were used, return the result
-        }
-    }
-    if (success_ptr) *success_ptr = false;
-    return fail_value;
-}
-
-bool
-Args::StringToBoolean (const char *s, bool fail_value, bool *success_ptr)
-{
-    if (s && s[0])
-    {
-        if (::strcasecmp (s, "false") == 0 ||
-            ::strcasecmp (s, "off") == 0 ||
-            ::strcasecmp (s, "no") == 0 ||
-                ::strcmp (s, "0") == 0)
-        {
-            if (success_ptr)
-                *success_ptr = true;
-            return false;
-        }
-        else
-        if (::strcasecmp (s, "true") == 0 ||
-            ::strcasecmp (s, "on") == 0 ||
-            ::strcasecmp (s, "yes") == 0 ||
-                ::strcmp (s, "1") == 0)
-        {
-            if (success_ptr) *success_ptr = true;
-            return true;
-        }
-    }
-    if (success_ptr) *success_ptr = false;
-    return fail_value;
-}
-
-int32_t
-Args::StringToOptionEnum (const char *s, lldb::OptionEnumValueElement *enum_values, int32_t fail_value, bool *success_ptr)
-{    
-    if (enum_values && s && s[0])
-    {
-        for (int i = 0; enum_values[i].string_value != NULL ; i++) 
-        {
-            if (strstr(enum_values[i].string_value, s) == enum_values[i].string_value)
-            {
-                if (success_ptr) *success_ptr = true;
-                return enum_values[i].value;
-            }
-        }
-    }
-    if (success_ptr) *success_ptr = false;
-    
-    return fail_value;
-}
-
-ScriptLanguage
-Args::StringToScriptLanguage (const char *s, ScriptLanguage fail_value, bool *success_ptr)
-{
-    if (s && s[0])
-    {
-        if ((::strcasecmp (s, "python") == 0) ||
-            (::strcasecmp (s, "default") == 0 && eScriptLanguagePython == eScriptLanguageDefault))
-        {
-            if (success_ptr) *success_ptr = true;
-            return eScriptLanguagePython;
-        }
-        if (::strcasecmp (s, "none"))
-        {
-            if (success_ptr) *success_ptr = true;
-            return eScriptLanguageNone;
-        }
-    }
-    if (success_ptr) *success_ptr = false;
-    return fail_value;
-}
-
-Error
-Args::StringToFormat
-(
-    const char *s,
-    lldb::Format &format
-)
-{
-    format = eFormatInvalid;
-    Error error;
-
-    if (s && s[0])
-    {
-        switch (s[0])
-        {
-        case 'y': format = eFormatBytes;            break;
-        case 'Y': format = eFormatBytesWithASCII;   break;
-        case 'b': format = eFormatBinary;           break;
-        case 'B': format = eFormatBoolean;          break;
-        case 'c': format = eFormatChar;             break;
-        case 'C': format = eFormatCharPrintable;    break;
-        case 'o': format = eFormatOctal;            break;
-        case 'i':
-        case 'd': format = eFormatDecimal;          break;
-        case 'u': format = eFormatUnsigned;         break;
-        case 'x': format = eFormatHex;              break;
-        case 'f':
-        case 'e':
-        case 'g': format = eFormatFloat;            break;
-        case 'p': format = eFormatPointer;          break;
-        case 's': format = eFormatCString;          break;
-        default:
-            error.SetErrorStringWithFormat("Invalid format character '%c'. Valid values are:\n"
-                                            "  b - binary\n"
-                                            "  B - boolean\n"
-                                            "  c - char\n"
-                                            "  C - printable char\n"
-                                            "  d - signed decimal\n"
-                                            "  e - float\n"
-                                            "  f - float\n"
-                                            "  g - float\n"
-                                            "  i - signed decimal\n"
-                                            "  o - octal\n"
-                                            "  s - c-string\n"
-                                            "  u - unsigned decimal\n"
-                                            "  x - hex\n"
-                                            "  y - bytes\n"
-                                            "  Y - bytes with ASCII\n", s[0]);
-            break;
-        }
-
-        if (error.Fail())
-            return error;
-    }
-    else
-    {
-        error.SetErrorStringWithFormat("%s option string.\n", s ? "empty" : "invalid");
-    }
-    return error;
-}
-
-void
-Args::LongestCommonPrefix (std::string &common_prefix)
-{
-    arg_sstr_collection::iterator pos, end = m_args.end();
-    pos = m_args.begin();
-    if (pos == end)
-        common_prefix.clear();
-    else
-        common_prefix = (*pos);
-
-    for (++pos; pos != end; ++pos)
-    {
-        int new_size = (*pos).size();
-
-        // First trim common_prefix if it is longer than the current element:
-        if (common_prefix.size() > new_size)
-            common_prefix.erase (new_size);
-
-        // Then trim it at the first disparity:
-
-        for (int i = 0; i < common_prefix.size(); i++)
-        {
-            if ((*pos)[i]  != common_prefix[i])
-            {
-                common_prefix.erase(i);
-                break;
-            }
-        }
-
-        // If we've emptied the common prefix, we're done.
-        if (common_prefix.empty())
-            break;
-    }
-}
-
-void
-Args::ParseAliasOptions
-(
-    Options &options,
-    CommandReturnObject &result,
-    OptionArgVector *option_arg_vector
-)
-{
-    StreamString sstr;
-    int i;
-    struct option *long_options = options.GetLongOptions();
-
-    if (long_options == NULL)
-    {
-        result.AppendError ("invalid long options");
-        result.SetStatus (eReturnStatusFailed);
-        return;
-    }
-
-    for (i = 0; long_options[i].name != NULL; ++i)
-    {
-        if (long_options[i].flag == NULL)
-        {
-            sstr << (char) long_options[i].val;
-            switch (long_options[i].has_arg)
-            {
-                default:
-                case no_argument:
-                    break;
-                case required_argument:
-                    sstr << ":";
-                    break;
-                case optional_argument:
-                    sstr << "::";
-                    break;
-            }
-        }
-    }
-
-#ifdef __GLIBC__
-    optind = 0;
-#else
-    optreset = 1;
-    optind = 1;
-#endif
-    int val;
-    while (1)
-    {
-        int long_options_index = -1;
-        val = ::getopt_long (GetArgumentCount(), GetArgumentVector(), sstr.GetData(), long_options,
-                             &long_options_index);
-
-        if (val == -1)
-            break;
-
-        if (val == '?')
-        {
-            result.AppendError ("unknown or ambiguous option");
-            result.SetStatus (eReturnStatusFailed);
-            break;
-        }
-
-        if (val == 0)
-            continue;
-
-        ((Options *) &options)->OptionSeen (val);
-
-        // Look up the long option index
-        if (long_options_index == -1)
-        {
-            for (int j = 0;
-                 long_options[j].name || long_options[j].has_arg || long_options[j].flag || long_options[j].val;
-                 ++j)
-            {
-                if (long_options[j].val == val)
-                {
-                    long_options_index = j;
-                    break;
-                }
-            }
-        }
-
-        // See if the option takes an argument, and see if one was supplied.
-        if (long_options_index >= 0)
-        {
-            StreamString option_str;
-            option_str.Printf ("-%c", (char) val);
-
-            switch (long_options[long_options_index].has_arg)
-            {
-            case no_argument:
-                option_arg_vector->push_back (OptionArgPair (std::string (option_str.GetData()), "<no-argument>"));
-                break;
-            case required_argument:
-                if (optarg != NULL)
-                {
-                    option_arg_vector->push_back (OptionArgPair (std::string (option_str.GetData()),
-                                                                 std::string (optarg)));
-                    result.SetStatus (eReturnStatusSuccessFinishNoResult);
-                }
-                else
-                {
-                    result.AppendErrorWithFormat ("Option '%s' is missing argument specifier.\n",
-                                                 option_str.GetData());
-                    result.SetStatus (eReturnStatusFailed);
-                }
-                break;
-            case optional_argument:
-                if (optarg != NULL)
-                {
-                    option_arg_vector->push_back (OptionArgPair (std::string (option_str.GetData()),
-                                                                 std::string (optarg)));
-                    result.SetStatus (eReturnStatusSuccessFinishNoResult);
-                }
-                else
-                {
-                    option_arg_vector->push_back (OptionArgPair (std::string (option_str.GetData()),
-                                                                 "<no-argument>"));
-                    result.SetStatus (eReturnStatusSuccessFinishNoResult);
-                }
-                break;
-            default:
-                result.AppendErrorWithFormat
-                ("error with options table; invalid value in has_arg field for option '%c'.\n",
-                 (char) val);
-                result.SetStatus (eReturnStatusFailed);
-                break;
-            }
-        }
-        else
-        {
-            result.AppendErrorWithFormat ("Invalid option with value '%c'.\n", (char) val);
-            result.SetStatus (eReturnStatusFailed);
-        }
-        if (!result.Succeeded())
-            break;
-    }
-}
-
-void
-Args::ParseArgsForCompletion
-(
-    Options &options,
-    OptionElementVector &option_element_vector
-)
-{
-    StreamString sstr;
-    int i;
-    struct option *long_options = options.GetLongOptions();
-    option_element_vector.clear();
-
-    if (long_options == NULL)
-    {
-        return;
-    }
-
-    // Leading : tells getopt to return a : for a missing option argument AND
-    // to suppress error messages.
-
-    sstr << ":";
-    for (i = 0; long_options[i].name != NULL; ++i)
-    {
-        if (long_options[i].flag == NULL)
-        {
-            sstr << (char) long_options[i].val;
-            switch (long_options[i].has_arg)
-            {
-                default:
-                case no_argument:
-                    break;
-                case required_argument:
-                    sstr << ":";
-                    break;
-                case optional_argument:
-                    sstr << "::";
-                    break;
-            }
-        }
-    }
-
-#ifdef __GLIBC__
-    optind = 0;
-#else
-    optreset = 1;
-    optind = 1;
-#endif
-    opterr = 0;
-
-    int val;
-    const OptionDefinition *opt_defs = options.GetDefinitions();
-
-    // Fooey... getopt_long permutes the GetArgumentVector for no apparent reason.
-    // So we have to build another Arg and pass that to getopt_long so it doesn't
-    // screw up the one we have.
-
-    std::vector<const char *> dummy_vec(GetArgumentVector(), GetArgumentVector() + GetArgumentCount() + 1);
-
-    while (1)
-    {
-        bool missing_argument = false;
-        int parse_start = optind;
-        int long_options_index = -1;
-        val = ::getopt_long (dummy_vec.size() - 1,(char *const *) dummy_vec.data(), sstr.GetData(), long_options,
-                             &long_options_index);
-
-        if (val == -1)
-            break;
-
-        else if (val == '?')
-        {
-            option_element_vector.push_back (OptionArgElement (-1, parse_start, -1));
-            continue;
-        }
-        else if (val == 0)
-        {
-            continue;
-        }
-        else if (val == ':')
-        {
-            // This is a missing argument.
-            val = optopt;
-            missing_argument = true;
-        }
-
-        ((Options *) &options)->OptionSeen (val);
-
-        // Look up the long option index
-        if (long_options_index == -1)
-        {
-            for (int j = 0;
-                 long_options[j].name || long_options[j].has_arg || long_options[j].flag || long_options[j].val;
-                 ++j)
-            {
-                if (long_options[j].val == val)
-                {
-                    long_options_index = j;
-                    break;
-                }
-            }
-        }
-
-        // See if the option takes an argument, and see if one was supplied.
-        if (long_options_index >= 0)
-        {
-            int opt_defs_index = -1;
-            for (int i = 0; ; i++)
-            {
-                if (opt_defs[i].short_option == 0)
-                    break;
-                else if (opt_defs[i].short_option == val)
-                {
-                    opt_defs_index = i;
-                    break;
-                }
-            }
-
-            switch (long_options[long_options_index].has_arg)
-            {
-            case no_argument:
-                option_element_vector.push_back (OptionArgElement (opt_defs_index, parse_start, 0));
-                break;
-            case required_argument:
-                if (optarg != NULL)
-                {
-                    int arg_index;
-                    if (missing_argument)
-                        arg_index = -1;
-                    else
-                        arg_index = parse_start + 1;
-
-                    option_element_vector.push_back (OptionArgElement (opt_defs_index, parse_start, arg_index));
-                }
-                else
-                {
-                    option_element_vector.push_back (OptionArgElement (opt_defs_index, parse_start, -1));
-                }
-                break;
-            case optional_argument:
-                if (optarg != NULL)
-                {
-                    option_element_vector.push_back (OptionArgElement (opt_defs_index, parse_start, 0));
-                }
-                else
-                {
-                    option_element_vector.push_back (OptionArgElement (opt_defs_index, parse_start, parse_start + 1));
-                }
-                break;
-            default:
-                // The options table is messed up.  Here we'll just continue
-                option_element_vector.push_back (OptionArgElement (-1, parse_start, -1));
-                break;
-            }
-        }
-        else
-        {
-            option_element_vector.push_back (OptionArgElement (-1, parse_start, -1));
-        }
-    }
-}

Modified: lldb/trunk/source/Core/ConnectionFileDescriptor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ConnectionFileDescriptor.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Core/ConnectionFileDescriptor.cpp (original)
+++ lldb/trunk/source/Core/ConnectionFileDescriptor.cpp Tue Jun 15 14:49:27 2010
@@ -25,7 +25,7 @@
 // Other libraries and framework includes
 // Project includes
 #include "lldb/lldb-private-log.h"
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 #include "lldb/Core/Communication.h"
 #include "lldb/Core/Log.h"
 #include "lldb/Core/RegularExpression.h"

Removed: lldb/trunk/source/Core/Options.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Options.cpp?rev=106033&view=auto
==============================================================================
--- lldb/trunk/source/Core/Options.cpp (original)
+++ lldb/trunk/source/Core/Options.cpp (removed)
@@ -1,734 +0,0 @@
-//===-- Options.cpp ---------------------------------------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "lldb/Core/Options.h"
-
-// C Includes
-// C++ Includes
-#include <bitset>
-
-// Other libraries and framework includes
-// Project includes
-#include "lldb/Interpreter/CommandObject.h"
-#include "lldb/Interpreter/CommandReturnObject.h"
-#include "lldb/Interpreter/CommandCompletions.h"
-#include "lldb/Interpreter/CommandInterpreter.h"
-#include "lldb/Core/StreamString.h"
-#include "lldb/Target/Target.h"
-
-using namespace lldb;
-using namespace lldb_private;
-
-//-------------------------------------------------------------------------
-// Options
-//-------------------------------------------------------------------------
-Options::Options () :
-    m_getopt_table ()
-{
-    BuildValidOptionSets();
-}
-
-Options::~Options ()
-{
-}
-
-
-void
-Options::ResetOptionValues ()
-{
-    m_seen_options.clear();
-}
-
-void
-Options::OptionSeen (int option_idx)
-{
-    m_seen_options.insert ((char) option_idx);
-}
-
-// Returns true is set_a is a subset of set_b;  Otherwise returns false.
-
-bool
-Options::IsASubset (const OptionSet& set_a, const OptionSet& set_b)
-{
-    bool is_a_subset = true;
-    OptionSet::const_iterator pos_a;
-    OptionSet::const_iterator pos_b;
-
-    // set_a is a subset of set_b if every member of set_a is also a member of set_b
-
-    for (pos_a = set_a.begin(); pos_a != set_a.end() && is_a_subset; ++pos_a)
-    {
-        pos_b = set_b.find(*pos_a);
-        if (pos_b == set_b.end())
-            is_a_subset = false;
-    }
-
-    return is_a_subset;
-}
-
-// Returns the set difference set_a - set_b, i.e. { x | ElementOf (x, set_a) && !ElementOf (x, set_b) }
-
-size_t
-Options::OptionsSetDiff (const OptionSet& set_a, const OptionSet& set_b, OptionSet& diffs)
-{
-    size_t num_diffs = 0;
-    OptionSet::const_iterator pos_a;
-    OptionSet::const_iterator pos_b;
-
-    for (pos_a = set_a.begin(); pos_a != set_a.end(); ++pos_a)
-    {
-        pos_b = set_b.find(*pos_a);
-        if (pos_b == set_b.end())
-        {
-            ++num_diffs;
-            diffs.insert(*pos_a);
-        }
-    }
-
-    return num_diffs;
-}
-
-// Returns the union of set_a and set_b.  Does not put duplicate members into the union.
-
-void
-Options::OptionsSetUnion (const OptionSet &set_a, const OptionSet &set_b, OptionSet &union_set)
-{
-    OptionSet::const_iterator pos;
-    OptionSet::iterator pos_union;
-
-    // Put all the elements of set_a into the union.
-
-    for (pos = set_a.begin(); pos != set_a.end(); ++pos)
-        union_set.insert(*pos);
-
-    // Put all the elements of set_b that are not already there into the union.
-    for (pos = set_b.begin(); pos != set_b.end(); ++pos)
-    {
-        pos_union = union_set.find(*pos);
-        if (pos_union == union_set.end())
-            union_set.insert(*pos);
-    }
-}
-
-bool
-Options::VerifyOptions (CommandReturnObject &result)
-{
-    bool options_are_valid = false;
-
-    int num_levels = m_required_options.size();
-    if (num_levels)
-    {
-        for (int i = 0; i < num_levels && !options_are_valid; ++i)
-        {
-            // This is the correct set of options if:  1). m_seen_options contains all of m_required_options[i]
-            // (i.e. all the required options at this level are a subset of m_seen_options); AND
-            // 2). { m_seen_options - m_required_options[i] is a subset of m_options_options[i] (i.e. all the rest of
-            // m_seen_options are in the set of optional options at this level.
-
-            // Check to see if all of m_required_options[i] are a subset of m_seen_options
-            if (IsASubset (m_required_options[i], m_seen_options))
-            {
-                // Construct the set difference: remaining_options = {m_seen_options} - {m_required_options[i]}
-                OptionSet remaining_options;
-                OptionsSetDiff (m_seen_options, m_required_options[i], remaining_options);
-                // Check to see if remaining_options is a subset of m_optional_options[i]
-                if (IsASubset (remaining_options, m_optional_options[i]))
-                    options_are_valid = true;
-            }
-        }
-    }
-    else
-    {
-        options_are_valid = true;
-    }
-
-    if (options_are_valid)
-    {
-        result.SetStatus (eReturnStatusSuccessFinishNoResult);
-    }
-    else
-    {
-        result.AppendError ("invalid combination of options for the given command");
-        result.SetStatus (eReturnStatusFailed);
-    }
-
-    return options_are_valid;
-}
-
-// This is called in the Options constructor, though we could call it lazily if that ends up being
-// a performance problem.
-
-void
-Options::BuildValidOptionSets ()
-{
-    // Check to see if we already did this.
-    if (m_required_options.size() != 0)
-        return;
-
-    // Check to see if there are any options.
-    int num_options = NumCommandOptions ();
-    if (num_options == 0)
-        return;
-
-    const lldb::OptionDefinition *full_options_table = GetDefinitions();
-    m_required_options.resize(1);
-    m_optional_options.resize(1);
-    
-    // First count the number of option sets we've got.  Ignore LLDB_ALL_OPTION_SETS...
-    
-    uint32_t num_option_sets = 0;
-    
-    for (int i = 0; i < num_options; i++)
-    {
-        uint32_t this_usage_mask = full_options_table[i].usage_mask;
-        if (this_usage_mask == LLDB_OPT_SET_ALL)
-        {
-            if (num_option_sets == 0)
-                num_option_sets = 1;
-        }
-        else
-        {
-            for (int j = 0; j < LLDB_MAX_NUM_OPTION_SETS; j++)
-            {
-                if (this_usage_mask & 1 << j)
-                {
-                    if (num_option_sets <= j)
-                        num_option_sets = j + 1;
-                }
-            }
-        }
-    }
-
-    if (num_option_sets > 0)
-    {
-        m_required_options.resize(num_option_sets);
-        m_optional_options.resize(num_option_sets);
-        
-        for (int i = 0; i < num_options; ++i)
-        {
-            for (int j = 0; j < num_option_sets; j++)
-            {
-                if (full_options_table[i].usage_mask & 1 << j)
-                {
-                    if (full_options_table[i].required)
-                        m_required_options[j].insert(full_options_table[i].short_option);
-                    else
-                        m_optional_options[j].insert(full_options_table[i].short_option);
-                }
-            }
-        }
-    }
-}
-
-uint32_t
-Options::NumCommandOptions ()
-{
-    const lldb::OptionDefinition *full_options_table = GetDefinitions ();
-    if (full_options_table == NULL) 
-        return 0;
-        
-    int i = 0;
-
-    if (full_options_table != NULL)
-    {
-        while (full_options_table[i].long_option != NULL)
-            ++i;
-    }
-
-    return i;
-}
-
-struct option *
-Options::GetLongOptions ()
-{
-    // Check to see if this has already been done.
-    if (m_getopt_table.empty())
-    {
-        // Check to see if there are any options.
-        const uint32_t num_options = NumCommandOptions();
-        if (num_options == 0)
-            return NULL;
-
-        uint32_t i;
-        uint32_t j;
-        const lldb::OptionDefinition *full_options_table = GetDefinitions();
-
-        std::bitset<256> option_seen;
-
-        m_getopt_table.resize(num_options + 1);
-        for (i = 0, j = 0; i < num_options; ++i)
-        {
-            char short_opt = full_options_table[i].short_option;
-
-            if (option_seen.test(short_opt) == false)
-            {
-                m_getopt_table[j].name    = full_options_table[i].long_option;
-                m_getopt_table[j].has_arg = full_options_table[i].option_has_arg;
-                m_getopt_table[j].flag    = NULL;
-                m_getopt_table[j].val     = full_options_table[i].short_option;
-                option_seen.set(short_opt);
-                ++j;
-            }
-        }
-
-        //getopt_long requires a NULL final entry in the table:
-
-        m_getopt_table[j].name    = NULL;
-        m_getopt_table[j].has_arg = 0;
-        m_getopt_table[j].flag    = NULL;
-        m_getopt_table[j].val     = 0;
-    }
-
-    return m_getopt_table.data();
-}
-
-
-// This function takes INDENT, which tells how many spaces to output at the front of each line; SPACES, which is
-// a string containing 80 spaces; and TEXT, which is the text that is to be output.   It outputs the text, on
-// multiple lines if necessary, to RESULT, with INDENT spaces at the front of each line.  It breaks lines on spaces,
-// tabs or newlines, shortening the line if necessary to not break in the middle of a word.  It assumes that each
-// output line should contain a maximum of OUTPUT_MAX_COLUMNS characters.
-
-
-void
-Options::OutputFormattedUsageText
-(
-    Stream &strm,
-    const char *text,
-    uint32_t output_max_columns
-)
-{
-    int len = strlen (text);
-
-    // Will it all fit on one line?
-
-    if ((len + strm.GetIndentLevel()) < output_max_columns)
-    {
-        // Output it as a single line.
-        strm.Indent (text);
-        strm.EOL();
-    }
-    else
-    {
-        // We need to break it up into multiple lines.
-
-        int text_width = output_max_columns - strm.GetIndentLevel() - 1;
-        int start = 0;
-        int end = start;
-        int final_end = strlen (text);
-        int sub_len;
-
-        while (end < final_end)
-        {
-            // Don't start the 'text' on a space, since we're already outputting the indentation.
-            while ((start < final_end) && (text[start] == ' '))
-                start++;
-
-            end = start + text_width;
-            if (end > final_end)
-                end = final_end;
-            else
-            {
-                // If we're not at the end of the text, make sure we break the line on white space.
-                while (end > start
-                       && text[end] != ' ' && text[end] != '\t' && text[end] != '\n')
-                    end--;
-            }
-
-            sub_len = end - start;
-            if (start != 0)
-                strm.EOL();
-            strm.Indent();
-            assert (start < final_end);
-            assert (start + sub_len <= final_end);
-            strm.Write(text + start, sub_len);
-            start = end + 1;
-        }
-        strm.EOL();
-    }
-}
-
-void
-Options::GenerateOptionUsage
-(
-    Stream &strm,
-    CommandObject *cmd,
-    const char *program_name)
-{
-    uint32_t screen_width = 80;
-    const lldb::OptionDefinition *full_options_table = GetDefinitions();
-    const uint32_t save_indent_level = strm.GetIndentLevel();
-    const char *name;
-
-    if (cmd)
-      name = cmd->GetCommandName();
-    else
-      name = program_name;
-
-    strm.PutCString ("\nCommand Options Usage:\n");
-
-    strm.IndentMore(2);
-
-    // First, show each usage level set of options, e.g. <cmd> [options-for-level-0]
-    //                                                   <cmd> [options-for-level-1]
-    //                                                   etc.
-
-    const uint32_t num_options = NumCommandOptions();
-    if (num_options == 0)
-        return;
-        
-    BuildValidOptionSets ();
-    int num_option_sets = m_required_options.size();
-    
-    uint32_t i;
-    
-    for (uint32_t opt_set = 0; opt_set < num_option_sets; ++opt_set)
-    {
-        uint32_t opt_set_mask;
-        
-        opt_set_mask = 1 << opt_set;
-        if (opt_set > 0)
-            strm.Printf ("\n");
-        strm.Indent (name);
-        
-        for (i = 0; i < num_options; ++i)
-        {
-            if (full_options_table[i].usage_mask & opt_set_mask)
-            {
-                // Add current option to the end of out_stream.
-
-                if (full_options_table[i].required)
-                {
-                    if (full_options_table[i].option_has_arg == required_argument)
-                    {
-                        strm.Printf (" -%c %s",
-                                    full_options_table[i].short_option,
-                                    full_options_table[i].argument_name);
-                    }
-                    else if (full_options_table[i].option_has_arg == optional_argument)
-                    {
-                        strm.Printf (" -%c [%s]",
-                                     full_options_table[i].short_option,
-                                     full_options_table[i].argument_name);
-                    }
-                    else
-                        strm.Printf (" -%c", full_options_table[i].short_option);
-                }
-                else
-                {
-                    if (full_options_table[i].option_has_arg == required_argument)
-                        strm.Printf (" [-%c %s]", full_options_table[i].short_option,
-                                           full_options_table[i].argument_name);
-                    else if (full_options_table[i].option_has_arg == optional_argument)
-                        strm.Printf (" [-%c [%s]]", full_options_table[i].short_option,
-                                           full_options_table[i].argument_name);
-                    else
-                        strm.Printf (" [-%c]", full_options_table[i].short_option);
-                }
-            }
-        }
-    }
-    strm.Printf ("\n\n");
-
-    // Now print out all the detailed information about the various options:  long form, short form and help text:
-    //   -- long_name <argument>
-    //   - short <argument>
-    //   help text
-
-    // This variable is used to keep track of which options' info we've printed out, because some options can be in
-    // more than one usage level, but we only want to print the long form of its information once.
-
-    OptionSet options_seen;
-    OptionSet::iterator pos;
-    strm.IndentMore (5);
-
-    int first_option_printed = 1;
-    for (i = 0; i < num_options; ++i)
-    {
-        // Only print out this option if we haven't already seen it.
-        pos = options_seen.find (full_options_table[i].short_option);
-        if (pos == options_seen.end())
-        {
-            // Put a newline separation between arguments
-            if (first_option_printed)
-                first_option_printed = 0;
-            else
-                strm.EOL();
-      
-            options_seen.insert (full_options_table[i].short_option);
-            strm.Indent ();
-            strm.Printf ("-%c ", full_options_table[i].short_option);
-            if (full_options_table[i].argument_name != NULL)
-                strm.PutCString(full_options_table[i].argument_name);
-            strm.EOL();
-            strm.Indent ();
-            strm.Printf ("--%s ", full_options_table[i].long_option);
-            if (full_options_table[i].argument_name != NULL)
-                strm.PutCString(full_options_table[i].argument_name);
-            strm.EOL();
-
-            strm.IndentMore (5);
-            
-            if (full_options_table[i].usage_text)
-                    OutputFormattedUsageText (strm,
-                                              full_options_table[i].usage_text,
-                                              screen_width);
-            if (full_options_table[i].enum_values != NULL)
-            {
-                strm.Indent ();
-                strm.Printf("Values: ");
-                for (int j = 0; full_options_table[i].enum_values[j].string_value != NULL; j++) 
-                {
-                    if (j == 0)
-                        strm.Printf("%s", full_options_table[i].enum_values[j].string_value);
-                    else
-                        strm.Printf(" | %s", full_options_table[i].enum_values[j].string_value);
-                }
-                strm.EOL();
-            }
-            strm.IndentLess (5);
-        }
-    }
-
-    // Restore the indent level
-    strm.SetIndentLevel (save_indent_level);
-}
-
-// This function is called when we have been given a potentially incomplete set of
-// options, such as when an alias has been defined (more options might be added at
-// at the time the alias is invoked).  We need to verify that the options in the set
-// m_seen_options are all part of a set that may be used together, but m_seen_options
-// may be missing some of the "required" options.
-
-bool
-Options::VerifyPartialOptions (CommandReturnObject &result)
-{
-    bool options_are_valid = false;
-
-    int num_levels = m_required_options.size();
-    if (num_levels)
-      {
-        for (int i = 0; i < num_levels && !options_are_valid; ++i)
-          {
-            // In this case we are treating all options as optional rather than required.
-            // Therefore a set of options is correct if m_seen_options is a subset of the
-            // union of m_required_options and m_optional_options.
-            OptionSet union_set;
-            OptionsSetUnion (m_required_options[i], m_optional_options[i], union_set);
-            if (IsASubset (m_seen_options, union_set))
-                options_are_valid = true;
-          }
-      }
-
-    return options_are_valid;
-}
-
-bool
-Options::HandleOptionCompletion
-(
-    Args &input,
-    OptionElementVector &opt_element_vector,
-    int cursor_index,
-    int char_pos,
-    int match_start_point,
-    int max_return_elements,
-    lldb_private::CommandInterpreter *interpreter,
-    lldb_private::StringList &matches
-)
-{
-    // For now we just scan the completions to see if the cursor position is in
-    // an option or its argument.  Otherwise we'll call HandleArgumentCompletion.
-    // In the future we can use completion to validate options as well if we want.
-
-    const OptionDefinition *opt_defs = GetDefinitions();
-
-    std::string cur_opt_std_str (input.GetArgumentAtIndex(cursor_index));
-    cur_opt_std_str.erase(char_pos);
-    const char *cur_opt_str = cur_opt_std_str.c_str();
-
-    for (int i = 0; i < opt_element_vector.size(); i++)
-    {
-        int opt_pos = opt_element_vector[i].opt_pos;
-        int opt_arg_pos = opt_element_vector[i].opt_arg_pos;
-        int opt_defs_index = opt_element_vector[i].opt_defs_index;
-        if (opt_pos == cursor_index)
-        {
-            // We're completing the option itself.
-            if (opt_defs_index != -1)
-            {
-                // We recognized it, if it an incomplete long option, complete it anyway (getopt_long is
-                // happy with shortest unique string, but it's still a nice thing to do.)  Otherwise return
-                // The string so the upper level code will know this is a full match and add the " ".
-                if (cur_opt_str && strlen (cur_opt_str) > 2
-                    && cur_opt_str[0] == '-' && cur_opt_str[1] == '-'
-                    && strcmp (opt_defs[opt_defs_index].long_option, cur_opt_str) != 0)
-                {
-                        std::string full_name ("--");
-                        full_name.append (opt_defs[opt_defs_index].long_option);
-                        matches.AppendString(full_name.c_str());
-                        return true;
-                }
-                else
-                {
-                    matches.AppendString(input.GetArgumentAtIndex(cursor_index));
-                    return true;
-                }
-            }
-            else
-            {
-                // FIXME - not handling wrong options yet:
-                // Check to see if they are writing a long option & complete it.
-                // I think we will only get in here if the long option table has two elements
-                // that are not unique up to this point.  getopt_long does shortest unique match
-                // for long options already.
-
-                if (cur_opt_str && strlen (cur_opt_str) > 2
-                    && cur_opt_str[0] == '-' && cur_opt_str[1] == '-')
-                {
-                    for (int i = 0 ; opt_defs[i].short_option != 0 ; i++)
-                    {
-                        if (strstr(opt_defs[i].long_option, cur_opt_str + 2) == opt_defs[i].long_option)
-                        {
-                            std::string full_name ("--");
-                            full_name.append (opt_defs[i].long_option);
-                            // The options definitions table has duplicates because of the
-                            // way the grouping information is stored, so only add once.
-                            bool duplicate = false;
-                            for (int j = 0; j < matches.GetSize(); j++)
-                            {
-                                if (matches.GetStringAtIndex(j) == full_name)
-                                {
-                                    duplicate = true;
-                                    break;
-                                }
-                            }
-                            if (!duplicate)
-                                matches.AppendString(full_name.c_str());
-                        }
-                    }
-                }
-                return true;
-            }
-
-
-        }
-        else if (opt_arg_pos == cursor_index)
-        {
-            // Okay the cursor is on the completion of an argument.
-            // See if it has a completion, otherwise return no matches.
-
-            if (opt_defs_index != -1)
-            {
-                HandleOptionArgumentCompletion (input,
-                                                 cursor_index,
-                                                 strlen (input.GetArgumentAtIndex(cursor_index)),
-                                                 opt_element_vector,
-                                                 i,
-                                                 match_start_point,
-                                                 max_return_elements,
-                                                 interpreter,
-                                                 matches);
-                return true;
-            }
-            else
-            {
-                // No completion callback means no completions...
-                return true;
-            }
-
-        }
-        else
-        {
-            // Not the last element, keep going.
-            continue;
-        }
-    }
-    return false;
-}
-
-bool
-Options::HandleOptionArgumentCompletion
-(
-    Args &input,
-    int cursor_index,
-    int char_pos,
-    OptionElementVector &opt_element_vector,
-    int opt_element_index,
-    int match_start_point,
-    int max_return_elements,
-    lldb_private::CommandInterpreter *interpreter,
-    lldb_private::StringList &matches
-)
-{
-    const OptionDefinition *opt_defs = GetDefinitions();
-    std::auto_ptr<SearchFilter> filter_ap;
-
-    int opt_arg_pos = opt_element_vector[opt_element_index].opt_arg_pos;
-    int opt_defs_index = opt_element_vector[opt_element_index].opt_defs_index;
-    
-    // See if this is an enumeration type option, and if so complete it here:
-    
-    OptionEnumValueElement *enum_values = opt_defs[opt_defs_index].enum_values;
-    if (enum_values != NULL)
-    {
-        bool return_value = false;
-        std::string match_string(input.GetArgumentAtIndex (opt_arg_pos), input.GetArgumentAtIndex (opt_arg_pos) + char_pos);
-        for (int i = 0; enum_values[i].string_value != NULL; i++)
-        {
-            if (strstr(enum_values[i].string_value, match_string.c_str()) == enum_values[i].string_value)
-            {
-                matches.AppendString (enum_values[i].string_value);
-                return_value = true;
-            }
-        }
-        return return_value;
-    }
-
-    // If this is a source file or symbol type completion, and  there is a
-    // -shlib option somewhere in the supplied arguments, then make a search filter
-    // for that shared library.
-    // FIXME: Do we want to also have an "OptionType" so we don't have to match string names?
-
-    uint32_t completion_mask = opt_defs[opt_defs_index].completionType;
-    if (completion_mask & CommandCompletions::eSourceFileCompletion
-        || completion_mask & CommandCompletions::eSymbolCompletion)
-    {
-        for (int i = 0; i < opt_element_vector.size(); i++)
-        {
-            int cur_defs_index = opt_element_vector[i].opt_defs_index;
-            int cur_arg_pos    = opt_element_vector[i].opt_arg_pos;
-            const char *cur_opt_name = opt_defs[cur_defs_index].long_option;
-
-            // If this is the "shlib" option and there was an argument provided,
-            // restrict it to that shared library.
-            if (strcmp(cur_opt_name, "shlib") == 0 && cur_arg_pos != -1)
-            {
-                const char *module_name = input.GetArgumentAtIndex(cur_arg_pos);
-                if (module_name)
-                {
-                    FileSpec module_spec(module_name);
-                    lldb::TargetSP target_sp = interpreter->Context()->GetTarget()->GetSP();
-                    // Search filters require a target...
-                    if (target_sp != NULL)
-                        filter_ap.reset (new SearchFilterByModule (target_sp, module_spec));
-                }
-                break;
-            }
-        }
-    }
-
-    return CommandCompletions::InvokeCommonCompletionCallbacks (completion_mask,
-                                                                 input.GetArgumentAtIndex (opt_arg_pos),
-                                                                 match_start_point,
-                                                                 max_return_elements,
-                                                                 interpreter,
-                                                                 filter_ap.get(),
-                                                                 matches);
-
-}

Modified: lldb/trunk/source/Core/Scalar.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Scalar.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Core/Scalar.cpp (original)
+++ lldb/trunk/source/Core/Scalar.cpp Tue Jun 15 14:49:27 2010
@@ -11,7 +11,7 @@
 
 #include <math.h>
 
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 #include "lldb/Core/Error.h"
 #include "lldb/Core/Stream.h"
 #include "lldb/Core/DataExtractor.h"

Copied: lldb/trunk/source/Interpreter/Args.cpp (from r106033, lldb/trunk/source/Core/Args.cpp)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/Args.cpp?p2=lldb/trunk/source/Interpreter/Args.cpp&p1=lldb/trunk/source/Core/Args.cpp&r1=106033&r2=106034&rev=106034&view=diff
==============================================================================
--- lldb/trunk/source/Core/Args.cpp (original)
+++ lldb/trunk/source/Interpreter/Args.cpp Tue Jun 15 14:49:27 2010
@@ -13,11 +13,11 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 #include "lldb/Core/Stream.h"
 #include "lldb/Core/StreamFile.h"
 #include "lldb/Core/StreamString.h"
-#include "lldb/Core/Options.h"
+#include "lldb/Interpreter/Options.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
 
 using namespace lldb;

Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Tue Jun 15 14:49:27 2010
@@ -49,7 +49,7 @@
 #include "../Commands/CommandObjectUnalias.h"
 #include "../Commands/CommandObjectVariable.h"
 
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/Stream.h"
 #include "lldb/Core/Timer.h"

Modified: lldb/trunk/source/Interpreter/CommandObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandObject.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandObject.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandObject.cpp Tue Jun 15 14:49:27 2010
@@ -17,7 +17,7 @@
 #include <ctype.h>
 
 #include "lldb/Core/Address.h"
-#include "lldb/Core/Options.h"
+#include "lldb/Interpreter/Options.h"
 
 // These are for the Sourcename completers.
 // FIXME: Make a separate file for the completers.

Modified: lldb/trunk/source/Interpreter/CommandObjectScript.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandObjectScript.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandObjectScript.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandObjectScript.cpp Tue Jun 15 14:49:27 2010
@@ -13,7 +13,7 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 
 #include "lldb/Interpreter/CommandReturnObject.h"
 #include "lldb/Interpreter/ScriptInterpreter.h"

Copied: lldb/trunk/source/Interpreter/Options.cpp (from r106033, lldb/trunk/source/Core/Options.cpp)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/Options.cpp?p2=lldb/trunk/source/Interpreter/Options.cpp&p1=lldb/trunk/source/Core/Options.cpp&r1=106033&r2=106034&rev=106034&view=diff
==============================================================================
--- lldb/trunk/source/Core/Options.cpp (original)
+++ lldb/trunk/source/Interpreter/Options.cpp Tue Jun 15 14:49:27 2010
@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "lldb/Core/Options.h"
+#include "lldb/Interpreter/Options.h"
 
 // C Includes
 // C++ Includes

Modified: lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSXLog.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSXLog.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSXLog.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSXLog.cpp Tue Jun 15 14:49:27 2010
@@ -9,7 +9,7 @@
 
 #include "ProcessMacOSXLog.h"
 
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 #include "lldb/Core/StreamFile.h"
 
 #include "ProcessMacOSX.h"

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp Tue Jun 15 14:49:27 2010
@@ -13,7 +13,7 @@
 // C Includes
 // C++ Includes
 // Other libraries and framework includes
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 #include "lldb/Core/ConnectionFileDescriptor.h"
 #include "lldb/Core/Log.h"
 #include "lldb/Core/State.h"

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Tue Jun 15 14:49:27 2010
@@ -26,7 +26,7 @@
 // Other libraries and framework includes
 
 #include "lldb/Breakpoint/WatchpointLocation.h"
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 #include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/ConnectionFileDescriptor.h"

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp Tue Jun 15 14:49:27 2010
@@ -9,7 +9,7 @@
 
 #include "ProcessGDBRemoteLog.h"
 
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 #include "lldb/Core/StreamFile.h"
 
 #include "ProcessGDBRemote.h"

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp Tue Jun 15 14:49:27 2010
@@ -9,7 +9,7 @@
 
 #include "LogChannelDWARF.h"
 
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 #include "lldb/Core/PluginManager.h"
 #include "lldb/Core/StreamFile.h"
 #include "SymbolFileDWARF.h"

Modified: lldb/trunk/source/lldb-log.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/lldb-log.cpp?rev=106034&r1=106033&r2=106034&view=diff
==============================================================================
--- lldb/trunk/source/lldb-log.cpp (original)
+++ lldb/trunk/source/lldb-log.cpp Tue Jun 15 14:49:27 2010
@@ -13,7 +13,7 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "lldb/Core/Args.h"
+#include "lldb/Interpreter/Args.h"
 #include "lldb/Core/Log.h"
 #include "lldb/Core/StreamFile.h"
 #include <string.h>





More information about the lldb-commits mailing list