[Lldb-commits] [review request] fix linux test suite breakage caused by invalid input to isprint()

Malea, Daniel daniel.malea at intel.com
Wed Dec 5 12:05:25 PST 2012


I see, thanks Greg. Does the attached patch seem reasonable to commit? It fixes segfault I mentioned on Linux.


Thanks,
Dan


On 2012-12-05, at 12:33 PM, Greg Clayton wrote:

>
> On Dec 4, 2012, at 4:27 PM, "Malea, Daniel" <daniel.malea at intel.com> wrote:
>
>> Hi Greg,
>>
>> I notice you introduced isprint() in this commit, but it seems to be causing some test segmentation faults on Linux. From the (Mac) man page:
>>
>> The 4.4BSD extension of accepting arguments outside of the range of the unsigned char type in locales with large character sets is considered obsolete and may not be supported in future releases.  The iswprint() function should be used instead.
>>
>> Any concerns if I change isprint() to iswprint() instead?
>
> The goal for the option stuff is to be able to feed the short option character string in the "optstring" argument to getopt_long():
>
> int getopt_long(int argc, char * const *argv, const char *optstring, const struct option *longopts, int *longindex);
>
> So I don't think this will work. We might need to make a static inline function like:
>
> static inline bool
> isprint8 (int ch)
> {
>    if (ch & 0xffffff00u)
>        return false;
>    return isprint(ch);
> }
>
> Then replace all "isprint" calls with "isprint8"?
>
>>
>>
>> Cheers,
>> Dan
>>
>> On 2012-12-03, at 7:32 PM, Greg Clayton wrote:
>>
>>> Author: gclayton
>>> Date: Mon Dec  3 18:32:51 2012
>>> New Revision: 169189
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=169189&view=rev
>>> Log:
>>> <rdar://problem/12798131>
>>>
>>> Cleaned up the option parsing code to always pass around the short options as integers. Previously we cast this down to "char" and lost some information. I recently added an assert that would detect duplicate short character options which was firing during the test suite.
>>>
>>> This fix does the following:
>>> - make sure all short options are treated as "int"
>>> - make sure that short options can be non-printable values when a short option is not required or when an option group is mixed into many commands and a short option is not desired
>>> - fix the help printing to "do the right thing" in all cases. Previously if there were duplicate short character options, it would just not emit help for the duplicates
>>> - fix option parsing when there are duplicates to parse options correctly. Previously the option parsing, when done for an OptionGroup, would just start parsing options incorrectly by omitting table entries and it would end up setting the wrong option value
>>>
>>>
>>> Modified:
>>>  lldb/trunk/include/lldb/Interpreter/OptionGroupBoolean.h
>>>  lldb/trunk/include/lldb/Interpreter/OptionGroupFile.h
>>>  lldb/trunk/include/lldb/Interpreter/OptionGroupString.h
>>>  lldb/trunk/include/lldb/Interpreter/OptionGroupUInt64.h
>>>  lldb/trunk/include/lldb/Interpreter/Options.h
>>>  lldb/trunk/include/lldb/Symbol/VariableList.h
>>>  lldb/trunk/include/lldb/lldb-private-types.h
>>>  lldb/trunk/source/Commands/CommandObjectArgs.cpp
>>>  lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
>>>  lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp
>>>  lldb/trunk/source/Commands/CommandObjectCommands.cpp
>>>  lldb/trunk/source/Commands/CommandObjectDisassemble.cpp
>>>  lldb/trunk/source/Commands/CommandObjectExpression.cpp
>>>  lldb/trunk/source/Commands/CommandObjectFrame.cpp
>>>  lldb/trunk/source/Commands/CommandObjectHelp.h
>>>  lldb/trunk/source/Commands/CommandObjectLog.cpp
>>>  lldb/trunk/source/Commands/CommandObjectMemory.cpp
>>>  lldb/trunk/source/Commands/CommandObjectPlatform.cpp
>>>  lldb/trunk/source/Commands/CommandObjectProcess.cpp
>>>  lldb/trunk/source/Commands/CommandObjectRegister.cpp
>>>  lldb/trunk/source/Commands/CommandObjectSettings.cpp
>>>  lldb/trunk/source/Commands/CommandObjectSource.cpp
>>>  lldb/trunk/source/Commands/CommandObjectTarget.cpp
>>>  lldb/trunk/source/Commands/CommandObjectThread.cpp
>>>  lldb/trunk/source/Commands/CommandObjectType.cpp
>>>  lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp
>>>  lldb/trunk/source/Commands/CommandObjectWatchpointCommand.cpp
>>>  lldb/trunk/source/Core/Log.cpp
>>>  lldb/trunk/source/Interpreter/Args.cpp
>>>  lldb/trunk/source/Interpreter/OptionGroupArchitecture.cpp
>>>  lldb/trunk/source/Interpreter/OptionGroupBoolean.cpp
>>>  lldb/trunk/source/Interpreter/OptionGroupFile.cpp
>>>  lldb/trunk/source/Interpreter/OptionGroupFormat.cpp
>>>  lldb/trunk/source/Interpreter/OptionGroupOutputFile.cpp
>>>  lldb/trunk/source/Interpreter/OptionGroupPlatform.cpp
>>>  lldb/trunk/source/Interpreter/OptionGroupString.cpp
>>>  lldb/trunk/source/Interpreter/OptionGroupUInt64.cpp
>>>  lldb/trunk/source/Interpreter/OptionGroupUUID.cpp
>>>  lldb/trunk/source/Interpreter/OptionGroupValueObjectDisplay.cpp
>>>  lldb/trunk/source/Interpreter/OptionGroupVariable.cpp
>>>  lldb/trunk/source/Interpreter/OptionGroupWatchpoint.cpp
>>>  lldb/trunk/source/Interpreter/Options.cpp
>>>  lldb/trunk/source/Symbol/VariableList.cpp
>>>  lldb/trunk/source/Target/Process.cpp
>>>  lldb/trunk/test/expression_command/formatters/TestFormatters.py
>>>  lldb/trunk/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
>>>  lldb/trunk/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py
>>>  lldb/trunk/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py
>>>  lldb/trunk/test/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py
>>>  lldb/trunk/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py
>>>  lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py
>>>  lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py
>>>  lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py
>>>  lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py
>>>  lldb/trunk/test/functionalities/data-formatter/data-formatter-synth/TestDataFormatterSynth.py
>>>  lldb/trunk/test/functionalities/data-formatter/rdar-11988289/TestRdar 11988289.py
>>>  lldb/trunk/test/functionalities/data-formatter/rdar-12437442/TestRdar12437442.py
>>>  lldb/trunk/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py
>>>  lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py
>>>  lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py
>>>  lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py
>>>  lldb/trunk/test/lang/c/array_types/TestArrayTypes.py
>>>  lldb/trunk/test/lang/c/bitfields/TestBitfields.py
>>>  lldb/trunk/test/lang/c/forward/TestForwardDeclaration.py
>>>  lldb/trunk/test/lang/c/function_types/TestFunctionTypes.py
>>>  lldb/trunk/test/lang/c/global_variables/TestGlobalVariables.py
>>>  lldb/trunk/test/lang/c/set_values/TestSetValues.py
>>>  lldb/trunk/test/lang/cpp/class_types/TestClassTypes.py
>>>  lldb/trunk/test/lang/cpp/namespace/TestNamespace.py
>>>  lldb/trunk/test/lang/cpp/signed_types/TestSignedTypes.py
>>>  lldb/trunk/test/lang/cpp/unique-types/TestUniqueTypes.py
>>>  lldb/trunk/test/lang/cpp/unsigned_types/TestUnsignedTypes.py
>>>  lldb/trunk/test/lang/objc/foundation/TestObjCMethods.py
>>>  lldb/trunk/test/lang/objc/rdar-11355592/TestRdar11355592.py
>>>  lldb/trunk/test/types/AbstractBase.py
>>>  lldb/trunk/tools/driver/Driver.cpp
>>>
>>> Modified: lldb/trunk/include/lldb/Interpreter/OptionGroupBoolean.h
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/OptionGroupBoolean.h?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/include/lldb/Interpreter/OptionGroupBoolean.h (original)
>>> +++ lldb/trunk/include/lldb/Interpreter/OptionGroupBoolean.h Mon Dec  3 18:32:51 2012
>>> @@ -31,7 +31,7 @@
>>>       OptionGroupBoolean (uint32_t usage_mask,
>>>                           bool required,
>>>                           const char *long_option,
>>> -                            char short_option,
>>> +                            int short_option,
>>>                           const char *usage_text,
>>>                           bool default_value,
>>>                           bool no_argument_toggle_default);
>>>
>>> Modified: lldb/trunk/include/lldb/Interpreter/OptionGroupFile.h
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/OptionGroupFile.h?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/include/lldb/Interpreter/OptionGroupFile.h (original)
>>> +++ lldb/trunk/include/lldb/Interpreter/OptionGroupFile.h Mon Dec  3 18:32:51 2012
>>> @@ -31,7 +31,7 @@
>>>   OptionGroupFile (uint32_t usage_mask,
>>>                    bool required,
>>>                    const char *long_option,
>>> -                     char short_option,
>>> +                     int short_option,
>>>                    uint32_t completion_type,
>>>                    lldb::CommandArgumentType argument_type,
>>>                    const char *usage_text);
>>> @@ -89,7 +89,7 @@
>>>   OptionGroupFileList (uint32_t usage_mask,
>>>                        bool required,
>>>                        const char *long_option,
>>> -                         char short_option,
>>> +                         int short_option,
>>>                        uint32_t completion_type,
>>>                        lldb::CommandArgumentType argument_type,
>>>                        const char *usage_text);
>>>
>>> Modified: lldb/trunk/include/lldb/Interpreter/OptionGroupString.h
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/OptionGroupString.h?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/include/lldb/Interpreter/OptionGroupString.h (original)
>>> +++ lldb/trunk/include/lldb/Interpreter/OptionGroupString.h Mon Dec  3 18:32:51 2012
>>> @@ -29,7 +29,7 @@
>>>       OptionGroupString (uint32_t usage_mask,
>>>                          bool required,
>>>                          const char *long_option,
>>> -                           char short_option,
>>> +                           int short_option,
>>>                          uint32_t completion_type,
>>>                          lldb::CommandArgumentType argument_type,
>>>                          const char *usage_text,
>>>
>>> Modified: lldb/trunk/include/lldb/Interpreter/OptionGroupUInt64.h
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/OptionGroupUInt64.h?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/include/lldb/Interpreter/OptionGroupUInt64.h (original)
>>> +++ lldb/trunk/include/lldb/Interpreter/OptionGroupUInt64.h Mon Dec  3 18:32:51 2012
>>> @@ -29,7 +29,7 @@
>>>       OptionGroupUInt64 (uint32_t usage_mask,
>>>                          bool required,
>>>                          const char *long_option,
>>> -                           char short_option,
>>> +                           int short_option,
>>>                          uint32_t completion_type,
>>>                          lldb::CommandArgumentType argument_type,
>>>                          const char *usage_text,
>>>
>>> Modified: lldb/trunk/include/lldb/Interpreter/Options.h
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/Options.h?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/include/lldb/Interpreter/Options.h (original)
>>> +++ lldb/trunk/include/lldb/Interpreter/Options.h Mon Dec  3 18:32:51 2012
>>> @@ -296,7 +296,7 @@
>>>
>>> protected:
>>>   // This is a set of options expressed as indexes into the options table for this Option.
>>> -    typedef std::set<char> OptionSet;
>>> +    typedef std::set<int> OptionSet;
>>>   typedef std::vector<OptionSet> OptionSetVector;
>>>
>>>   CommandInterpreter &m_interpreter;
>>>
>>> Modified: lldb/trunk/include/lldb/Symbol/VariableList.h
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/VariableList.h?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/include/lldb/Symbol/VariableList.h (original)
>>> +++ lldb/trunk/include/lldb/Symbol/VariableList.h Mon Dec  3 18:32:51 2012
>>> @@ -42,7 +42,7 @@
>>>   Dump(Stream *s, bool show_context) const;
>>>
>>>   lldb::VariableSP
>>> -    GetVariableAtIndex(uint32_t idx);
>>> +    GetVariableAtIndex(uint32_t idx) const;
>>>
>>>   lldb::VariableSP
>>>   RemoveVariableAtIndex (uint32_t idx);
>>>
>>> Modified: lldb/trunk/include/lldb/lldb-private-types.h
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-private-types.h?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/include/lldb/lldb-private-types.h (original)
>>> +++ lldb/trunk/include/lldb/lldb-private-types.h Mon Dec  3 18:32:51 2012
>>> @@ -58,7 +58,7 @@
>>>                                                // then this option belongs to option set n.
>>>       bool required;                           // This option is required (in the current usage level)
>>>       const char *long_option;                 // Full name for this option.
>>> -        char short_option;                       // Single character for this option.
>>> +        int short_option;                        // Single character for this option.
>>>       int option_has_arg;                      // no_argument, required_argument or optional_argument
>>>       OptionEnumValueElement *enum_values;     // If non-NULL an array of enum values.
>>>       uint32_t completion_type;                // Cookie the option class can use to do define the argument completion.
>>>
>>> Modified: lldb/trunk/source/Commands/CommandObjectArgs.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectArgs.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Commands/CommandObjectArgs.cpp (original)
>>> +++ lldb/trunk/source/Commands/CommandObjectArgs.cpp Mon Dec  3 18:32:51 2012
>>> @@ -54,7 +54,7 @@
>>> {
>>>   Error error;
>>>
>>> -    char short_option = (char) m_getopt_table[option_idx].val;
>>> +    const int short_option = m_getopt_table[option_idx].val;
>>>
>>>   switch (short_option)
>>>   {
>>>
>>> Modified: lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp (original)
>>> +++ lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp Mon Dec  3 18:32:51 2012
>>> @@ -118,7 +118,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>
>>>           switch (short_option)
>>>           {
>>> @@ -746,7 +746,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>
>>>           switch (short_option)
>>>           {
>>> @@ -1253,7 +1253,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>
>>>           switch (short_option)
>>>           {
>>> @@ -1441,7 +1441,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>
>>>           switch (short_option)
>>>           {
>>>
>>> Modified: lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp (original)
>>> +++ lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp Mon Dec  3 18:32:51 2012
>>> @@ -413,7 +413,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>
>>>           switch (short_option)
>>>           {
>>>
>>> Modified: lldb/trunk/source/Commands/CommandObjectCommands.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectCommands.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Commands/CommandObjectCommands.cpp (original)
>>> +++ lldb/trunk/source/Commands/CommandObjectCommands.cpp Mon Dec  3 18:32:51 2012
>>> @@ -72,7 +72,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>           bool success;
>>>
>>>           switch (short_option)
>>> @@ -234,7 +234,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>           bool success;
>>>
>>>           switch (short_option)
>>> @@ -1082,7 +1082,7 @@
>>>        SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>        {
>>>            Error error;
>>> -             char short_option = (char) m_getopt_table[option_idx].val;
>>> +             const int short_option = m_getopt_table[option_idx].val;
>>>
>>>            switch (short_option)
>>>            {
>>> @@ -1335,7 +1335,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>
>>>           switch (short_option)
>>>           {
>>> @@ -1478,7 +1478,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>
>>>           switch (short_option)
>>>           {
>>>
>>> Modified: lldb/trunk/source/Commands/CommandObjectDisassemble.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectDisassemble.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Commands/CommandObjectDisassemble.cpp (original)
>>> +++ lldb/trunk/source/Commands/CommandObjectDisassemble.cpp Mon Dec  3 18:32:51 2012
>>> @@ -59,7 +59,7 @@
>>> {
>>>   Error error;
>>>
>>> -    char short_option = (char) m_getopt_table[option_idx].val;
>>> +    const int short_option = m_getopt_table[option_idx].val;
>>>
>>>   bool success;
>>>
>>>
>>> Modified: lldb/trunk/source/Commands/CommandObjectExpression.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectExpression.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Commands/CommandObjectExpression.cpp (original)
>>> +++ lldb/trunk/source/Commands/CommandObjectExpression.cpp Mon Dec  3 18:32:51 2012
>>> @@ -71,7 +71,7 @@
>>> {
>>>   Error error;
>>>
>>> -    const char short_option = (char) g_option_table[option_idx].short_option;
>>> +    const int short_option = g_option_table[option_idx].short_option;
>>>
>>>   switch (short_option)
>>>   {
>>>
>>> Modified: lldb/trunk/source/Commands/CommandObjectFrame.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectFrame.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Commands/CommandObjectFrame.cpp (original)
>>> +++ lldb/trunk/source/Commands/CommandObjectFrame.cpp Mon Dec  3 18:32:51 2012
>>> @@ -120,7 +120,7 @@
>>>       {
>>>           Error error;
>>>           bool success = false;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>           switch (short_option)
>>>           {
>>>           case 'r':
>>>
>>> Modified: lldb/trunk/source/Commands/CommandObjectHelp.h
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectHelp.h?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Commands/CommandObjectHelp.h (original)
>>> +++ lldb/trunk/source/Commands/CommandObjectHelp.h Mon Dec  3 18:32:51 2012
>>> @@ -57,7 +57,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>
>>>           switch (short_option)
>>>           {
>>>
>>> Modified: lldb/trunk/source/Commands/CommandObjectLog.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectLog.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Commands/CommandObjectLog.cpp (original)
>>> +++ lldb/trunk/source/Commands/CommandObjectLog.cpp Mon Dec  3 18:32:51 2012
>>> @@ -132,7 +132,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>
>>>           switch (short_option)
>>>           {
>>>
>>> Modified: lldb/trunk/source/Commands/CommandObjectMemory.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectMemory.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Commands/CommandObjectMemory.cpp (original)
>>> +++ lldb/trunk/source/Commands/CommandObjectMemory.cpp Mon Dec  3 18:32:51 2012
>>> @@ -82,7 +82,7 @@
>>>                   const char *option_arg)
>>>   {
>>>       Error error;
>>> -        char short_option = (char) g_option_table[option_idx].short_option;
>>> +        const int short_option = g_option_table[option_idx].short_option;
>>>
>>>       switch (short_option)
>>>       {
>>> @@ -861,7 +861,7 @@
>>>                       const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) g_memory_write_option_table[option_idx].short_option;
>>> +            const int short_option = g_memory_write_option_table[option_idx].short_option;
>>>
>>>           switch (short_option)
>>>           {
>>>
>>> Modified: lldb/trunk/source/Commands/CommandObjectPlatform.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectPlatform.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Commands/CommandObjectPlatform.cpp (original)
>>> +++ lldb/trunk/source/Commands/CommandObjectPlatform.cpp Mon Dec  3 18:32:51 2012
>>> @@ -606,7 +606,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>           bool success = false;
>>>
>>>           switch (short_option)
>>>
>>> Modified: lldb/trunk/source/Commands/CommandObjectProcess.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectProcess.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Commands/CommandObjectProcess.cpp (original)
>>> +++ lldb/trunk/source/Commands/CommandObjectProcess.cpp Mon Dec  3 18:32:51 2012
>>> @@ -355,7 +355,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>           bool success = false;
>>>           switch (short_option)
>>>           {
>>> @@ -715,7 +715,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>           bool success = false;
>>>           switch (short_option)
>>>           {
>>> @@ -941,7 +941,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>
>>>           switch (short_option)
>>>           {
>>> @@ -1533,7 +1533,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>
>>>           switch (short_option)
>>>           {
>>>
>>> Modified: lldb/trunk/source/Commands/CommandObjectRegister.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectRegister.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Commands/CommandObjectRegister.cpp (original)
>>> +++ lldb/trunk/source/Commands/CommandObjectRegister.cpp Mon Dec  3 18:32:51 2012
>>> @@ -289,7 +289,7 @@
>>>                       const char *option_value)
>>>       {
>>>           Error error;
>>> -            const char short_option = (char) g_option_table[option_idx].short_option;
>>> +            const int short_option = g_option_table[option_idx].short_option;
>>>           switch (short_option)
>>>           {
>>>               case 's':
>>>
>>> Modified: lldb/trunk/source/Commands/CommandObjectSettings.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectSettings.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Commands/CommandObjectSettings.cpp (original)
>>> +++ lldb/trunk/source/Commands/CommandObjectSettings.cpp Mon Dec  3 18:32:51 2012
>>> @@ -119,7 +119,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>
>>>           switch (short_option)
>>>           {
>>>
>>> Modified: lldb/trunk/source/Commands/CommandObjectSource.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectSource.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Commands/CommandObjectSource.cpp (original)
>>> +++ lldb/trunk/source/Commands/CommandObjectSource.cpp Mon Dec  3 18:32:51 2012
>>> @@ -54,7 +54,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            const char short_option = g_option_table[option_idx].short_option;
>>> +            const int short_option = g_option_table[option_idx].short_option;
>>>           switch (short_option)
>>>           {
>>>           case 'l':
>>> @@ -162,7 +162,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            const char short_option = g_option_table[option_idx].short_option;
>>> +            const int short_option = g_option_table[option_idx].short_option;
>>>           switch (short_option)
>>>           {
>>>           case 'l':
>>>
>>> Modified: lldb/trunk/source/Commands/CommandObjectTarget.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectTarget.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Commands/CommandObjectTarget.cpp (original)
>>> +++ lldb/trunk/source/Commands/CommandObjectTarget.cpp Mon Dec  3 18:32:51 2012
>>> @@ -602,8 +602,8 @@
>>>       m_option_group (interpreter),
>>>       m_option_variable (false), // Don't include frame options
>>>       m_option_format (eFormatDefault),
>>> -        m_option_compile_units    (LLDB_OPT_SET_1, false, "file", 'f', 0, eArgTypeFilename, "A basename or fullpath to a file that contains global variables. This option can be specified multiple times."),
>>> -        m_option_shared_libraries (LLDB_OPT_SET_1, false, "shlib",'s', 0, eArgTypeFilename, "A basename or fullpath to a shared library to use in the search for global variables. This option can be specified multiple times."),
>>> +        m_option_compile_units    (LLDB_OPT_SET_1, false, "file", 'file', 0, eArgTypeFilename, "A basename or fullpath to a file that contains global variables. This option can be specified multiple times."),
>>> +        m_option_shared_libraries (LLDB_OPT_SET_1, false, "shlib",'shlb', 0, eArgTypeFilename, "A basename or fullpath to a shared library to use in the search for global variables. This option can be specified multiple times."),
>>>       m_varobj_options()
>>>   {
>>>       CommandArgumentEntry arg;
>>> @@ -719,6 +719,51 @@
>>>   }
>>>
>>> protected:
>>> +
>>> +    void
>>> +    DumpGlobalVariableList(const ExecutionContext &exe_ctx, const SymbolContext &sc, const VariableList &variable_list, Stream &s)
>>> +    {
>>> +        size_t count = variable_list.GetSize();
>>> +        if (count > 0)
>>> +        {
>>> +            if (sc.module_sp)
>>> +            {
>>> +                if (sc.comp_unit)
>>> +                {
>>> +                    s.Printf ("Global variables for %s/%s in %s/%s:\n",
>>> +                              sc.comp_unit->GetDirectory().GetCString(),
>>> +                              sc.comp_unit->GetFilename().GetCString(),
>>> +                              sc.module_sp->GetFileSpec().GetDirectory().GetCString(),
>>> +                              sc.module_sp->GetFileSpec().GetFilename().GetCString());
>>> +                }
>>> +                else
>>> +                {
>>> +                    s.Printf ("Global variables for %s/%s\n",
>>> +                              sc.module_sp->GetFileSpec().GetDirectory().GetCString(),
>>> +                              sc.module_sp->GetFileSpec().GetFilename().GetCString());
>>> +                }
>>> +            }
>>> +            else if (sc.comp_unit)
>>> +            {
>>> +                s.Printf ("Global variables for %s/%s\n",
>>> +                          sc.comp_unit->GetDirectory().GetCString(),
>>> +                          sc.comp_unit->GetFilename().GetCString());
>>> +            }
>>> +
>>> +            for (uint32_t i=0; i<count; ++i)
>>> +            {
>>> +                VariableSP var_sp (variable_list.GetVariableAtIndex(i));
>>> +                if (var_sp)
>>> +                {
>>> +                    ValueObjectSP valobj_sp (ValueObjectVariable::Create (exe_ctx.GetBestExecutionContextScope(), var_sp));
>>> +
>>> +                    if (valobj_sp)
>>> +                        DumpValueObject (s, var_sp, valobj_sp, var_sp->GetName().GetCString());
>>> +                }
>>> +            }
>>> +        }
>>> +
>>> +    }
>>>   virtual bool
>>>   DoExecute (Args& args, CommandReturnObject &result)
>>>   {
>>> @@ -728,6 +773,7 @@
>>>       {
>>>           const size_t argc = args.GetArgumentCount();
>>>           Stream &s = result.GetOutputStream();
>>> +
>>>           if (argc > 0)
>>>           {
>>>
>>> @@ -791,55 +837,120 @@
>>>           }
>>>           else
>>>           {
>>> -                bool success = false;
>>> -                StackFrame *frame = exe_ctx.GetFramePtr();
>>> -                CompileUnit *comp_unit = NULL;
>>> -                if (frame)
>>> -                {
>>> -                    comp_unit = frame->GetSymbolContext (eSymbolContextCompUnit).comp_unit;
>>> -                    if (comp_unit)
>>> -                    {
>>> -                        const bool can_create = true;
>>> -                        VariableListSP comp_unit_varlist_sp (comp_unit->GetVariableList(can_create));
>>> -                        if (comp_unit_varlist_sp)
>>> +                const FileSpecList &compile_units = m_option_compile_units.GetOptionValue().GetCurrentValue();
>>> +                const FileSpecList &shlibs = m_option_shared_libraries.GetOptionValue().GetCurrentValue();
>>> +                SymbolContextList sc_list;
>>> +                const size_t num_compile_units = compile_units.GetSize();
>>> +                const size_t num_shlibs = shlibs.GetSize();
>>> +                if (num_compile_units == 0 && num_shlibs == 0)
>>> +                {
>>> +                    bool success = false;
>>> +                    StackFrame *frame = exe_ctx.GetFramePtr();
>>> +                    CompileUnit *comp_unit = NULL;
>>> +                    if (frame)
>>> +                    {
>>> +                        SymbolContext sc = frame->GetSymbolContext (eSymbolContextCompUnit);
>>> +                        if (sc.comp_unit)
>>>                       {
>>> -                            size_t count = comp_unit_varlist_sp->GetSize();
>>> -                            if (count > 0)
>>> +                            const bool can_create = true;
>>> +                            VariableListSP comp_unit_varlist_sp (sc.comp_unit->GetVariableList(can_create));
>>> +                            if (comp_unit_varlist_sp)
>>>                           {
>>> -                                s.Printf ("Global variables for %s/%s:\n",
>>> -                                          comp_unit->GetDirectory().GetCString(),
>>> -                                          comp_unit->GetFilename().GetCString());
>>> -
>>> -                                success = true;
>>> -                                for (uint32_t i=0; i<count; ++i)
>>> +                                size_t count = comp_unit_varlist_sp->GetSize();
>>> +                                if (count > 0)
>>>                               {
>>> -                                    VariableSP var_sp (comp_unit_varlist_sp->GetVariableAtIndex(i));
>>> -                                    if (var_sp)
>>> -                                    {
>>> -                                        ValueObjectSP valobj_sp (ValueObjectVariable::Create (exe_ctx.GetBestExecutionContextScope(), var_sp));
>>> -
>>> -                                        if (valobj_sp)
>>> -                                            DumpValueObject (s, var_sp, valobj_sp, var_sp->GetName().GetCString());
>>> -                                    }
>>> +                                    DumpGlobalVariableList(exe_ctx, sc, *comp_unit_varlist_sp, s);
>>> +                                    success = true;
>>>                               }
>>>                           }
>>>                       }
>>>                   }
>>> +                    if (!success)
>>> +                    {
>>> +                        if (frame)
>>> +                        {
>>> +                            if (comp_unit)
>>> +                                result.AppendErrorWithFormat ("no global variables in current compile unit: %s/%s\n",
>>> +                                                              comp_unit->GetDirectory().GetCString(),
>>> +                                                              comp_unit->GetFilename().GetCString());
>>> +                            else
>>> +                                result.AppendError ("no debug information for frame %u\n", frame->GetFrameIndex());
>>> +                        }
>>> +                        else
>>> +                            result.AppendError ("'target variable' takes one or more global variable names as arguments\n");
>>> +                        result.SetStatus (eReturnStatusFailed);
>>> +                    }
>>>               }
>>> -                if (!success)
>>> +                else
>>>               {
>>> -                    if (frame)
>>> +                    SymbolContextList sc_list;
>>> +                    const bool append = true;
>>> +                    // We have one or more compile unit or shlib
>>> +                    if (num_shlibs > 0)
>>>                   {
>>> -                        if (comp_unit)
>>> -                            result.AppendErrorWithFormat ("no global variables in current compile unit: %s/%s\n",
>>> -                                                          comp_unit->GetDirectory().GetCString(),
>>> -                                                          comp_unit->GetFilename().GetCString());
>>> -                        else
>>> -                            result.AppendError ("no debug information for frame %u\n", frame->GetFrameIndex());
>>> -                    }
>>> +                        for (size_t shlib_idx=0; shlib_idx<num_shlibs; ++shlib_idx)
>>> +                        {
>>> +                            const FileSpec module_file(shlibs.GetFileSpecAtIndex(shlib_idx));
>>> +                            ModuleSpec module_spec (module_file);
>>> +
>>> +                            ModuleSP module_sp (target->GetImages().FindFirstModule(module_spec));
>>> +                            if (module_sp)
>>> +                            {
>>> +                                if (num_compile_units > 0)
>>> +                                {
>>> +                                    for (size_t cu_idx=0; cu_idx<num_compile_units; ++cu_idx)
>>> +                                        module_sp->FindCompileUnits(compile_units.GetFileSpecAtIndex(cu_idx), append, sc_list);
>>> +                                }
>>> +                                else
>>> +                                {
>>> +                                    SymbolContext sc;
>>> +                                    sc.module_sp = module_sp;
>>> +                                    sc_list.Append(sc);
>>> +                                }
>>> +                            }
>>> +                            else
>>> +                            {
>>> +                                // Didn't find matching shlib/module in target...
>>> +                                result.AppendErrorWithFormat ("target doesn't contain the specified shared library: %s%s%s\n",
>>> +                                                              module_file.GetDirectory().GetCString(),
>>> +                                                              module_file.GetDirectory() ? "/" : "",
>>> +                                                              module_file.GetFilename().GetCString());
>>> +                            }
>>> +                        }
>>> +                    }
>>>                   else
>>> -                        result.AppendError ("'target variable' takes one or more global variable names as arguments\n");
>>> -                    result.SetStatus (eReturnStatusFailed);
>>> +                    {
>>> +                        // No shared libraries, we just want to find globals for the compile units files that were specified
>>> +                        for (size_t cu_idx=0; cu_idx<num_compile_units; ++cu_idx)
>>> +                            target->GetImages().FindCompileUnits(compile_units.GetFileSpecAtIndex(cu_idx), append, sc_list);
>>> +                    }
>>> +
>>> +                    const uint32_t num_scs = sc_list.GetSize();
>>> +                    if (num_scs > 0)
>>> +                    {
>>> +                        SymbolContext sc;
>>> +                        for (uint32_t sc_idx=0; sc_idx<num_scs; ++sc_idx)
>>> +                        {
>>> +                            if (sc_list.GetContextAtIndex(sc_idx, sc))
>>> +                            {
>>> +                                if (sc.comp_unit)
>>> +                                {
>>> +                                    const bool can_create = true;
>>> +                                    VariableListSP comp_unit_varlist_sp (sc.comp_unit->GetVariableList(can_create));
>>> +                                    if (comp_unit_varlist_sp)
>>> +                                        DumpGlobalVariableList(exe_ctx, sc, *comp_unit_varlist_sp, s);
>>> +                                }
>>> +                                else if (sc.module_sp)
>>> +                                {
>>> +                                    // Get all global variables for this module
>>> +                                    lldb_private::RegularExpression all_globals_regex("."); // Any global with at least one character
>>> +                                    VariableList variable_list;
>>> +                                    sc.module_sp->FindGlobalVariables(all_globals_regex, append, UINT32_MAX, variable_list);
>>> +                                    DumpGlobalVariableList(exe_ctx, sc, variable_list, s);
>>> +                                }
>>> +                            }
>>> +                        }
>>> +                    }
>>>               }
>>>           }
>>>       }
>>> @@ -1980,7 +2091,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>
>>>           switch (short_option)
>>>           {
>>> @@ -2913,7 +3024,7 @@
>>>       virtual Error
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>           if (short_option == 'g')
>>>           {
>>>               m_use_global_module_list = true;
>>> @@ -3368,7 +3479,7 @@
>>>       {
>>>           Error error;
>>>
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>
>>>           switch (short_option)
>>>           {
>>> @@ -3601,7 +3712,7 @@
>>>       {
>>>           Error error;
>>>
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>
>>>           switch (short_option)
>>>           {
>>> @@ -4489,7 +4600,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>           bool success;
>>>
>>>           switch (short_option)
>>>
>>> Modified: lldb/trunk/source/Commands/CommandObjectThread.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectThread.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Commands/CommandObjectThread.cpp (original)
>>> +++ lldb/trunk/source/Commands/CommandObjectThread.cpp Mon Dec  3 18:32:51 2012
>>> @@ -67,7 +67,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>
>>>           switch (short_option)
>>>           {
>>> @@ -296,7 +296,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>
>>>           switch (short_option)
>>>           {
>>> @@ -818,7 +818,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>
>>>           switch (short_option)
>>>           {
>>>
>>> Modified: lldb/trunk/source/Commands/CommandObjectType.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectType.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Commands/CommandObjectType.cpp (original)
>>> +++ lldb/trunk/source/Commands/CommandObjectType.cpp Mon Dec  3 18:32:51 2012
>>> @@ -209,7 +209,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>           bool success;
>>>
>>>           switch (short_option)
>>> @@ -374,7 +374,7 @@
>>>                       const char *option_value)
>>>       {
>>>           Error error;
>>> -            const char short_option = (char) g_option_table[option_idx].short_option;
>>> +            const int short_option = g_option_table[option_idx].short_option;
>>>           bool success;
>>>
>>>           switch (short_option)
>>> @@ -915,7 +915,7 @@
>>> CommandObjectTypeSummaryAdd::CommandOptions::SetOptionValue (uint32_t option_idx, const char *option_arg)
>>> {
>>>   Error error;
>>> -    char short_option = (char) m_getopt_table[option_idx].val;
>>> +    const int short_option = m_getopt_table[option_idx].val;
>>>   bool success;
>>>
>>>   switch (short_option)
>>> @@ -1417,7 +1417,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>
>>>           switch (short_option)
>>>           {
>>> @@ -1580,7 +1580,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>
>>>           switch (short_option)
>>>           {
>>> @@ -1724,7 +1724,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>
>>>           switch (short_option)
>>>           {
>>> @@ -2287,7 +2287,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>
>>>           switch (short_option)
>>>           {
>>> @@ -2501,7 +2501,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>
>>>           switch (short_option)
>>>           {
>>> @@ -2699,7 +2699,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>
>>>           switch (short_option)
>>>           {
>>> @@ -2865,7 +2865,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>
>>>           switch (short_option)
>>>           {
>>> @@ -3032,7 +3032,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>
>>>           switch (short_option)
>>>           {
>>> @@ -3161,7 +3161,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>
>>>           switch (short_option)
>>>           {
>>> @@ -3658,7 +3658,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>           bool success;
>>>
>>>           switch (short_option)
>>>
>>> Modified: lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp (original)
>>> +++ lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp Mon Dec  3 18:32:51 2012
>>> @@ -213,7 +213,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>
>>>           switch (short_option)
>>>           {
>>> @@ -642,7 +642,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>
>>>           switch (short_option)
>>>           {
>>> @@ -799,7 +799,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>
>>>           switch (short_option)
>>>           {
>>>
>>> Modified: lldb/trunk/source/Commands/CommandObjectWatchpointCommand.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectWatchpointCommand.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Commands/CommandObjectWatchpointCommand.cpp (original)
>>> +++ lldb/trunk/source/Commands/CommandObjectWatchpointCommand.cpp Mon Dec  3 18:32:51 2012
>>> @@ -396,7 +396,7 @@
>>>       SetOptionValue (uint32_t option_idx, const char *option_arg)
>>>       {
>>>           Error error;
>>> -            char short_option = (char) m_getopt_table[option_idx].val;
>>> +            const int short_option = m_getopt_table[option_idx].val;
>>>
>>>           switch (short_option)
>>>           {
>>>
>>> Modified: lldb/trunk/source/Core/Log.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Log.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Core/Log.cpp (original)
>>> +++ lldb/trunk/source/Core/Log.cpp Mon Dec  3 18:32:51 2012
>>> @@ -100,7 +100,7 @@
>>>       if (m_options.Test (LLDB_LOG_OPTION_PREPEND_TIMESTAMP))
>>>       {
>>>           struct timeval tv = TimeValue::Now().GetAsTimeVal();
>>> -            header.Printf ("%9ld.%6.6ld ", tv.tv_sec, tv.tv_usec);
>>> +            header.Printf ("%9ld.%6.6" PRIi32 " ", tv.tv_sec, tv.tv_usec);
>>>       }
>>>
>>>       // Add the process and thread if requested
>>>
>>> Modified: lldb/trunk/source/Interpreter/Args.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/Args.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Interpreter/Args.cpp (original)
>>> +++ lldb/trunk/source/Interpreter/Args.cpp Mon Dec  3 18:32:51 2012
>>> @@ -625,13 +625,16 @@
>>>   {
>>>       if (long_options[i].flag == NULL)
>>>       {
>>> -            sstr << (char)long_options[i].val;
>>> -            switch (long_options[i].has_arg)
>>> +            if (isprint(long_options[i].val))
>>>           {
>>> -            default:
>>> -            case no_argument:                       break;
>>> -            case required_argument: sstr << ':';    break;
>>> -            case optional_argument: sstr << "::";   break;
>>> +                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;
>>> +                }
>>>           }
>>>       }
>>>   }
>>> @@ -645,7 +648,10 @@
>>>   while (1)
>>>   {
>>>       int long_options_index = -1;
>>> -        val = ::getopt_long(GetArgumentCount(), GetArgumentVector(), sstr.GetData(), long_options,
>>> +        val = ::getopt_long(GetArgumentCount(),
>>> +                            GetArgumentVector(),
>>> +                            sstr.GetData(),
>>> +                            long_options,
>>>                           &long_options_index);
>>>       if (val == -1)
>>>           break;
>>> @@ -1092,7 +1098,7 @@
>>> {
>>>   char short_buffer[3];
>>>   char long_buffer[255];
>>> -    ::snprintf (short_buffer, sizeof (short_buffer), "-%c", (char) long_options[long_options_index].val);
>>> +    ::snprintf (short_buffer, sizeof (short_buffer), "-%c", long_options[long_options_index].val);
>>>   ::snprintf (long_buffer, sizeof (long_buffer),  "--%s", long_options[long_options_index].name);
>>>   size_t end = GetArgumentCount ();
>>>   size_t idx = 0;
>>> @@ -1216,7 +1222,7 @@
>>>       if (long_options_index >= 0)
>>>       {
>>>           StreamString option_str;
>>> -            option_str.Printf ("-%c", (char) val);
>>> +            option_str.Printf ("-%c", val);
>>>
>>>           switch (long_options[long_options_index].has_arg)
>>>           {
>>> @@ -1256,16 +1262,14 @@
>>>               }
>>>               break;
>>>           default:
>>> -                result.AppendErrorWithFormat
>>> -                ("error with options table; invalid value in has_arg field for option '%c'.\n",
>>> -                 (char) val);
>>> +                result.AppendErrorWithFormat ("error with options table; invalid value in has_arg field for option '%c'.\n", val);
>>>               result.SetStatus (eReturnStatusFailed);
>>>               break;
>>>           }
>>>       }
>>>       else
>>>       {
>>> -            result.AppendErrorWithFormat ("Invalid option with value '%c'.\n", (char) val);
>>> +            result.AppendErrorWithFormat ("Invalid option with value '%c'.\n", val);
>>>           result.SetStatus (eReturnStatusFailed);
>>>       }
>>>
>>>
>>> Modified: lldb/trunk/source/Interpreter/OptionGroupArchitecture.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupArchitecture.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Interpreter/OptionGroupArchitecture.cpp (original)
>>> +++ lldb/trunk/source/Interpreter/OptionGroupArchitecture.cpp Mon Dec  3 18:32:51 2012
>>> @@ -62,7 +62,7 @@
>>>                                const char *option_arg)
>>> {
>>>   Error error;
>>> -    char short_option = (char) g_option_table[option_idx].short_option;
>>> +    const int short_option = g_option_table[option_idx].short_option;
>>>
>>>   switch (short_option)
>>>   {
>>>
>>> Modified: lldb/trunk/source/Interpreter/OptionGroupBoolean.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupBoolean.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Interpreter/OptionGroupBoolean.cpp (original)
>>> +++ lldb/trunk/source/Interpreter/OptionGroupBoolean.cpp Mon Dec  3 18:32:51 2012
>>> @@ -20,7 +20,7 @@
>>> OptionGroupBoolean::OptionGroupBoolean (uint32_t usage_mask,
>>>                                       bool required,
>>>                                       const char *long_option,
>>> -                                        char short_option,
>>> +                                        int short_option,
>>>                                       const char *usage_text,
>>>                                       bool default_value,
>>>                                       bool no_argument_toggle_default) :
>>>
>>> Modified: lldb/trunk/source/Interpreter/OptionGroupFile.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupFile.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Interpreter/OptionGroupFile.cpp (original)
>>> +++ lldb/trunk/source/Interpreter/OptionGroupFile.cpp Mon Dec  3 18:32:51 2012
>>> @@ -20,7 +20,7 @@
>>> OptionGroupFile::OptionGroupFile (uint32_t usage_mask,
>>>                                 bool required,
>>>                                 const char *long_option,
>>> -                                  char short_option,
>>> +                                  int short_option,
>>>                                 uint32_t completion_type,
>>>                                 lldb::CommandArgumentType argument_type,
>>>                                 const char *usage_text) :
>>> @@ -60,7 +60,7 @@
>>> OptionGroupFileList::OptionGroupFileList (uint32_t usage_mask,
>>>                                         bool required,
>>>                                         const char *long_option,
>>> -                                          char short_option,
>>> +                                          int short_option,
>>>                                         uint32_t completion_type,
>>>                                         lldb::CommandArgumentType argument_type,
>>>                                         const char *usage_text) :
>>> @@ -83,8 +83,8 @@
>>>
>>> Error
>>> OptionGroupFileList::SetOptionValue (CommandInterpreter &interpreter,
>>> -                                 uint32_t option_idx,
>>> -                                 const char *option_arg)
>>> +                                     uint32_t option_idx,
>>> +                                     const char *option_arg)
>>> {
>>>   Error error (m_file_list.SetValueFromCString (option_arg));
>>>   return error;
>>>
>>> Modified: lldb/trunk/source/Interpreter/OptionGroupFormat.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupFormat.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Interpreter/OptionGroupFormat.cpp (original)
>>> +++ lldb/trunk/source/Interpreter/OptionGroupFormat.cpp Mon Dec  3 18:32:51 2012
>>> @@ -67,7 +67,7 @@
>>>                                  const char *option_arg)
>>> {
>>>   Error error;
>>> -    char short_option = (char) g_option_table[option_idx].short_option;
>>> +    const int short_option = g_option_table[option_idx].short_option;
>>>
>>>   switch (short_option)
>>>   {
>>>
>>> Modified: lldb/trunk/source/Interpreter/OptionGroupOutputFile.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupOutputFile.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Interpreter/OptionGroupOutputFile.cpp (original)
>>> +++ lldb/trunk/source/Interpreter/OptionGroupOutputFile.cpp Mon Dec  3 18:32:51 2012
>>> @@ -32,7 +32,7 @@
>>> g_option_table[] =
>>> {
>>>   { LLDB_OPT_SET_1 , false, "outfile", 'o', required_argument, NULL, 0, eArgTypeFilename , "Specify a path for capturing command output."},
>>> -    { LLDB_OPT_SET_1 , false, "append-outfile" , 'A', no_argument, NULL, 0, eArgTypeNone , "Append to the the file specified with '--outfile <path>'."},
>>> +    { LLDB_OPT_SET_1 , false, "append-outfile" , 'apnd', no_argument, NULL, 0, eArgTypeNone , "Append to the the file specified with '--outfile <path>'."},
>>> };
>>>
>>> uint32_t
>>> @@ -49,11 +49,11 @@
>>>
>>> Error
>>> OptionGroupOutputFile::SetOptionValue (CommandInterpreter &interpreter,
>>> -                                         uint32_t option_idx,
>>> -                                         const char *option_arg)
>>> +                                       uint32_t option_idx,
>>> +                                       const char *option_arg)
>>> {
>>>   Error error;
>>> -    char short_option = (char) g_option_table[option_idx].short_option;
>>> +    const int short_option = g_option_table[option_idx].short_option;
>>>
>>>   switch (short_option)
>>>   {
>>> @@ -61,7 +61,7 @@
>>>           error = m_file.SetValueFromCString (option_arg);
>>>           break;
>>>
>>> -        case 'A':
>>> +        case 'apnd':
>>>           m_append.SetCurrentValue(true);
>>>           break;
>>>
>>>
>>> Modified: lldb/trunk/source/Interpreter/OptionGroupPlatform.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupPlatform.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Interpreter/OptionGroupPlatform.cpp (original)
>>> +++ lldb/trunk/source/Interpreter/OptionGroupPlatform.cpp Mon Dec  3 18:32:51 2012
>>> @@ -113,7 +113,7 @@
>>>   if (!m_include_platform_option)
>>>       ++option_idx;
>>>
>>> -    char short_option = (char) g_option_table[option_idx].short_option;
>>> +    const int short_option = g_option_table[option_idx].short_option;
>>>
>>>   switch (short_option)
>>>   {
>>>
>>> Modified: lldb/trunk/source/Interpreter/OptionGroupString.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupString.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Interpreter/OptionGroupString.cpp (original)
>>> +++ lldb/trunk/source/Interpreter/OptionGroupString.cpp Mon Dec  3 18:32:51 2012
>>> @@ -20,7 +20,7 @@
>>> OptionGroupString::OptionGroupString (uint32_t usage_mask,
>>>                                     bool required,
>>>                                     const char *long_option,
>>> -                                      char short_option,
>>> +                                      int short_option,
>>>                                     uint32_t completion_type,
>>>                                     lldb::CommandArgumentType argument_type,
>>>                                     const char *usage_text,
>>>
>>> Modified: lldb/trunk/source/Interpreter/OptionGroupUInt64.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupUInt64.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Interpreter/OptionGroupUInt64.cpp (original)
>>> +++ lldb/trunk/source/Interpreter/OptionGroupUInt64.cpp Mon Dec  3 18:32:51 2012
>>> @@ -20,7 +20,7 @@
>>> OptionGroupUInt64::OptionGroupUInt64 (uint32_t usage_mask,
>>>                                       bool required,
>>>                                       const char *long_option,
>>> -                                        char short_option,
>>> +                                        int short_option,
>>>                                       uint32_t completion_type,
>>>                                       lldb::CommandArgumentType argument_type,
>>>                                       const char *usage_text,
>>>
>>> Modified: lldb/trunk/source/Interpreter/OptionGroupUUID.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupUUID.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Interpreter/OptionGroupUUID.cpp (original)
>>> +++ lldb/trunk/source/Interpreter/OptionGroupUUID.cpp Mon Dec  3 18:32:51 2012
>>> @@ -47,11 +47,11 @@
>>>
>>> Error
>>> OptionGroupUUID::SetOptionValue (CommandInterpreter &interpreter,
>>> -                                         uint32_t option_idx,
>>> -                                         const char *option_arg)
>>> +                                 uint32_t option_idx,
>>> +                                 const char *option_arg)
>>> {
>>>   Error error;
>>> -    char short_option = (char) g_option_table[option_idx].short_option;
>>> +    const int short_option = g_option_table[option_idx].short_option;
>>>
>>>   switch (short_option)
>>>   {
>>>
>>> Modified: lldb/trunk/source/Interpreter/OptionGroupValueObjectDisplay.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupValueObjectDisplay.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Interpreter/OptionGroupValueObjectDisplay.cpp (original)
>>> +++ lldb/trunk/source/Interpreter/OptionGroupValueObjectDisplay.cpp Mon Dec  3 18:32:51 2012
>>> @@ -64,7 +64,7 @@
>>>                                              const char *option_arg)
>>> {
>>>   Error error;
>>> -    char short_option = (char) g_option_table[option_idx].short_option;
>>> +    const int short_option = g_option_table[option_idx].short_option;
>>>   bool success = false;
>>>
>>>   switch (short_option)
>>>
>>> Modified: lldb/trunk/source/Interpreter/OptionGroupVariable.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupVariable.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Interpreter/OptionGroupVariable.cpp (original)
>>> +++ lldb/trunk/source/Interpreter/OptionGroupVariable.cpp Mon Dec  3 18:32:51 2012
>>> @@ -24,14 +24,14 @@
>>> static OptionDefinition
>>> g_option_table[] =
>>> {
>>> -    { LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "no-args",         'a', no_argument,       NULL, 0, eArgTypeNone,    "Omit function arguments."},
>>> -    { LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "no-locals",       'l', no_argument,       NULL, 0, eArgTypeNone,    "Omit local variables."},
>>> -    { LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "show-globals",    'g', no_argument,       NULL, 0, eArgTypeNone,    "Show the current frame source file global and static variables."},
>>> -    { LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "show-declaration",'c', no_argument,       NULL, 0, eArgTypeNone,    "Show variable declaration information (source file and line where the variable was declared)."},
>>> -    { LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "regex",           'r', no_argument,       NULL, 0, eArgTypeRegularExpression,    "The <variable-name> argument for name lookups are regular expressions."},
>>> -    { LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "scope",           's', no_argument,       NULL, 0, eArgTypeNone,    "Show variable scope (argument, local, global, static)."},
>>> -    { LLDB_OPT_SET_1, false, "summary",         'y', required_argument, NULL, 0, eArgTypeName,  "Specify the summary that the variable output should use."},
>>> -    { LLDB_OPT_SET_2, false, "summary-string",  'z', required_argument, NULL, 0, eArgTypeName,  "Specify a summary string to use to format the variable output."},
>>> +    { LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "no-args",         'a', no_argument,       NULL, 0, eArgTypeNone, "Omit function arguments."},
>>> +    { LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "no-locals",       'l', no_argument,       NULL, 0, eArgTypeNone, "Omit local variables."},
>>> +    { LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "show-globals",    'g', no_argument,       NULL, 0, eArgTypeNone, "Show the current frame source file global and static variables."},
>>> +    { LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "show-declaration",'c', no_argument,       NULL, 0, eArgTypeNone, "Show variable declaration information (source file and line where the variable was declared)."},
>>> +    { LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "regex",           'r', no_argument,       NULL, 0, eArgTypeRegularExpression, "The <variable-name> argument for name lookups are regular expressions."},
>>> +    { LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "scope",           's', no_argument,       NULL, 0, eArgTypeNone, "Show variable scope (argument, local, global, static)."},
>>> +    { LLDB_OPT_SET_1,                  false, "summary",         'y', required_argument, NULL, 0, eArgTypeName, "Specify the summary that the variable output should use."},
>>> +    { LLDB_OPT_SET_2,                  false, "summary-string",  'z', required_argument, NULL, 0, eArgTypeName, "Specify a summary string to use to format the variable output."},
>>> };
>>>
>>>
>>> @@ -53,7 +53,7 @@
>>>   Error error;
>>>   if (!include_frame_options)
>>>       option_idx += 3;
>>> -    char short_option = (char) g_option_table[option_idx].short_option;
>>> +    const int short_option = g_option_table[option_idx].short_option;
>>>   switch (short_option)
>>>   {
>>>       case 'r':   use_regex    = true;  break;
>>>
>>> Modified: lldb/trunk/source/Interpreter/OptionGroupWatchpoint.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupWatchpoint.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Interpreter/OptionGroupWatchpoint.cpp (original)
>>> +++ lldb/trunk/source/Interpreter/OptionGroupWatchpoint.cpp Mon Dec  3 18:32:51 2012
>>> @@ -73,7 +73,7 @@
>>>                                      const char *option_arg)
>>> {
>>>   Error error;
>>> -    char short_option = (char) g_option_table[option_idx].short_option;
>>> +    const int short_option = g_option_table[option_idx].short_option;
>>>   switch (short_option)
>>>   {
>>>       case 'w':
>>>
>>> Modified: lldb/trunk/source/Interpreter/Options.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/Options.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Interpreter/Options.cpp (original)
>>> +++ lldb/trunk/source/Interpreter/Options.cpp Mon Dec  3 18:32:51 2012
>>> @@ -13,7 +13,7 @@
>>> // C++ Includes
>>> #include <algorithm>
>>> #include <bitset>
>>> -#include <set>
>>> +#include <map>
>>>
>>> // Other libraries and framework includes
>>> // Project includes
>>> @@ -58,7 +58,7 @@
>>> void
>>> Options::OptionSeen (int option_idx)
>>> {
>>> -    m_seen_options.insert ((char) option_idx);
>>> +    m_seen_options.insert (option_idx);
>>> }
>>>
>>> // Returns true is set_a is a subset of set_b;  Otherwise returns false.
>>> @@ -266,37 +266,54 @@
>>>           return NULL;
>>>
>>>       uint32_t i;
>>> -        uint32_t j;
>>>       const OptionDefinition *opt_defs = GetDefinitions();
>>>
>>> -        std::bitset<256> option_seen;
>>> +        std::map<int, uint32_t> option_seen;
>>>
>>>       m_getopt_table.resize(num_options + 1);
>>> -        for (i = 0, j = 0; i < num_options; ++i)
>>> +        for (i = 0; i < num_options; ++i)
>>>       {
>>> -            const char short_opt = opt_defs[i].short_option;
>>> +            const int short_opt = opt_defs[i].short_option;
>>> +
>>> +            m_getopt_table[i].name    = opt_defs[i].long_option;
>>> +            m_getopt_table[i].has_arg = opt_defs[i].option_has_arg;
>>> +            m_getopt_table[i].flag    = NULL;
>>> +            m_getopt_table[i].val     = short_opt;
>>>
>>> -            if (option_seen.test(short_opt) == false)
>>> +            if (option_seen.find(short_opt) == option_seen.end())
>>>           {
>>> -                m_getopt_table[j].name    = opt_defs[i].long_option;
>>> -                m_getopt_table[j].has_arg = opt_defs[i].option_has_arg;
>>> -                m_getopt_table[j].flag    = NULL;
>>> -                m_getopt_table[j].val     = short_opt;
>>> -                option_seen.set(short_opt);
>>> -                ++j;
>>> +                option_seen[short_opt] = i;
>>>           }
>>> -            else
>>> +            else if (short_opt)
>>>           {
>>> -                assert (!"duplicate short option character");
>>> +                m_getopt_table[i].val = 0;
>>> +                std::map<int, uint32_t>::const_iterator pos = option_seen.find(short_opt);
>>> +                StreamString strm;
>>> +                if (isprint(short_opt))
>>> +                    Host::SystemLog (Host::eSystemLogError, "option[%u] --%s has a short option -%c that conflicts with option[%u] --%s, short option won't be used for --%s\n",
>>> +                                i,
>>> +                                opt_defs[i].long_option,
>>> +                                short_opt,
>>> +                                pos->second,
>>> +                                m_getopt_table[pos->second].name,
>>> +                                opt_defs[i].long_option);
>>> +                else
>>> +                    Host::SystemLog (Host::eSystemLogError, "option[%u] --%s has a short option 0x%x that conflicts with option[%u] --%s, short option won't be used for --%s\n",
>>> +                                i,
>>> +                                opt_defs[i].long_option,
>>> +                                short_opt,
>>> +                                pos->second,
>>> +                                m_getopt_table[pos->second].name,
>>> +                                opt_defs[i].long_option);
>>>           }
>>>       }
>>>
>>>       //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;
>>> +        m_getopt_table[i].name    = NULL;
>>> +        m_getopt_table[i].has_arg = 0;
>>> +        m_getopt_table[i].flag    = NULL;
>>> +        m_getopt_table[i].val     = 0;
>>>   }
>>>
>>>   if (m_getopt_table.empty())
>>> @@ -393,6 +410,57 @@
>>>   return false;
>>> }
>>>
>>> +enum OptionDisplayType
>>> +{
>>> +    eDisplayBestOption,
>>> +    eDisplayShortOption,
>>> +    eDisplayLongOption
>>> +};
>>> +
>>> +static bool
>>> +PrintOption (const OptionDefinition &opt_def,
>>> +             OptionDisplayType display_type,
>>> +             const char *header,
>>> +             const char *footer,
>>> +             bool show_optional,
>>> +             Stream &strm)
>>> +{
>>> +    const bool has_short_option = isprint(opt_def.short_option) != 0;
>>> +
>>> +    if (display_type == eDisplayShortOption && !has_short_option)
>>> +        return false;
>>> +
>>> +    if (header && header[0])
>>> +        strm.PutCString(header);
>>> +
>>> +    if (show_optional && !opt_def.required)
>>> +    strm.PutChar('[');
>>> +    const bool show_short_option = has_short_option && display_type != eDisplayLongOption;
>>> +    if (show_short_option)
>>> +        strm.Printf ("-%c", opt_def.short_option);
>>> +    else
>>> +        strm.Printf ("--%s", opt_def.long_option);
>>> +    switch (opt_def.option_has_arg)
>>> +    {
>>> +        case no_argument:
>>> +            break;
>>> +        case required_argument:
>>> +            strm.Printf (" <%s>", CommandObject::GetArgumentName (opt_def.argument_type));
>>> +            break;
>>> +
>>> +        case optional_argument:
>>> +            strm.Printf ("%s[<%s>]",
>>> +                         show_short_option ? "" : "=",
>>> +                         CommandObject::GetArgumentName (opt_def.argument_type));
>>> +            break;
>>> +    }
>>> +    if (show_optional && !opt_def.required)
>>> +        strm.PutChar(']');
>>> +    if (footer && footer[0])
>>> +        strm.PutCString(footer);
>>> +    return true;
>>> +}
>>> +
>>> void
>>> Options::GenerateOptionUsage
>>> (
>>> @@ -450,12 +518,12 @@
>>>       // a single string. If a command has "-a" "-b" and "-c", this will show
>>>       // up as [-abc]
>>>
>>> -        std::set<char> options;
>>> -        std::set<char>::const_iterator options_pos, options_end;
>>> +        std::set<int> options;
>>> +        std::set<int>::const_iterator options_pos, options_end;
>>>       bool first;
>>>       for (i = 0, first = true; i < num_options; ++i)
>>>       {
>>> -            if (opt_defs[i].usage_mask & opt_set_mask)
>>> +            if (opt_defs[i].usage_mask & opt_set_mask && isprint(opt_defs[i].short_option))
>>>           {
>>>               // Add current option to the end of out_stream.
>>>
>>> @@ -476,17 +544,17 @@
>>>                    options_pos != options_end;
>>>                    ++options_pos)
>>>               {
>>> -                    if (i==0 && ::isupper (*options_pos))
>>> +                    if (i==0 && ::islower (*options_pos))
>>>                       continue;
>>> -                    if (i==1 && ::islower (*options_pos))
>>> +                    if (i==1 && ::isupper (*options_pos))
>>>                       continue;
>>> -                    strm << *options_pos;
>>> +                    strm << (char)*options_pos;
>>>               }
>>>       }
>>>
>>>       for (i = 0, options.clear(); i < num_options; ++i)
>>>       {
>>> -            if (opt_defs[i].usage_mask & opt_set_mask)
>>> +            if (opt_defs[i].usage_mask & opt_set_mask && isprint(opt_defs[i].short_option))
>>>           {
>>>               // Add current option to the end of out_stream.
>>>
>>> @@ -507,11 +575,11 @@
>>>                    options_pos != options_end;
>>>                    ++options_pos)
>>>               {
>>> -                    if (i==0 && ::isupper (*options_pos))
>>> +                    if (i==0 && ::islower (*options_pos))
>>>                       continue;
>>> -                    if (i==1 && ::islower (*options_pos))
>>> +                    if (i==1 && ::isupper (*options_pos))
>>>                       continue;
>>> -                    strm << *options_pos;
>>> +                    strm << (char)*options_pos;
>>>               }
>>>           strm.PutChar(']');
>>>       }
>>> @@ -520,26 +588,10 @@
>>>
>>>       for (i = 0; i < num_options; ++i)
>>>       {
>>> -            if (opt_defs[i].usage_mask & opt_set_mask)
>>> +            if (opt_defs[i].usage_mask & opt_set_mask && isprint(opt_defs[i].short_option))
>>>           {
>>> -                // Add current option to the end of out_stream.
>>> -                CommandArgumentType arg_type = opt_defs[i].argument_type;
>>> -
>>> -                if (opt_defs[i].required)
>>> -                {
>>> -                    if (opt_defs[i].option_has_arg == required_argument)
>>> -                    {
>>> -                        strm.Printf (" -%c <%s>",
>>> -                                     opt_defs[i].short_option,
>>> -                                     CommandObject::GetArgumentName (arg_type));
>>> -                    }
>>> -                    else if (opt_defs[i].option_has_arg == optional_argument)
>>> -                    {
>>> -                        strm.Printf (" -%c [<%s>]",
>>> -                                     opt_defs[i].short_option,
>>> -                                     CommandObject::GetArgumentName (arg_type));
>>> -                    }
>>> -                }
>>> +                if (opt_defs[i].required && opt_defs[i].option_has_arg != no_argument)
>>> +                    PrintOption (opt_defs[i], eDisplayBestOption, " ", NULL, true, strm);
>>>           }
>>>       }
>>>
>>> @@ -551,17 +603,8 @@
>>>           {
>>>               // Add current option to the end of out_stream.
>>>
>>> -                CommandArgumentType arg_type = opt_defs[i].argument_type;
>>> -
>>> -                if (! opt_defs[i].required)
>>> -                {
>>> -                    if (opt_defs[i].option_has_arg == required_argument)
>>> -                        strm.Printf (" [-%c <%s>]", opt_defs[i].short_option,
>>> -                                     CommandObject::GetArgumentName (arg_type));
>>> -                    else if (opt_defs[i].option_has_arg == optional_argument)
>>> -                        strm.Printf (" [-%c [<%s>]]", opt_defs[i].short_option,
>>> -                                     CommandObject::GetArgumentName (arg_type));
>>> -                }
>>> +                if (!opt_defs[i].required && opt_defs[i].option_has_arg != no_argument)
>>> +                    PrintOption (opt_defs[i], eDisplayBestOption, " ", NULL, true, strm);
>>>           }
>>>       }
>>>
>>> @@ -592,86 +635,69 @@
>>>   // 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;
>>> +    std::multimap<int, uint32_t> options_seen;
>>>   strm.IndentMore (5);
>>>
>>> -    std::vector<char> sorted_options;
>>> -
>>> -
>>>   // Put the unique command options in a vector & sort it, so we can output them alphabetically (by short_option)
>>>   // when writing out detailed help for each option.
>>>
>>>   for (i = 0; i < num_options; ++i)
>>> -    {
>>> -        pos = options_seen.find (opt_defs[i].short_option);
>>> -        if (pos == options_seen.end())
>>> -        {
>>> -            options_seen.insert (opt_defs[i].short_option);
>>> -            sorted_options.push_back (opt_defs[i].short_option);
>>> -        }
>>> -    }
>>> -
>>> -    std::sort (sorted_options.begin(), sorted_options.end());
>>> +        options_seen.insert(std::make_pair(opt_defs[i].short_option, i));
>>>
>>>   // Go through the unique'd and alphabetically sorted vector of options, find the table entry for each option
>>>   // and write out the detailed help information for that option.
>>>
>>> -    int first_option_printed = 1;
>>> -    size_t end = sorted_options.size();
>>> -    for (size_t j = 0; j < end; ++j)
>>> -    {
>>> -        char option = sorted_options[j];
>>> -        bool found = false;
>>> -        for (i = 0; i < num_options && !found; ++i)
>>> +    bool first_option_printed = false;;
>>> +
>>> +    for (auto pos : options_seen)
>>> +    {
>>> +        i = pos.second;
>>> +        //Print out the help information for this option.
>>> +
>>> +        // Put a newline separation between arguments
>>> +        if (first_option_printed)
>>> +            strm.EOL();
>>> +        else
>>> +            first_option_printed = true;
>>> +
>>> +        CommandArgumentType arg_type = opt_defs[i].argument_type;
>>> +
>>> +        StreamString arg_name_str;
>>> +        arg_name_str.Printf ("<%s>", CommandObject::GetArgumentName (arg_type));
>>> +
>>> +        strm.Indent ();
>>> +        if (opt_defs[i].short_option && isprint(opt_defs[i].short_option))
>>> +        {
>>> +            PrintOption (opt_defs[i], eDisplayShortOption, NULL, NULL, false, strm);
>>> +            PrintOption (opt_defs[i], eDisplayLongOption, " ( ", " )", false, strm);
>>> +        }
>>> +        else
>>>       {
>>> -            if (opt_defs[i].short_option == option)
>>> +            // Short option is not printable, just print long option
>>> +            PrintOption (opt_defs[i], eDisplayLongOption, NULL, NULL, false, strm);
>>> +        }
>>> +        strm.EOL();
>>> +
>>> +        strm.IndentMore (5);
>>> +
>>> +        if (opt_defs[i].usage_text)
>>> +            OutputFormattedUsageText (strm,
>>> +                                      opt_defs[i].usage_text,
>>> +                                      screen_width);
>>> +        if (opt_defs[i].enum_values != NULL)
>>> +        {
>>> +            strm.Indent ();
>>> +            strm.Printf("Values: ");
>>> +            for (int k = 0; opt_defs[i].enum_values[k].string_value != NULL; k++)
>>>           {
>>> -                found = true;
>>> -                //Print out the help information for this option.
>>> -
>>> -                // Put a newline separation between arguments
>>> -                if (first_option_printed)
>>> -                    first_option_printed = 0;
>>> +                if (k == 0)
>>> +                    strm.Printf("%s", opt_defs[i].enum_values[k].string_value);
>>>               else
>>> -                    strm.EOL();
>>> -
>>> -                CommandArgumentType arg_type = opt_defs[i].argument_type;
>>> -
>>> -                StreamString arg_name_str;
>>> -                arg_name_str.Printf ("<%s>", CommandObject::GetArgumentName (arg_type));
>>> -
>>> -                strm.Indent ();
>>> -                strm.Printf ("-%c", opt_defs[i].short_option);
>>> -                if (arg_type != eArgTypeNone)
>>> -                    strm.Printf (" <%s>",  CommandObject::GetArgumentName (arg_type));
>>> -                strm.Printf ("  ( --%s", opt_defs[i].long_option);
>>> -                if (arg_type != eArgTypeNone)
>>> -                    strm.Printf (" <%s>", CommandObject::GetArgumentName (arg_type));
>>> -                strm.PutCString(" )\n");
>>> -
>>> -                strm.IndentMore (5);
>>> -
>>> -                if (opt_defs[i].usage_text)
>>> -                    OutputFormattedUsageText (strm,
>>> -                                              opt_defs[i].usage_text,
>>> -                                              screen_width);
>>> -                if (opt_defs[i].enum_values != NULL)
>>> -                {
>>> -                    strm.Indent ();
>>> -                    strm.Printf("Values: ");
>>> -                    for (int k = 0; opt_defs[i].enum_values[k].string_value != NULL; k++)
>>> -                    {
>>> -                        if (k == 0)
>>> -                            strm.Printf("%s", opt_defs[i].enum_values[k].string_value);
>>> -                        else
>>> -                            strm.Printf(" | %s", opt_defs[i].enum_values[k].string_value);
>>> -                    }
>>> -                    strm.EOL();
>>> -                }
>>> -                strm.IndentLess (5);
>>> +                    strm.Printf(" | %s", opt_defs[i].enum_values[k].string_value);
>>>           }
>>> +            strm.EOL();
>>>       }
>>> +        strm.IndentLess (5);
>>>   }
>>>
>>>   // Restore the indent level
>>>
>>> Modified: lldb/trunk/source/Symbol/VariableList.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/VariableList.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Symbol/VariableList.cpp (original)
>>> +++ lldb/trunk/source/Symbol/VariableList.cpp Mon Dec  3 18:32:51 2012
>>> @@ -67,7 +67,7 @@
>>> }
>>>
>>> VariableSP
>>> -VariableList::GetVariableAtIndex(uint32_t idx)
>>> +VariableList::GetVariableAtIndex(uint32_t idx) const
>>> {
>>>   VariableSP var_sp;
>>>   if (idx < m_variables.size())
>>>
>>> Modified: lldb/trunk/source/Target/Process.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/source/Target/Process.cpp (original)
>>> +++ lldb/trunk/source/Target/Process.cpp Mon Dec  3 18:32:51 2012
>>> @@ -681,7 +681,7 @@
>>> ProcessLaunchCommandOptions::SetOptionValue (uint32_t option_idx, const char *option_arg)
>>> {
>>>   Error error;
>>> -    char short_option = (char) m_getopt_table[option_idx].val;
>>> +    const int short_option = m_getopt_table[option_idx].val;
>>>
>>>   switch (short_option)
>>>   {
>>>
>>> Modified: lldb/trunk/test/expression_command/formatters/TestFormatters.py
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/formatters/TestFormatters.py?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/test/expression_command/formatters/TestFormatters.py (original)
>>> +++ lldb/trunk/test/expression_command/formatters/TestFormatters.py Mon Dec  3 18:32:51 2012
>>> @@ -52,9 +52,9 @@
>>>       self.runCmd("script import formatters")
>>>       self.runCmd("script import foosynth")
>>>
>>> -        self.runCmd("frame variable foo1 -T")
>>> -        self.runCmd("frame variable foo1.b -T")
>>> -        self.runCmd("frame variable foo1.b.b_ref -T")
>>> +        self.runCmd("frame variable foo1 --show-types")
>>> +        self.runCmd("frame variable foo1.b --show-types")
>>> +        self.runCmd("frame variable foo1.b.b_ref --show-types")
>>>
>>>       self.expect("expression *(new foo(47))",
>>>           substrs = ['(int) a = 47', '(bar) b = {', '(int) i = 94', '(baz) b = {', '(int) k = 99'])
>>>
>>> Modified: lldb/trunk/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py (original)
>>> +++ lldb/trunk/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py Mon Dec  3 18:32:51 2012
>>> @@ -54,7 +54,7 @@
>>>       lldbutil.run_break_set_by_file_and_line (self, "main.c", self.line, num_expected_locations=1, loc_exact=True)
>>>
>>>       # Now add callbacks for the breakpoints just created.
>>> -        self.runCmd("breakpoint command add -s command -o 'frame variable -T -s' 1")
>>> +        self.runCmd("breakpoint command add -s command -o 'frame variable --show-types --scope' 1")
>>>       self.runCmd("breakpoint command add -s python -o 'here = open(\"output.txt\", \"w\"); print >> here, \"lldb\"; here.close()' 2")
>>>       self.runCmd("breakpoint command add --python-function bktptcmd.function 3")
>>>
>>> @@ -73,7 +73,7 @@
>>>
>>>       self.expect("breakpoint command list 1", "Breakpoint 1 command ok",
>>>           substrs = ["Breakpoint commands:",
>>> -                          "frame variable -T -s"])
>>> +                          "frame variable --show-types --scope"])
>>>       self.expect("breakpoint command list 2", "Breakpoint 2 command ok",
>>>           substrs = ["Breakpoint commands:",
>>>                         "here = open",
>>>
>>> Modified: lldb/trunk/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py (original)
>>> +++ lldb/trunk/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py Mon Dec  3 18:32:51 2012
>>> @@ -85,8 +85,8 @@
>>>       self.expect("process status", PROCESS_STOPPED,
>>>           patterns = ['Process .* stopped'])
>>>
>>> -        # 'frame variable -T val' should return 3 due to breakpoint condition.
>>> -        self.expect("frame variable -T val", VARIABLES_DISPLAYED_CORRECTLY,
>>> +        # 'frame variable --show-types val' should return 3 due to breakpoint condition.
>>> +        self.expect("frame variable --show-types val", VARIABLES_DISPLAYED_CORRECTLY,
>>>           startstr = '(int) val = 3')
>>>
>>>       # Also check the hit count, which should be 3, by design.
>>> @@ -116,8 +116,8 @@
>>>       self.expect("process status", PROCESS_STOPPED,
>>>           patterns = ['Process .* stopped'])
>>>
>>> -        # 'frame variable -T val' should return 1 since it is the first breakpoint hit.
>>> -        self.expect("frame variable -T val", VARIABLES_DISPLAYED_CORRECTLY,
>>> +        # 'frame variable --show-types val' should return 1 since it is the first breakpoint hit.
>>> +        self.expect("frame variable --show-types val", VARIABLES_DISPLAYED_CORRECTLY,
>>>           startstr = '(int) val = 1')
>>>
>>>
>>>
>>> Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py (original)
>>> +++ lldb/trunk/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py Mon Dec  3 18:32:51 2012
>>> @@ -284,7 +284,7 @@
>>>                              'i_2',
>>>                              'k_2',
>>>                              'o_2'])
>>> -        self.expect('frame variable a_long_guy -A', matching=False,
>>> +        self.expect('frame variable a_long_guy --show-all-children', matching=False,
>>>                   substrs = ['...'])
>>>
>>>
>>>
>>> Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/test/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py (original)
>>> +++ lldb/trunk/test/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py Mon Dec  3 18:32:51 2012
>>> @@ -126,7 +126,7 @@
>>>                              'a = 280']);
>>>
>>>       # check that expanding a pointer does the right thing
>>> -        self.expect("frame variable -P 1 f00_ptr",
>>> +        self.expect("frame variable --ptr-depth 1 f00_ptr",
>>>           substrs = ['r = 45',
>>>                      'fake_a = 218103808',
>>>                      'a = 12'])
>>> @@ -139,7 +139,7 @@
>>>       self.expect('frame variable f00_1', matching=False,
>>>           substrs = ['b = 1',
>>>                      'j = 17'])
>>> -        self.expect("frame variable -P 1 f00_ptr",
>>> +        self.expect("frame variable --ptr-depth 1 f00_ptr",
>>>                   substrs = ['r = 45',
>>>                              'fake_a = 218103808',
>>>                              'a = 12'])
>>> @@ -151,7 +151,7 @@
>>>       self.expect('frame variable f00_1',
>>>                       substrs = ['b = 1',
>>>                                  'j = 17'])
>>> -        self.expect("frame variable -P 1 f00_ptr", matching=False,
>>> +        self.expect("frame variable --ptr-depth 1 f00_ptr", matching=False,
>>>                   substrs = ['r = 45',
>>>                              'fake_a = 218103808',
>>>                              'a = 12'])
>>> @@ -176,7 +176,7 @@
>>>       self.expect('frame variable f00_1', matching=False,
>>>                   substrs = ['b = 1',
>>>                              'j = 17'])
>>> -        self.expect("frame variable -P 1 f00_ptr",
>>> +        self.expect("frame variable --ptr-depth 1 f00_ptr",
>>>                   substrs = ['r = 45',
>>>                              'fake_a = 218103808',
>>>                              'a = 12'])
>>>
>>> Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py (original)
>>> +++ lldb/trunk/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py Mon Dec  3 18:32:51 2012
>>> @@ -74,7 +74,7 @@
>>>                      '}'])
>>>
>>>       # Skip the default (should be 1) levels of summaries
>>> -        self.expect('frame variable -Y',
>>> +        self.expect('frame variable --no-summary-depth',
>>>           substrs = ['(DeepData_1) data1 = {',
>>>                      'm_child1 = 0x',
>>>                      '}',
>>> @@ -86,7 +86,7 @@
>>>                      '}'])
>>>
>>>       # Now skip 2 levels of summaries
>>> -        self.expect('frame variable -Y2',
>>> +        self.expect('frame variable --no-summary-depth=2',
>>>           substrs = ['(DeepData_1) data1 = {',
>>>                      'm_child1 = 0x',
>>>                      '}',
>>> @@ -99,15 +99,15 @@
>>>                      '}'])
>>>
>>>       # Check that no "Level 3" comes out
>>> -        self.expect('frame variable data1.m_child1 -Y2', matching=False,
>>> +        self.expect('frame variable data1.m_child1 --no-summary-depth=2', matching=False,
>>>           substrs = ['Level 3'])
>>>
>>>       # Now expand a pointer with 2 level of skipped summaries
>>> -        self.expect('frame variable data1.m_child1 -Y2',
>>> +        self.expect('frame variable data1.m_child1 --no-summary-depth=2',
>>>                   substrs = ['(DeepData_2 *) data1.m_child1 = 0x'])
>>>
>>>       # Deref and expand said pointer
>>> -        self.expect('frame variable *data1.m_child1 -Y2',
>>> +        self.expect('frame variable *data1.m_child1 --no-summary-depth=2',
>>>                   substrs = ['(DeepData_2) *data1.m_child1 = {',
>>>                              'm_child2 = {',
>>>                              'm_child1 = 0x',
>>> @@ -115,7 +115,7 @@
>>>                              '}'])
>>>
>>>       # Expand an expression, skipping 2 layers of summaries
>>> -        self.expect('frame variable data1.m_child1->m_child2 -Y2',
>>> +        self.expect('frame variable data1.m_child1->m_child2 --no-summary-depth=2',
>>>               substrs = ['(DeepData_3) data1.m_child1->m_child2 = {',
>>>                          'm_child2 = {',
>>>                          'm_child1 = Level 5',
>>> @@ -124,7 +124,7 @@
>>>                          '}'])
>>>
>>>       # Expand same expression, skipping only 1 layer of summaries
>>> -        self.expect('frame variable data1.m_child1->m_child2 -Y1',
>>> +        self.expect('frame variable data1.m_child1->m_child2 --no-summary-depth=1',
>>>                   substrs = ['(DeepData_3) data1.m_child1->m_child2 = {',
>>>                              'm_child1 = 0x',
>>>                              'Level 4',
>>> @@ -148,14 +148,14 @@
>>>                      self.skipTest("rdar://problem/9804600 wrong namespace for std::string in debug info")
>>>
>>>       # Expand same expression, skipping 3 layers of summaries
>>> -        self.expect('frame variable data1.m_child1->m_child2 -T -Y3',
>>> +        self.expect('frame variable data1.m_child1->m_child2 --show-types --no-summary-depth=3',
>>>                   substrs = ['(DeepData_3) data1.m_child1->m_child2 = {',
>>>                              'm_some_text = "Just a test"',
>>>                              'm_child2 = {',
>>>                              'm_some_text = "Just a test"'])
>>>
>>>       # Expand within a standard string (might depend on the implementation of the C++ stdlib you use)
>>> -        self.expect('frame variable data1.m_child1->m_child2.m_child1.m_child2 -Y2',
>>> +        self.expect('frame variable data1.m_child1->m_child2.m_child1.m_child2 --no-summary-depth=2',
>>>           substrs = ['(DeepData_5) data1.m_child1->m_child2.m_child1.m_child2 = {',
>>>                      'm_some_text = {',
>>>                      '_M_dataplus = {',
>>> @@ -163,18 +163,18 @@
>>>                      '"Just a test"'])
>>>
>>>       # Repeat the above, but only skip 1 level of summaries
>>> -        self.expect('frame variable data1.m_child1->m_child2.m_child1.m_child2 -Y1',
>>> +        self.expect('frame variable data1.m_child1->m_child2.m_child1.m_child2 --no-summary-depth=1',
>>>                   substrs = ['(DeepData_5) data1.m_child1->m_child2.m_child1.m_child2 = {',
>>>                              'm_some_text = "Just a test"',
>>>                              '}'])
>>>
>>> -        # Change summary and expand, first without -Y then with -Y
>>> +        # Change summary and expand, first without --no-summary-depth then with --no-summary-depth
>>>       self.runCmd("type summary add --summary-string \"${var.m_some_text}\" DeepData_5")
>>>
>>>       self.expect('fr var data2.m_child4.m_child2.m_child2',
>>>           substrs = ['(DeepData_5) data2.m_child4.m_child2.m_child2 = "Just a test"'])
>>>
>>> -        self.expect('fr var data2.m_child4.m_child2.m_child2 -Y',
>>> +        self.expect('fr var data2.m_child4.m_child2.m_child2 --no-summary-depth',
>>>                   substrs = ['(DeepData_5) data2.m_child4.m_child2.m_child2 = {',
>>>                              'm_some_text = "Just a test"',
>>>                              '}'])
>>>
>>> Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py (original)
>>> +++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py Mon Dec  3 18:32:51 2012
>>> @@ -58,7 +58,7 @@
>>>       # Execute the cleanup function during test case tear down.
>>>       self.addTearDownHook(cleanup)
>>>
>>> -        self.runCmd("frame variable numbers_list -T")
>>> +        self.runCmd("frame variable numbers_list --show-types")
>>>       self.runCmd("type summary add std::int_list std::string_list int_list string_list --summary-string \"list has ${svar%#} items\" -e")
>>>       self.runCmd("type format add -f hex int")
>>>
>>>
>>> Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py (original)
>>> +++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py Mon Dec  3 18:32:51 2012
>>> @@ -58,7 +58,7 @@
>>>
>>>       self.expect('image list',substrs=['libc++.1.dylib','libc++abi.dylib'])
>>>
>>> -        self.runCmd("frame variable ii -T")
>>> +        self.runCmd("frame variable ii --show-types")
>>>
>>>       self.runCmd("type summary add -x \"std::__1::map<\" --summary-string \"map has ${svar%#} items\" -e")
>>>
>>> @@ -135,7 +135,7 @@
>>>                   substrs = ['map has 0 items',
>>>                              '{}'])
>>>
>>> -        self.runCmd("frame variable si -T")
>>> +        self.runCmd("frame variable si --show-types")
>>>
>>>       self.expect('frame variable si',
>>>                   substrs = ['map has 0 items',
>>> @@ -206,7 +206,7 @@
>>>                              '{}'])
>>>
>>>       self.runCmd("n")
>>> -        self.runCmd("frame variable is -T")
>>> +        self.runCmd("frame variable is --show-types")
>>>
>>>       self.expect('frame variable is',
>>>                   substrs = ['map has 0 items',
>>> @@ -267,7 +267,7 @@
>>>                              '{}'])
>>>
>>>       self.runCmd("n");self.runCmd("n");
>>> -        self.runCmd("frame variable ss -T")
>>> +        self.runCmd("frame variable ss --show-types")
>>>
>>>       self.expect('frame variable ss',
>>>                   substrs = ['map has 0 items',
>>>
>>> Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py (original)
>>> +++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py Mon Dec  3 18:32:51 2012
>>> @@ -56,7 +56,7 @@
>>>       # Execute the cleanup function during test case tear down.
>>>       self.addTearDownHook(cleanup)
>>>
>>> -        self.runCmd("frame variable numbers_list -T")
>>> +        self.runCmd("frame variable numbers_list --show-types")
>>>       #self.runCmd("type synth add std::int_list std::string_list int_list string_list -l StdListSynthProvider")
>>>       self.runCmd("type summary add std::int_list std::string_list int_list string_list --summary-string \"list has ${svar%#} items\" -e")
>>>       self.runCmd("type format add -f hex int")
>>>
>>> Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py (original)
>>> +++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py Mon Dec  3 18:32:51 2012
>>> @@ -56,7 +56,7 @@
>>>       # Execute the cleanup function during test case tear down.
>>>       self.addTearDownHook(cleanup)
>>>
>>> -        self.runCmd("frame variable ii -T")
>>> +        self.runCmd("frame variable ii --show-types")
>>>
>>>       self.runCmd("type summary add -x \"std::map<\" --summary-string \"map has ${svar%#} items\" -e")
>>>
>>> @@ -136,7 +136,7 @@
>>>                              '{}'])
>>>
>>>       self.runCmd("n")
>>> -        self.runCmd("frame variable si -T")
>>> +        self.runCmd("frame variable si --show-types")
>>>
>>>       self.expect('frame variable si',
>>>                   substrs = ['map has 0 items',
>>> @@ -211,7 +211,7 @@
>>>                              '{}'])
>>>
>>>       self.runCmd("n")
>>> -        self.runCmd("frame variable is -T")
>>> +        self.runCmd("frame variable is --show-types")
>>>
>>>       self.expect('frame variable is',
>>>                   substrs = ['map has 0 items',
>>> @@ -272,7 +272,7 @@
>>>                              '{}'])
>>>
>>>       self.runCmd("n")
>>> -        self.runCmd("frame variable ss -T")
>>> +        self.runCmd("frame variable ss --show-types")
>>>
>>>       self.expect('frame variable ss',
>>>                   substrs = ['map has 0 items',
>>>
>>> Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-synth/TestDataFormatterSynth.py
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-synth/TestDataFormatterSynth.py?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/test/functionalities/data-formatter/data-formatter-synth/TestDataFormatterSynth.py (original)
>>> +++ lldb/trunk/test/functionalities/data-formatter/data-formatter-synth/TestDataFormatterSynth.py Mon Dec  3 18:32:51 2012
>>> @@ -71,7 +71,7 @@
>>>                              'z = 8'])
>>>
>>>       # if we skip synth and summary show y
>>> -        self.expect("frame variable int_bag -S false -Y1",
>>> +        self.expect("frame variable int_bag --synthetic-type false --no-summary-depth=1",
>>>                   substrs = ['x = 6',
>>>                              'y = 7',
>>>                              'z = 8'])
>>> @@ -97,7 +97,7 @@
>>>                              'z = 8'])
>>>
>>>       # If I skip summaries, still give me the artificial children
>>> -        self.expect("frame variable int_bag -Y1",
>>> +        self.expect("frame variable int_bag --no-summary-depth=1",
>>>                   substrs = ['x = 6',
>>>                              'z = 8'])
>>>
>>> @@ -135,14 +135,14 @@
>>>
>>>       # ...even bitfields
>>>       self.runCmd("type filter add BagOfBags --child x.y --child \"y->z[1-2]\"")
>>> -        self.expect('frame variable bag_bag -T',
>>> +        self.expect('frame variable bag_bag --show-types',
>>>                   substrs = ['x.y = 70',
>>>                              '(int:2) y->z[1-2] = 2'])
>>>
>>>       # ...even if we format the bitfields
>>>       self.runCmd("type filter add BagOfBags --child x.y --child \"y->y[0-0]\"")
>>>       self.runCmd("type format add \"int:1\" -f bool")
>>> -        self.expect('frame variable bag_bag -T',
>>> +        self.expect('frame variable bag_bag --show-types',
>>>                   substrs = ['x.y = 70',
>>>                              '(int:1) y->y[0-0] = true'])
>>>
>>> @@ -167,7 +167,7 @@
>>>                              'array[2] = 3'])
>>>
>>>       # skip synthetic children
>>> -        self.expect('frame variable plenty_of_stuff -S no',
>>> +        self.expect('frame variable plenty_of_stuff --synthetic-type no',
>>>                   substrs = ['some_values = 0x0',
>>>                              'array = 0x',
>>>                              'array_size = 5'])
>>> @@ -180,19 +180,19 @@
>>>                      '*(plenty_of_stuff.array) = 3'])
>>>
>>>       # check that we do not lose location information for our children
>>> -        self.expect('frame variable plenty_of_stuff -L',
>>> +        self.expect('frame variable plenty_of_stuff --location',
>>>                   substrs = ['0x',
>>>                              ':   bitfield = 17'])
>>>
>>>       # check we work across pointer boundaries
>>> -        self.expect('frame variable plenty_of_stuff.some_values -P1',
>>> +        self.expect('frame variable plenty_of_stuff.some_values --ptr-depth=1',
>>>                   substrs = ['(BagOfInts *) plenty_of_stuff.some_values',
>>>                              'x = 5',
>>>                              'z = 7'])
>>>
>>>       # but not if we don't want to
>>>       self.runCmd("type filter add BagOfInts --child x --child z -p")
>>> -        self.expect('frame variable plenty_of_stuff.some_values -P1',
>>> +        self.expect('frame variable plenty_of_stuff.some_values --ptr-depth=1',
>>>                   substrs = ['(BagOfInts *) plenty_of_stuff.some_values',
>>>                              'x = 5',
>>>                              'y = 6',
>>>
>>> Modified: lldb/trunk/test/functionalities/data-formatter/rdar-11988289/TestRdar 11988289.py
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/rdar-11988289/TestRdar%2011988289.py?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/test/functionalities/data-formatter/rdar-11988289/TestRdar 11988289.py (original)
>>> +++ lldb/trunk/test/functionalities/data-formatter/rdar-11988289/TestRdar 11988289.py Mon Dec  3 18:32:51 2012
>>> @@ -65,13 +65,13 @@
>>>                   substrs = ['3 key/value pairs','[0] = {','key = 0x','value = 0x','[1] = {','[2] = {'])
>>>       self.expect('frame variable mutable --ptr-depth 1',
>>>                   substrs = ['4 key/value pairs','[0] = {','key = 0x','value = 0x','[1] = {','[2] = {','[3] = {'])
>>> -        self.expect('frame variable dictionary --ptr-depth 1 -d no-run-target',
>>> +        self.expect('frame variable dictionary --ptr-depth 1 --dynamic-type no-run-target',
>>>                   substrs = ['3 key/value pairs','@"bar"','@"2 objects"','@"baz"','2 key/value pairs'])
>>> -        self.expect('frame variable mutable --ptr-depth 1 -d no-run-target',
>>> +        self.expect('frame variable mutable --ptr-depth 1 --dynamic-type no-run-target',
>>>                   substrs = ['4 key/value pairs','(int)23','@"123"','@"http://www.apple.com"','@"puartist"','3 key/value pairs'])
>>> -        self.expect('frame variable mutable --ptr-depth 2 -d no-run-target',
>>> +        self.expect('frame variable mutable --ptr-depth 2 --dynamic-type no-run-target',
>>>       substrs = ['4 key/value pairs','(int)23','@"123"','@"http://www.apple.com"','@"puartist"','3 key/value pairs {','@"bar"','@"2 objects"'])
>>> -        self.expect('frame variable mutable --ptr-depth 3 -d no-run-target',
>>> +        self.expect('frame variable mutable --ptr-depth 3 --dynamic-type no-run-target',
>>>       substrs = ['4 key/value pairs','(int)23','@"123"','@"http://www.apple.com"','@"puartist"','3 key/value pairs {','@"bar"','@"2 objects"','(int)1','@"two"'])
>>>
>>>       self.assertTrue(self.frame().FindVariable("dictionary").MightHaveChildren(), "dictionary says it does not have children!")
>>>
>>> Modified: lldb/trunk/test/functionalities/data-formatter/rdar-12437442/TestRdar12437442.py
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/rdar-12437442/TestRdar12437442.py?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/test/functionalities/data-formatter/rdar-12437442/TestRdar12437442.py (original)
>>> +++ lldb/trunk/test/functionalities/data-formatter/rdar-12437442/TestRdar12437442.py Mon Dec  3 18:32:51 2012
>>> @@ -64,7 +64,7 @@
>>>       id_x.SetPreferSyntheticValue(True)
>>>
>>>       if self.TraceOn():
>>> -            self.runCmd("frame variable x -d run-target --ptr-depth 1")
>>> +            self.runCmd("frame variable x --dynamic-type run-target --ptr-depth 1")
>>>
>>>       self.assertTrue(id_x.GetSummary() == '@"5 objects"', "array does not get correct summary")
>>>
>>> @@ -75,7 +75,7 @@
>>>       id_x.SetPreferSyntheticValue(True)
>>>
>>>       if self.TraceOn():
>>> -            self.runCmd("frame variable x -d run-target --ptr-depth 1")
>>> +            self.runCmd("frame variable x --dynamic-type run-target --ptr-depth 1")
>>>
>>>       self.assertTrue(id_x.GetNumChildren() == 7, "dictionary does not have 7 children")
>>>       id_x.SetPreferSyntheticValue(False)
>>>
>>> Modified: lldb/trunk/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py (original)
>>> +++ lldb/trunk/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py Mon Dec  3 18:32:51 2012
>>> @@ -61,7 +61,7 @@
>>>       # Now run the program, expect to stop at the the first breakpoint which is within the stop-hook range.
>>>       child.sendline('run')
>>>       child.expect_exact(prompt)
>>> -        child.sendline('target stop-hook add -o "frame variable -g g_val"')
>>> +        child.sendline('target stop-hook add -o "frame variable --show-globals g_val"')
>>>       child.expect_exact(prompt)
>>>
>>>       # Continue and expect to find the output emitted by the firing of our stop hook.
>>>
>>> Modified: lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py (original)
>>> +++ lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py Mon Dec  3 18:32:51 2012
>>> @@ -103,7 +103,7 @@
>>>                      'new value:', ' = 1'])
>>>
>>>       # The watchpoint command "forced" our global variable 'cookie' to become 777.
>>> -        self.expect("frame variable -g cookie",
>>> +        self.expect("frame variable --show-globals cookie",
>>>           substrs = ['(int32_t)', 'cookie = 777'])
>>>
>>>   def watchpoint_command_can_disable_a_watchpoint(self):
>>>
>>> Modified: lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py (original)
>>> +++ lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py Mon Dec  3 18:32:51 2012
>>> @@ -90,7 +90,7 @@
>>>                      'new value:', ' = 1'])
>>>
>>>       # The watchpoint command "forced" our global variable 'cookie' to become 777.
>>> -        self.expect("frame variable -g cookie",
>>> +        self.expect("frame variable --show-globals cookie",
>>>           substrs = ['(int32_t)', 'cookie = 777'])
>>>
>>>
>>>
>>> Modified: lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py (original)
>>> +++ lldb/trunk/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py Mon Dec  3 18:32:51 2012
>>> @@ -77,7 +77,7 @@
>>>       # The stop reason of the thread should be watchpoint.
>>>       self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
>>>           substrs = ['stop reason = watchpoint'])
>>> -        self.expect("frame variable -g global",
>>> +        self.expect("frame variable --show-globals global",
>>>           substrs = ['(int32_t)', 'global = 5'])
>>>
>>>       # Use the '-v' option to do verbose listing of the watchpoint.
>>>
>>> Modified: lldb/trunk/test/lang/c/array_types/TestArrayTypes.py
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/array_types/TestArrayTypes.py?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/test/lang/c/array_types/TestArrayTypes.py (original)
>>> +++ lldb/trunk/test/lang/c/array_types/TestArrayTypes.py Mon Dec  3 18:32:51 2012
>>> @@ -71,7 +71,7 @@
>>>
>>>       # Issue 'variable list' command on several array-type variables.
>>>
>>> -        self.expect("frame variable -T strings", VARIABLES_DISPLAYED_CORRECTLY,
>>> +        self.expect("frame variable --show-types strings", VARIABLES_DISPLAYED_CORRECTLY,
>>>           startstr = '(char *[4])',
>>>           substrs = ['(char *) [0]',
>>>                      '(char *) [1]',
>>> @@ -82,14 +82,14 @@
>>>                      'Bonjour',
>>>                      'Guten Tag'])
>>>
>>> -        self.expect("frame variable -T char_16", VARIABLES_DISPLAYED_CORRECTLY,
>>> +        self.expect("frame variable --show-types char_16", VARIABLES_DISPLAYED_CORRECTLY,
>>>           substrs = ['(char) [0]',
>>>                      '(char) [15]'])
>>>
>>> -        self.expect("frame variable -T ushort_matrix", VARIABLES_DISPLAYED_CORRECTLY,
>>> +        self.expect("frame variable --show-types ushort_matrix", VARIABLES_DISPLAYED_CORRECTLY,
>>>           startstr = '(unsigned short [2][3])')
>>>
>>> -        self.expect("frame variable -T long_6", VARIABLES_DISPLAYED_CORRECTLY,
>>> +        self.expect("frame variable --show-types long_6", VARIABLES_DISPLAYED_CORRECTLY,
>>>           startstr = '(long [6])')
>>>
>>>   def array_types_python(self):
>>>
>>> Modified: lldb/trunk/test/lang/c/bitfields/TestBitfields.py
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/bitfields/TestBitfields.py?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/test/lang/c/bitfields/TestBitfields.py (original)
>>> +++ lldb/trunk/test/lang/c/bitfields/TestBitfields.py Mon Dec  3 18:32:51 2012
>>> @@ -64,7 +64,7 @@
>>>           substrs = [' resolved, hit count = 1'])
>>>
>>>       # This should display correctly.
>>> -        self.expect("frame variable -T bits", VARIABLES_DISPLAYED_CORRECTLY,
>>> +        self.expect("frame variable --show-types bits", VARIABLES_DISPLAYED_CORRECTLY,
>>>           substrs = ['(uint32_t:1) b1 = 1',
>>>                      '(uint32_t:2) b2 = 3',
>>>                      '(uint32_t:3) b3 = 7',
>>> @@ -76,7 +76,7 @@
>>>
>>>       # And so should this.
>>>       # rdar://problem/8348251
>>> -        self.expect("frame variable -T", VARIABLES_DISPLAYED_CORRECTLY,
>>> +        self.expect("frame variable --show-types", VARIABLES_DISPLAYED_CORRECTLY,
>>>           substrs = ['(uint32_t:1) b1 = 1',
>>>                      '(uint32_t:2) b2 = 3',
>>>                      '(uint32_t:3) b3 = 7',
>>>
>>> Modified: lldb/trunk/test/lang/c/forward/TestForwardDeclaration.py
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/forward/TestForwardDeclaration.py?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/test/lang/c/forward/TestForwardDeclaration.py (original)
>>> +++ lldb/trunk/test/lang/c/forward/TestForwardDeclaration.py Mon Dec  3 18:32:51 2012
>>> @@ -48,7 +48,7 @@
>>>
>>>       # This should display correctly.
>>>       # Note that the member fields of a = 1 and b = 2 is by design.
>>> -        self.expect("frame variable -T *bar_ptr", VARIABLES_DISPLAYED_CORRECTLY,
>>> +        self.expect("frame variable --show-types *bar_ptr", VARIABLES_DISPLAYED_CORRECTLY,
>>>           substrs = ['(bar) *bar_ptr = ',
>>>                      '(int) a = 1',
>>>                      '(int) b = 2'])
>>>
>>> Modified: lldb/trunk/test/lang/c/function_types/TestFunctionTypes.py
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/function_types/TestFunctionTypes.py?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/test/lang/c/function_types/TestFunctionTypes.py (original)
>>> +++ lldb/trunk/test/lang/c/function_types/TestFunctionTypes.py Mon Dec  3 18:32:51 2012
>>> @@ -66,7 +66,7 @@
>>>       self.runToBreakpoint()
>>>
>>>       # Check that the 'callback' variable display properly.
>>> -        self.expect("frame variable -T callback", VARIABLES_DISPLAYED_CORRECTLY,
>>> +        self.expect("frame variable --show-types callback", VARIABLES_DISPLAYED_CORRECTLY,
>>>           startstr = '(int (*)(const char *)) callback =')
>>>
>>>       # And that we can break on the callback function.
>>>
>>> Modified: lldb/trunk/test/lang/c/global_variables/TestGlobalVariables.py
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/global_variables/TestGlobalVariables.py?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/test/lang/c/global_variables/TestGlobalVariables.py (original)
>>> +++ lldb/trunk/test/lang/c/global_variables/TestGlobalVariables.py Mon Dec  3 18:32:51 2012
>>> @@ -13,13 +13,13 @@
>>>   @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
>>>   @dsym_test
>>>   def test_with_dsym(self):
>>> -        """Test 'frame variable -s -a' which omits args and shows scopes."""
>>> +        """Test 'frame variable --scope --no-args' which omits args and shows scopes."""
>>>       self.buildDsym()
>>>       self.global_variables()
>>>
>>>   @dwarf_test
>>>   def test_with_dwarf(self):
>>> -        """Test 'frame variable -s -a' which omits args and shows scopes."""
>>> +        """Test 'frame variable --scope --no-args' which omits args and shows scopes."""
>>>       self.buildDwarf()
>>>       self.global_variables()
>>>
>>> @@ -34,7 +34,7 @@
>>>           self.addTearDownHook(lambda: self.runCmd("settings remove target.env-vars " + self.dylibPath))
>>>
>>>   def global_variables(self):
>>> -        """Test 'frame variable -s -a' which omits args and shows scopes."""
>>> +        """Test 'frame variable --scope --no-args' which omits args and shows scopes."""
>>>       exe = os.path.join(os.getcwd(), "a.out")
>>>       self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
>>>
>>> @@ -53,7 +53,7 @@
>>>           substrs = [' resolved, hit count = 1'])
>>>
>>>       # Check that GLOBAL scopes are indicated for the variables.
>>> -        self.expect("frame variable -T -s -g -a", VARIABLES_DISPLAYED_CORRECTLY,
>>> +        self.expect("frame variable --show-types --scope --show-globals --no-args", VARIABLES_DISPLAYED_CORRECTLY,
>>>           substrs = ['GLOBAL: (int) g_file_global_int = 42',
>>>                      'GLOBAL: (const char *) g_file_global_cstr',
>>>                      '"g_file_global_cstr"',
>>>
>>> Modified: lldb/trunk/test/lang/c/set_values/TestSetValues.py
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/set_values/TestSetValues.py?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/test/lang/c/set_values/TestSetValues.py (original)
>>> +++ lldb/trunk/test/lang/c/set_values/TestSetValues.py Mon Dec  3 18:32:51 2012
>>> @@ -61,63 +61,63 @@
>>>           substrs = [' resolved, hit count = 1'])
>>>
>>>       # main.c:15
>>> -        # Check that 'frame variable -T' displays the correct data type and value.
>>> -        self.expect("frame variable -T", VARIABLES_DISPLAYED_CORRECTLY,
>>> +        # Check that 'frame variable --show-types' displays the correct data type and value.
>>> +        self.expect("frame variable --show-types", VARIABLES_DISPLAYED_CORRECTLY,
>>>           startstr = "(char) i = 'a'")
>>>
>>>       # Now set variable 'i' and check that it is correctly displayed.
>>>       self.runCmd("expression i = 'b'")
>>> -        self.expect("frame variable -T", VARIABLES_DISPLAYED_CORRECTLY,
>>> +        self.expect("frame variable --show-types", VARIABLES_DISPLAYED_CORRECTLY,
>>>           startstr = "(char) i = 'b'")
>>>
>>>       self.runCmd("continue")
>>>
>>>       # main.c:36
>>> -        # Check that 'frame variable -T' displays the correct data type and value.
>>> -        self.expect("frame variable -T", VARIABLES_DISPLAYED_CORRECTLY,
>>> +        # Check that 'frame variable --show-types' displays the correct data type and value.
>>> +        self.expect("frame variable --show-types", VARIABLES_DISPLAYED_CORRECTLY,
>>>           patterns = ["\((short unsigned int|unsigned short)\) i = 33"])
>>>
>>>       # Now set variable 'i' and check that it is correctly displayed.
>>>       self.runCmd("expression i = 333")
>>> -        self.expect("frame variable -T", VARIABLES_DISPLAYED_CORRECTLY,
>>> +        self.expect("frame variable --show-types", VARIABLES_DISPLAYED_CORRECTLY,
>>>           patterns = ["\((short unsigned int|unsigned short)\) i = 333"])
>>>
>>>       self.runCmd("continue")
>>>
>>>       # main.c:57
>>> -        # Check that 'frame variable -T' displays the correct data type and value.
>>> -        self.expect("frame variable -T", VARIABLES_DISPLAYED_CORRECTLY,
>>> +        # Check that 'frame variable --show-types' displays the correct data type and value.
>>> +        self.expect("frame variable --show-types", VARIABLES_DISPLAYED_CORRECTLY,
>>>           startstr = "(long) i = 33")
>>>
>>>       # Now set variable 'i' and check that it is correctly displayed.
>>>       self.runCmd("expression i = 33333")
>>> -        self.expect("frame variable -T", VARIABLES_DISPLAYED_CORRECTLY,
>>> +        self.expect("frame variable --show-types", VARIABLES_DISPLAYED_CORRECTLY,
>>>           startstr = "(long) i = 33333")
>>>
>>>       self.runCmd("continue")
>>>
>>>       # main.c:78
>>> -        # Check that 'frame variable -T' displays the correct data type and value.
>>> -        self.expect("frame variable -T", VARIABLES_DISPLAYED_CORRECTLY,
>>> +        # Check that 'frame variable --show-types' displays the correct data type and value.
>>> +        self.expect("frame variable --show-types", VARIABLES_DISPLAYED_CORRECTLY,
>>>           startstr = "(double) i = 3.14159")
>>>
>>>       # Now set variable 'i' and check that it is correctly displayed.
>>>       self.runCmd("expression i = 3.14")
>>> -        self.expect("frame variable -T", VARIABLES_DISPLAYED_CORRECTLY,
>>> +        self.expect("frame variable --show-types", VARIABLES_DISPLAYED_CORRECTLY,
>>>           startstr = "(double) i = 3.14")
>>>
>>>       self.runCmd("continue")
>>>
>>>       # main.c:85
>>> -        # Check that 'frame variable -T' displays the correct data type and value.
>>> +        # Check that 'frame variable --show-types' displays the correct data type and value.
>>>       # rdar://problem/8422727
>>>       # set_values test directory: 'frame variable' shows only (long double) i =
>>> -        self.expect("frame variable -T", VARIABLES_DISPLAYED_CORRECTLY,
>>> +        self.expect("frame variable --show-types", VARIABLES_DISPLAYED_CORRECTLY,
>>>           startstr = "(long double) i = 3.14159")
>>>
>>>       # Now set variable 'i' and check that it is correctly displayed.
>>>       self.runCmd("expression i = 3.1")
>>> -        self.expect("frame variable -T", VARIABLES_DISPLAYED_CORRECTLY,
>>> +        self.expect("frame variable --show-types", VARIABLES_DISPLAYED_CORRECTLY,
>>>           startstr = "(long double) i = 3.1")
>>>
>>>
>>>
>>> Modified: lldb/trunk/test/lang/cpp/class_types/TestClassTypes.py
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/class_types/TestClassTypes.py?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/test/lang/cpp/class_types/TestClassTypes.py (original)
>>> +++ lldb/trunk/test/lang/cpp/class_types/TestClassTypes.py Mon Dec  3 18:32:51 2012
>>> @@ -92,7 +92,7 @@
>>>           substrs = [' resolved, hit count = 1'])
>>>
>>>       # We should be stopped on the ctor function of class C.
>>> -        self.expect("frame variable -T this", VARIABLES_DISPLAYED_CORRECTLY,
>>> +        self.expect("frame variable --show-types this", VARIABLES_DISPLAYED_CORRECTLY,
>>>           substrs = ['C *',
>>>                      ' this = '])
>>>
>>> @@ -188,10 +188,10 @@
>>>       self.expect("frame variable this",VARIABLES_DISPLAYED_CORRECTLY,
>>>           substrs = ['C *'])
>>>
>>> -        # Verify that frame variable -T this->m_c_int behaves correctly.
>>> +        # Verify that frame variable --show-types this->m_c_int behaves correctly.
>>>       self.runCmd("register read pc")
>>>       self.runCmd("expr m_c_int")
>>> -        self.expect("frame variable -T this->m_c_int", VARIABLES_DISPLAYED_CORRECTLY,
>>> +        self.expect("frame variable --show-types this->m_c_int", VARIABLES_DISPLAYED_CORRECTLY,
>>>           startstr = '(int) this->m_c_int = 66')
>>>
>>>       # Verify that 'expression this' gets the data type correct.
>>>
>>> Modified: lldb/trunk/test/lang/cpp/namespace/TestNamespace.py
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/namespace/TestNamespace.py?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/test/lang/cpp/namespace/TestNamespace.py (original)
>>> +++ lldb/trunk/test/lang/cpp/namespace/TestNamespace.py Mon Dec  3 18:32:51 2012
>>> @@ -66,12 +66,12 @@
>>>           substrs = slist)
>>>
>>>       # 'frame variable' with basename 'i' should work.
>>> -        self.expect("frame variable -c -g i",
>>> +        self.expect("frame variable --show-declaration --show-globals i",
>>>           startstr = "main.cpp:%d: (int) (anonymous namespace)::i = 3" % self.line_var_i)
>>>       # main.cpp:12: (int) (anonymous namespace)::i = 3
>>>
>>>       # 'frame variable' with basename 'j' should work, too.
>>> -        self.expect("frame variable -c -g j",
>>> +        self.expect("frame variable --show-declaration --show-globals j",
>>>           startstr = "main.cpp:%d: (int) A::B::j = 4" % self.line_var_j)
>>>       # main.cpp:19: (int) A::B::j = 4
>>>
>>>
>>> Modified: lldb/trunk/test/lang/cpp/signed_types/TestSignedTypes.py
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/signed_types/TestSignedTypes.py?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/test/lang/cpp/signed_types/TestSignedTypes.py (original)
>>> +++ lldb/trunk/test/lang/cpp/signed_types/TestSignedTypes.py Mon Dec  3 18:32:51 2012
>>> @@ -54,7 +54,7 @@
>>>       self.runCmd("thread step-over")
>>>
>>>       # Test that signed types display correctly.
>>> -        self.expect("frame variable -T -a", VARIABLES_DISPLAYED_CORRECTLY,
>>> +        self.expect("frame variable --show-types --no-args", VARIABLES_DISPLAYED_CORRECTLY,
>>>           patterns = ["\((short int|short)\) the_signed_short = 99"],
>>>           substrs = ["(signed char) the_signed_char = 'c'",
>>>                      "(int) the_signed_int = 99",
>>>
>>> Modified: lldb/trunk/test/lang/cpp/unique-types/TestUniqueTypes.py
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/unique-types/TestUniqueTypes.py?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/test/lang/cpp/unique-types/TestUniqueTypes.py (original)
>>> +++ lldb/trunk/test/lang/cpp/unique-types/TestUniqueTypes.py Mon Dec  3 18:32:51 2012
>>> @@ -58,8 +58,8 @@
>>>                   if clang_version < 3:
>>>                       self.skipTest("rdar://problem/9173060 lldb hangs while running unique-types for clang version < 3")
>>>
>>> -        # Do a "frame variable -T longs" and verify "long" is in each line of output.
>>> -        self.runCmd("frame variable -T longs")
>>> +        # Do a "frame variable --show-types longs" and verify "long" is in each line of output.
>>> +        self.runCmd("frame variable --show-types longs")
>>>       output = self.res.GetOutput()
>>>       for x in [line.strip() for line in output.split(os.linesep)]:
>>>           # Skip empty line or closing brace.
>>> @@ -68,8 +68,8 @@
>>>           self.expect(x, "Expect type 'long'", exe=False,
>>>               substrs = ['long'])
>>>
>>> -        # Do a "frame variable -T shorts" and verify "short" is in each line of output.
>>> -        self.runCmd("frame variable -T shorts")
>>> +        # Do a "frame variable --show-types shorts" and verify "short" is in each line of output.
>>> +        self.runCmd("frame variable --show-types shorts")
>>>       output = self.res.GetOutput()
>>>       for x in [line.strip() for line in output.split(os.linesep)]:
>>>           # Skip empty line or closing brace.
>>>
>>> Modified: lldb/trunk/test/lang/cpp/unsigned_types/TestUnsignedTypes.py
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/unsigned_types/TestUnsignedTypes.py?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/test/lang/cpp/unsigned_types/TestUnsignedTypes.py (original)
>>> +++ lldb/trunk/test/lang/cpp/unsigned_types/TestUnsignedTypes.py Mon Dec  3 18:32:51 2012
>>> @@ -51,7 +51,7 @@
>>>           substrs = [' resolved, hit count = 1'])
>>>
>>>       # Test that unsigned types display correctly.
>>> -        self.expect("frame variable -T -a", VARIABLES_DISPLAYED_CORRECTLY,
>>> +        self.expect("frame variable --show-types --no-args", VARIABLES_DISPLAYED_CORRECTLY,
>>>           startstr = "(unsigned char) the_unsigned_char = 'c'",
>>>           patterns = ["\((short unsigned int|unsigned short)\) the_unsigned_short = 99"],
>>>           substrs = ["(unsigned int) the_unsigned_int = 99",
>>>
>>> Modified: lldb/trunk/test/lang/objc/foundation/TestObjCMethods.py
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/foundation/TestObjCMethods.py?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/test/lang/objc/foundation/TestObjCMethods.py (original)
>>> +++ lldb/trunk/test/lang/objc/foundation/TestObjCMethods.py Mon Dec  3 18:32:51 2012
>>> @@ -146,7 +146,7 @@
>>>                      'NSString * str;',
>>>                      'NSDate * date;'])
>>>
>>> -        self.expect("frame variable -T -s", VARIABLES_DISPLAYED_CORRECTLY,
>>> +        self.expect("frame variable --show-types --scope", VARIABLES_DISPLAYED_CORRECTLY,
>>>           substrs = ["ARG: (MyString *) self"],
>>>           patterns = ["ARG: \(.*\) _cmd",
>>>                       "(objc_selector *)|(SEL)"])
>>> @@ -158,16 +158,16 @@
>>>       # rdar://problem/8492646
>>>       # test/foundation fails after updating to tot r115023
>>>       # self->str displays nothing as output
>>> -        self.expect("frame variable -T self->str", VARIABLES_DISPLAYED_CORRECTLY,
>>> +        self.expect("frame variable --show-types self->str", VARIABLES_DISPLAYED_CORRECTLY,
>>>           startstr = "(NSString *) self->str")
>>>
>>>       # rdar://problem/8447030
>>>       # 'frame variable self->date' displays the wrong data member
>>> -        self.expect("frame variable -T self->date", VARIABLES_DISPLAYED_CORRECTLY,
>>> +        self.expect("frame variable --show-types self->date", VARIABLES_DISPLAYED_CORRECTLY,
>>>           startstr = "(NSDate *) self->date")
>>>
>>>       # This should display the str and date member fields as well.
>>> -        self.expect("frame variable -T *self", VARIABLES_DISPLAYED_CORRECTLY,
>>> +        self.expect("frame variable --show-types *self", VARIABLES_DISPLAYED_CORRECTLY,
>>>           substrs = ["(MyString) *self",
>>>                      "(NSString *) str",
>>>                      "(NSDate *) date"])
>>>
>>> Modified: lldb/trunk/test/lang/objc/rdar-11355592/TestRdar11355592.py
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/objc/rdar-11355592/TestRdar11355592.py?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/test/lang/objc/rdar-11355592/TestRdar11355592.py (original)
>>> +++ lldb/trunk/test/lang/objc/rdar-11355592/TestRdar11355592.py Mon Dec  3 18:32:51 2012
>>> @@ -48,13 +48,13 @@
>>>       self.runCmd("run", RUN_SUCCEEDED)
>>>       # check that we correctly see the const char*, even with dynamic types on
>>>       self.expect("frame variable my_string", substrs = ['const char *'])
>>> -        self.expect("frame variable my_string -d run-target", substrs = ['const char *'])
>>> +        self.expect("frame variable my_string --dynamic-type run-target", substrs = ['const char *'])
>>>       # check that expr also gets it right
>>>       self.expect("expr my_string", substrs = ['const char *'])
>>>       self.expect("expr -d true -- my_string", substrs = ['const char *'])
>>>       # but check that we get the real Foolie as such
>>>       self.expect("frame variable my_foolie", substrs = ['FoolMeOnce *'])
>>> -        self.expect("frame variable my_foolie -d run-target", substrs = ['FoolMeOnce *'])
>>> +        self.expect("frame variable my_foolie --dynamic-type run-target", substrs = ['FoolMeOnce *'])
>>>       # check that expr also gets it right
>>>       self.expect("expr my_foolie", substrs = ['FoolMeOnce *'])
>>>       self.expect("expr -d true -- my_foolie", substrs = ['FoolMeOnce *'])
>>> @@ -62,13 +62,13 @@
>>>       self.runCmd("next")
>>>       # check that we correctly see the const char*, even with dynamic types on
>>>       self.expect("frame variable my_string", substrs = ['const char *'])
>>> -        self.expect("frame variable my_string -d run-target", substrs = ['const char *'])
>>> +        self.expect("frame variable my_string --dynamic-type run-target", substrs = ['const char *'])
>>>       # check that expr also gets it right
>>>       self.expect("expr my_string", substrs = ['const char *'])
>>>       self.expect("expr -d true -- my_string", substrs = ['const char *'])
>>>       # but check that we get the real Foolie as such
>>>       self.expect("frame variable my_foolie", substrs = ['FoolMeOnce *'])
>>> -        self.expect("frame variable my_foolie -d run-target", substrs = ['FoolMeOnce *'])
>>> +        self.expect("frame variable my_foolie --dynamic-type run-target", substrs = ['FoolMeOnce *'])
>>>       # check that expr also gets it right
>>>       self.expect("expr my_foolie", substrs = ['FoolMeOnce *'])
>>>       self.expect("expr -d true -- my_foolie", substrs = ['FoolMeOnce *'])
>>>
>>> Modified: lldb/trunk/test/types/AbstractBase.py
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/types/AbstractBase.py?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/test/types/AbstractBase.py (original)
>>> +++ lldb/trunk/test/types/AbstractBase.py Mon Dec  3 18:32:51 2012
>>> @@ -10,7 +10,7 @@
>>>
>>> def Msg(var, val, using_frame_variable):
>>>   return "'%s %s' matches the output (from compiled code): %s" % (
>>> -        'frame variable -T' if using_frame_variable else 'expression' ,var, val)
>>> +        'frame variable --show-types' if using_frame_variable else 'expression' ,var, val)
>>>
>>> class GenericTester(TestBase):
>>>
>>> @@ -116,7 +116,7 @@
>>>           lambda: self.runCmd("settings set target.inline-breakpoint-strategy headers"))
>>>
>>>       # Bring the program to the point where we can issue a series of
>>> -        # 'frame variable -T' command.
>>> +        # 'frame variable --show-types' command.
>>>       if blockCaptured:
>>>           break_line = line_number ("basic_type.cpp", "// Break here to test block captured variables.")
>>>       else:
>>> @@ -128,19 +128,19 @@
>>>           substrs = [" at basic_type.cpp:%d" % break_line,
>>>                      "stop reason = breakpoint"])
>>>
>>> -        #self.runCmd("frame variable -T")
>>> +        #self.runCmd("frame variable --show-types")
>>>
>>>       # Now iterate through the golden list, comparing against the output from
>>> -        # 'frame variable -T var'.
>>> +        # 'frame variable --show-types var'.
>>>       for var, val in gl:
>>> -            self.runCmd("frame variable -T %s" % var)
>>> +            self.runCmd("frame variable --show-types %s" % var)
>>>           output = self.res.GetOutput()
>>>
>>>           # The input type is in a canonical form as a set of named atoms.
>>>           # The display type string must conatin each and every element.
>>>           #
>>>           # Example:
>>> -            #     runCmd: frame variable -T a_array_bounded[0]
>>> +            #     runCmd: frame variable --show-types a_array_bounded[0]
>>>           #     output: (char) a_array_bounded[0] = 'a'
>>>           #
>>>           try:
>>> @@ -209,7 +209,7 @@
>>>           substrs = [" at basic_type.cpp:%d" % break_line,
>>>                      "stop reason = breakpoint"])
>>>
>>> -        #self.runCmd("frame variable -T")
>>> +        #self.runCmd("frame variable --show-types")
>>>
>>>       # Now iterate through the golden list, comparing against the output from
>>>       # 'expr var'.
>>>
>>> Modified: lldb/trunk/tools/driver/Driver.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/Driver.cpp?rev=169189&r1=169188&r2=169189&view=diff
>>> ==============================================================================
>>> --- lldb/trunk/tools/driver/Driver.cpp (original)
>>> +++ lldb/trunk/tools/driver/Driver.cpp Mon Dec  3 18:32:51 2012
>>> @@ -63,7 +63,7 @@
>>>                                            // then this option belongs to option set n.
>>>   bool required;                           // This option is required (in the current usage level)
>>>   const char * long_option;                // Full name for this option.
>>> -    char short_option;                       // Single character for this option.
>>> +    int short_option;                        // Single character for this option.
>>>   int option_has_arg;                      // no_argument, required_argument or optional_argument
>>>   uint32_t completion_type;                // Cookie the option class can use to do define the argument completion.
>>>   lldb::CommandArgumentType argument_type; // Type of argument this option takes
>>> @@ -578,7 +578,7 @@
>>>
>>>           if (long_options_index >= 0)
>>>           {
>>> -                const char short_option = (char) g_options[long_options_index].short_option;
>>> +                const int short_option = g_options[long_options_index].short_option;
>>>
>>>               switch (short_option)
>>>               {
>>>
>>>
>>> _______________________________________________
>>> lldb-commits mailing list
>>> lldb-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
>>
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: isprint_fix.patch
Type: application/octet-stream
Size: 4132 bytes
Desc: isprint_fix.patch
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20121205/44f1a31c/attachment.obj>


More information about the lldb-commits mailing list