Short option for --summary-string in 'type summary add' is now -s. This might be a breaking change for those who have summaries defined.

llvm-svn: 138331
This commit is contained in:
Enrico Granata 2011-08-23 16:13:35 +00:00
parent c50ea3beaf
commit db3485cd06
16 changed files with 144 additions and 142 deletions
lldb
examples/summaries
source/Commands
test/functionalities/data-formatter
data-formatter-advanced
data-formatter-categories
data-formatter-cpp
data-formatter-globals
data-formatter-named-summaries
data-formatter-objc
data-formatter-python-synth
data-formatter-script
data-formatter-skip-summary
data-formatter-smart-array
data-formatter-synth
rdar-9973865
rdar-9973992

View File

@ -1,2 +1,5 @@
type summary add -f "${var._M_dataplus._M_p}" std::string std::basic_string<char> "std::basic_string<char,std::char_traits<char>,std::allocator<char> >"
type summary add -f "\"${var%@}\"" "NSString *"
type summary add -s "${var._M_dataplus._M_p}" std::string std::basic_string<char> "std::basic_string<char,std::char_traits<char>,std::allocator<char> >"
type summary add -s "\"${var%@}\"" "NSString *"
type summary add -s "${svar%#} items" -e -x std::map<
type summary add -s "${svar%#} items" -e -x std::vector<
type summary add -s "${svar%#} items" -e -x std::list<

View File

@ -1,15 +1,15 @@
type summary add -w lldb lldb_private::Error -f "Type: ${var.m_type%E}, Code: ${var.m_code}, Message: ${var.m_string}"
type summary add -w lldb lldb_private::ConstString -f "${var.m_string}"
type summary add -w lldb lldb_private::Language -f "${var.m_language%E}"
type summary add -w lldb lldb_private::RegularExpression -f "${var.m_re}"
type summary add -w lldb lldb_private::UserID -f "UserID(${var.m_uid})"
type summary add -w lldb lldb_private::ValueObject -f "${var.m_name}"
type summary add -w lldb lldb_private::ValueObjectSP -f "${var.ptr_.m_name}"
type summary add -w lldb lldb_private::ValueObjectRegister -f "${var.m_reg_info.name}"
type summary add -w lldb lldb_private::ClangExpression -f "{${var.m_expr_text}}"
type summary add -w lldb lldb_private::CommandObject -f "Command name: ${var.m_cmd_name}"
type summary add -w lldb lldb_private::Variable -f "${var.m_type.m_name} ${var.m_name}"
type summary add -w lldb lldb_private::StopInfo -f "ID: ${var.m_stop_id}, ${var.m_description}"
type summary add -w lldb lldb_private::FileSpec -f "file: ${var.m_filename} dir: ${var.m_directory}"
type summary add -w lldb -v lldb::ConnectionStatus -f "[enum=${var%E} val=${var%i}]"
type summary add -w lldb lldb_private::Error -s "Type: ${var.m_type%E}, Code: ${var.m_code}, Message: ${var.m_string}"
type summary add -w lldb lldb_private::ConstString -s "${var.m_string}"
type summary add -w lldb lldb_private::Language -s "${var.m_language%E}"
type summary add -w lldb lldb_private::RegularExpression -s "${var.m_re}"
type summary add -w lldb lldb_private::UserID -s "UserID(${var.m_uid})"
type summary add -w lldb lldb_private::ValueObject -s "${var.m_name}"
type summary add -w lldb lldb_private::ValueObjectSP -s "${var.ptr_.m_name}"
type summary add -w lldb lldb_private::ValueObjectRegister -s "${var.m_reg_info.name}"
type summary add -w lldb lldb_private::ClangExpression -s "{${var.m_expr_text}}"
type summary add -w lldb lldb_private::CommandObject -s "Command name: ${var.m_cmd_name}"
type summary add -w lldb lldb_private::Variable -s "${var.m_type.m_name} ${var.m_name}"
type summary add -w lldb lldb_private::StopInfo -s "ID: ${var.m_stop_id}, ${var.m_description}"
type summary add -w lldb lldb_private::FileSpec -s "file: ${var.m_filename} dir: ${var.m_directory}"
type summary add -w lldb -v lldb::ConnectionStatus -s "[enum=${var%E} val=${var%i}]"
# Where '-v' tells type summary not to show the value itself, but just use the summary format.

View File

@ -612,7 +612,7 @@ CommandObjectTypeSummaryAdd::CommandOptions::SetOptionValue (uint32_t option_idx
case 'c':
m_one_liner = true;
break;
case 'f':
case 's':
m_format_string = std::string(option_arg);
break;
case 'p':
@ -1013,7 +1013,7 @@ CommandObject (interpreter,
"You can also add Python summaries, in which case you will use lldb public API to gather information from your variables"
"and elaborate them to a meaningful summary inside a script written in Python. The variable object will be passed to your"
"script as an SBValue object. The following example might help you when starting to use the Python summaries feature:\n"
"type summary add JustADemo -s \"value = valobj.GetChildMemberWithName('value'); return 'My value is ' + value.GetValue();\"\n"
"type summary add JustADemo -o \"value = valobj.GetChildMemberWithName('value'); return 'My value is ' + value.GetValue();\"\n"
"If you prefer to type your scripts on multiple lines, you will use the -P option and then type your script, ending it with "
"the word DONE on a line by itself to mark you're finished editing your code:\n"
"(lldb)type summary add JustADemo -P\n"
@ -1081,7 +1081,7 @@ CommandObjectTypeSummaryAdd::CommandOptions::g_option_table[] =
{ LLDB_OPT_SET_ALL, false, "skip-references", 'r', no_argument, NULL, 0, eArgTypeNone, "Don't use this format for references-to-type objects."},
{ LLDB_OPT_SET_ALL, false, "regex", 'x', no_argument, NULL, 0, eArgTypeNone, "Type names are actually regular expressions."},
{ LLDB_OPT_SET_1 , true, "inline-children", 'c', no_argument, NULL, 0, eArgTypeNone, "If true, inline all child values into summary string."},
{ LLDB_OPT_SET_2 , true, "summary-string", 'f', required_argument, NULL, 0, eArgTypeSummaryString, "Summary string used to display text and object contents."},
{ LLDB_OPT_SET_2 , true, "summary-string", 's', required_argument, NULL, 0, eArgTypeSummaryString, "Summary string used to display text and object contents."},
{ LLDB_OPT_SET_3, false, "python-script", 'o', required_argument, NULL, 0, eArgTypeName, "Give a one-liner Python script as part of the command."},
{ LLDB_OPT_SET_3, false, "python-function", 'F', required_argument, NULL, 0, eArgTypeName, "Give the name of a Python function to use for this type."},
{ LLDB_OPT_SET_3, false, "input-python", 'P', no_argument, NULL, 0, eArgTypeNone, "Input Python code to use for this type manually."},

View File

@ -55,9 +55,9 @@ class DataFormatterTestCase(TestBase):
# Execute the cleanup function during test case tear down.
self.addTearDownHook(cleanup)
self.runCmd("type summary add -f \"pippo\" \"i_am_cool\"")
self.runCmd("type summary add --summary-string \"pippo\" \"i_am_cool\"")
self.runCmd("type summary add -f \"pluto\" -x \"i_am_cool[a-z]*\"")
self.runCmd("type summary add --summary-string \"pluto\" -x \"i_am_cool[a-z]*\"")
self.expect("frame variable cool_boy",
substrs = ['pippo'])
@ -72,32 +72,32 @@ class DataFormatterTestCase(TestBase):
self.runCmd("type summary clear")
self.runCmd("type summary add -f \"${var[]}\" -x \"int \\[[0-9]\\]")
self.runCmd("type summary add --summary-string \"${var[]}\" -x \"int \\[[0-9]\\]")
self.expect("frame variable int_array",
substrs = ['1,2,3,4,5'])
self.runCmd("type summary add -f \"${var[].integer}\" -x \"i_am_cool \\[[0-9]\\]")
self.runCmd("type summary add --summary-string \"${var[].integer}\" -x \"i_am_cool \\[[0-9]\\]")
self.expect("frame variable cool_array",
substrs = ['1,1,1,1,6'])
self.runCmd("type summary clear")
self.runCmd("type summary add -f \"${var[1-0]%x}\" \"int\"")
self.runCmd("type summary add --summary-string \"${var[1-0]%x}\" \"int\"")
self.expect("frame variable iAmInt",
substrs = ['01'])
self.runCmd("type summary add -f \"${var[0-1]%x}\" \"int\"")
self.runCmd("type summary add --summary-string \"${var[0-1]%x}\" \"int\"")
self.expect("frame variable iAmInt",
substrs = ['01'])
self.runCmd("type summary clear")
self.runCmd("type summary add -f \"${var[0-1]%x}\" int")
self.runCmd("type summary add -f \"${var[0-31]%x}\" float")
self.runCmd("type summary add --summary-string \"${var[0-1]%x}\" int")
self.runCmd("type summary add --summary-string \"${var[0-31]%x}\" float")
self.expect("frame variable *pointer",
substrs = ['0x',
@ -106,20 +106,20 @@ class DataFormatterTestCase(TestBase):
self.expect("frame variable cool_array[3].floating",
substrs = ['0x'])
self.runCmd("type summary add -f \"low bits are ${*var[0-1]} tgt is ${*var}\" \"int *\"")
self.runCmd("type summary add --summary-string \"low bits are ${*var[0-1]} tgt is ${*var}\" \"int *\"")
self.expect("frame variable pointer",
substrs = ['low bits are',
'tgt is 6'])
self.runCmd("type summary add -f \"${*var[0-1]}\" -x \"int \[[0-9]\]\"")
self.runCmd("type summary add --summary-string \"${*var[0-1]}\" -x \"int \[[0-9]\]\"")
self.expect("frame variable int_array",
substrs = ['3'])
self.runCmd("type summary clear")
self.runCmd("type summary add -f \"${var[0-1]}\" -x \"int \[[0-9]\]\"")
self.runCmd("type summary add --summary-string \"${var[0-1]}\" -x \"int \[[0-9]\]\"")
self.expect("frame variable int_array",
substrs = ['1,2'])
@ -139,13 +139,13 @@ class DataFormatterTestCase(TestBase):
'character',
'floating'])
self.runCmd("type summary add -f \"int = ${*var.int_pointer}, float = ${*var.float_pointer}\" IWrapPointers")
self.runCmd("type summary add --summary-string \"int = ${*var.int_pointer}, float = ${*var.float_pointer}\" IWrapPointers")
self.expect("frame variable wrapper",
substrs = ['int = 4',
'float = 1.1'])
self.runCmd("type summary add -f \"low bits = ${*var.int_pointer[2]}\" IWrapPointers -p")
self.runCmd("type summary add --summary-string \"low bits = ${*var.int_pointer[2]}\" IWrapPointers -p")
self.expect("frame variable wrapper",
substrs = ['low bits = 1'])
@ -155,7 +155,7 @@ class DataFormatterTestCase(TestBase):
self.runCmd("type summary clear")
self.runCmd("type summary add -f \"${var[0][0-2]%hex}\" -x \"int \[[0-9]\]\"")
self.runCmd("type summary add --summary-string \"${var[0][0-2]%hex}\" -x \"int \[[0-9]\]\"")
self.expect("frame variable int_array",
substrs = ['0x',
@ -163,8 +163,8 @@ class DataFormatterTestCase(TestBase):
self.runCmd("type summary clear")
self.runCmd("type summary add -f \"${*var[].x[0-3]%hex} is a bitfield on a set of integers\" -x \"SimpleWithPointers \[[0-9]\]\"")
self.runCmd("type summary add -f \"${*var.sp.x[0-2]} are low bits of integer ${*var.sp.x}. If I pretend it is an array I get ${var.sp.x[0-5]}\" Couple")
self.runCmd("type summary add --summary-string \"${*var[].x[0-3]%hex} is a bitfield on a set of integers\" -x \"SimpleWithPointers \[[0-9]\]\"")
self.runCmd("type summary add --summary-string \"${*var.sp.x[0-2]} are low bits of integer ${*var.sp.x}. If I pretend it is an array I get ${var.sp.x[0-5]}\" Couple")
self.expect("frame variable couple",
substrs = ['1 are low bits of integer 9.',
@ -175,7 +175,7 @@ class DataFormatterTestCase(TestBase):
# check that we can format a variable in a summary even if a format is defined for its datatype
self.runCmd("type format add -f hex int")
self.runCmd("type summary add -f \"x=${var.x%i}\" Simple")
self.runCmd("type summary add --summary-string \"x=${var.x%i}\" Simple")
self.expect("frame variable a_simple_object",
substrs = ['x=3'])
@ -184,7 +184,7 @@ class DataFormatterTestCase(TestBase):
substrs = ['0x0'])
# now check that the default is applied if we do not hand out a format
self.runCmd("type summary add -f \"x=${var.x}\" Simple")
self.runCmd("type summary add --summary-string \"x=${var.x}\" Simple")
self.expect("frame variable a_simple_object", matching=False,
substrs = ['x=3'])

View File

@ -62,7 +62,7 @@ class DataFormatterTestCase(TestBase):
self.addTearDownHook(cleanup)
# Add a summary to a new category and check that it works
self.runCmd("type summary add Rectangle -f \"ARectangle\" -w NewCategory")
self.runCmd("type summary add Rectangle --summary-string \"ARectangle\" -w NewCategory")
self.expect("frame variable r1 r2 r3", matching=False,
substrs = ['r1 = ARectangle',
@ -101,7 +101,7 @@ class DataFormatterTestCase(TestBase):
'r3 = {'])
# Add summaries to two different categories and check that we can switch
self.runCmd("type summary add -f \"Width = ${var.w}, Height = ${var.h}\" Rectangle -w Category1")
self.runCmd("type summary add --summary-string \"Width = ${var.w}, Height = ${var.h}\" Rectangle -w Category1")
self.runCmd("type summary add --python-script \"return 'Area = ' + str( int(valobj.GetChildMemberWithName('w').GetValue()) * int(valobj.GetChildMemberWithName('h').GetValue()) );\" Rectangle -w Category2")
# check that enable A B is the same as enable B enable A
@ -156,8 +156,8 @@ class DataFormatterTestCase(TestBase):
# Now add another summary to another category and switch back and forth
self.runCmd("type category delete Category1 Category2")
self.runCmd("type summary add Rectangle -f \"Category1\" -w Category1")
self.runCmd("type summary add Rectangle -f \"Category2\" -w Category2")
self.runCmd("type summary add Rectangle --summary-string \"Category1\" -w Category1")
self.runCmd("type summary add Rectangle --summary-string \"Category2\" -w Category2")
self.runCmd("type category enable Category2")
self.runCmd("type category enable Category1")
@ -191,8 +191,8 @@ class DataFormatterTestCase(TestBase):
'r3 = {'])
# Check that multiple summaries can go into one category
self.runCmd("type summary add -f \"Width = ${var.w}, Height = ${var.h}\" Rectangle -w Category1")
self.runCmd("type summary add -f \"Radius = ${var.r}\" Circle -w Category1")
self.runCmd("type summary add --summary-string \"Width = ${var.w}, Height = ${var.h}\" Rectangle -w Category1")
self.runCmd("type summary add --summary-string \"Radius = ${var.r}\" Circle -w Category1")
self.runCmd("type category enable Category1")
@ -214,7 +214,7 @@ class DataFormatterTestCase(TestBase):
'c3 = {'])
# Add a regex based summary to a category
self.runCmd("type summary add -f \"Radius = ${var.r}\" -x Circle -w Category1")
self.runCmd("type summary add --summary-string \"Radius = ${var.r}\" -x Circle -w Category1")
self.expect("frame variable r1 r2 r3",
substrs = ['r1 = Width = ',
@ -235,14 +235,14 @@ class DataFormatterTestCase(TestBase):
'c3 = {'])
# Change a summary inside a category and check that the change is reflected
self.runCmd("type summary add Circle -w Category1 -f \"summary1\"")
self.runCmd("type summary add Circle -w Category1 --summary-string \"summary1\"")
self.expect("frame variable c1 c2 c3",
substrs = ['c1 = summary1',
'c2 = summary1',
'c3 = summary1'])
self.runCmd("type summary add Circle -w Category1 -f \"summary2\"")
self.runCmd("type summary add Circle -w Category1 --summary-string \"summary2\"")
self.expect("frame variable c1 c2 c3",
substrs = ['c1 = summary2',
@ -252,7 +252,7 @@ class DataFormatterTestCase(TestBase):
# Check that our order of priority works. Start by clearing categories
self.runCmd("type category delete Category1")
self.runCmd("type summary add Shape -w BaseCategory -f \"AShape\"")
self.runCmd("type summary add Shape -w BaseCategory --summary-string \"AShape\"")
self.runCmd("type category enable BaseCategory")
self.expect("frame variable c1 r1 c_ptr r_ptr",
@ -261,8 +261,8 @@ class DataFormatterTestCase(TestBase):
'AShape',
'AShape'])
self.runCmd("type summary add Circle -w CircleCategory -f \"ACircle\"")
self.runCmd("type summary add Rectangle -w RectangleCategory -f \"ARectangle\"")
self.runCmd("type summary add Circle -w CircleCategory --summary-string \"ACircle\"")
self.runCmd("type summary add Rectangle -w RectangleCategory --summary-string \"ARectangle\"")
self.runCmd("type category enable CircleCategory")
self.expect("frame variable c1 r1 c_ptr r_ptr",
@ -271,7 +271,7 @@ class DataFormatterTestCase(TestBase):
'ACircle',
'AShape'])
self.runCmd("type summary add \"Rectangle *\" -w RectangleStarCategory -f \"ARectangleStar\"")
self.runCmd("type summary add \"Rectangle *\" -w RectangleStarCategory --summary-string \"ARectangleStar\"")
self.runCmd("type category enable RectangleStarCategory")
self.expect("frame variable c1 r1 c_ptr r_ptr",
@ -322,10 +322,10 @@ class DataFormatterTestCase(TestBase):
# check that filters work into categories
self.runCmd("type filter add Rectangle --child w --category RectangleCategory")
self.runCmd("type category enable RectangleCategory")
self.runCmd("type summary add Rectangle -f \" \" -e --category RectangleCategory")
self.runCmd("type summary add Rectangle --summary-string \" \" -e --category RectangleCategory")
self.expect('frame variable r2',
substrs = ['w = 9'])
self.runCmd("type summary add Rectangle -f \" \" -e")
self.runCmd("type summary add Rectangle --summary-string \" \" -e")
self.expect('frame variable r2', matching=False,
substrs = ['h = 16'])

View File

@ -94,19 +94,19 @@ class DataFormatterTestCase(TestBase):
self.expect("type format delete Speed", error=True,
substrs = ['no custom format for Speed'])
self.runCmd("type summary add -f \"arr = ${var%s}\" -x \"char \\[[0-9]+\\]\" -v")
self.runCmd("type summary add --summary-string \"arr = ${var%s}\" -x \"char \\[[0-9]+\\]\" -v")
self.expect("frame variable strarr",
substrs = ['arr = "Hello world!"'])
self.runCmd("type summary clear")
self.runCmd("type summary add -f \"ptr = ${var%s}\" \"char *\" -v")
self.runCmd("type summary add --summary-string \"ptr = ${var%s}\" \"char *\" -v")
self.expect("frame variable strptr",
substrs = ['ptr = "Hello world!"'])
self.runCmd("type summary add -f \"arr = ${var%s}\" -x \"char \\[[0-9]+\\]\" -v")
self.runCmd("type summary add --summary-string \"arr = ${var%s}\" -x \"char \\[[0-9]+\\]\" -v")
self.expect("frame variable strarr",
substrs = ['arr = "Hello world!'])
@ -124,18 +124,18 @@ class DataFormatterTestCase(TestBase):
substrs = ['Point',
'one-line'])
self.runCmd("type summary add -f \"y=${var.y%x}\" Point")
self.runCmd("type summary add --summary-string \"y=${var.y%x}\" Point")
self.expect("frame variable iAmSomewhere",
substrs = ['y=0x'])
self.runCmd("type summary add -f \"y=${var.y},x=${var.x}\" Point")
self.runCmd("type summary add --summary-string \"y=${var.y},x=${var.x}\" Point")
self.expect("frame variable iAmSomewhere",
substrs = ['y=6',
'x=4'])
self.runCmd("type summary add -f \"hello\" Point -e")
self.runCmd("type summary add --summary-string \"hello\" Point -e")
self.expect("type summary list",
substrs = ['Point',
@ -146,25 +146,25 @@ class DataFormatterTestCase(TestBase):
'x = 4',
'}'])
self.runCmd("type summary add -f \"Sign: ${var[31]%B} Exponent: ${var[23-30]%x} Mantissa: ${var[0-22]%u}\" ShowMyGuts")
self.runCmd("type summary add --summary-string \"Sign: ${var[31]%B} Exponent: ${var[23-30]%x} Mantissa: ${var[0-22]%u}\" ShowMyGuts")
self.expect("frame variable cool_pointer->floating",
substrs = ['Sign: true',
'Exponent: 0x',
'80'])
self.runCmd("type summary add -f \"a test\" i_am_cool")
self.runCmd("type summary add --summary-string \"a test\" i_am_cool")
self.expect("frame variable cool_pointer",
substrs = ['a test'])
self.runCmd("type summary add -f \"a test\" i_am_cool --skip-pointers")
self.runCmd("type summary add --summary-string \"a test\" i_am_cool --skip-pointers")
self.expect("frame variable cool_pointer",
substrs = ['a test'],
matching = False)
self.runCmd("type summary add -f \"${var[1-3]}\" \"int [5]\"")
self.runCmd("type summary add --summary-string \"${var[1-3]}\" \"int [5]\"")
self.expect("frame variable int_array",
substrs = ['2',
@ -173,8 +173,8 @@ class DataFormatterTestCase(TestBase):
self.runCmd("type summary clear")
self.runCmd("type summary add -f \"${var[0-2].integer}\" \"i_am_cool *\"")
self.runCmd("type summary add -f \"${var[2-4].integer}\" \"i_am_cool [5]\"")
self.runCmd("type summary add --summary-string \"${var[0-2].integer}\" \"i_am_cool *\"")
self.runCmd("type summary add --summary-string \"${var[2-4].integer}\" \"i_am_cool [5]\"")
self.expect("frame variable cool_array",
substrs = ['1,1,6'])
@ -183,7 +183,7 @@ class DataFormatterTestCase(TestBase):
substrs = ['3,0,0'])
# test special symbols for formatting variables into summaries
self.runCmd("type summary add -f \"cool object @ ${var%L}\" i_am_cool")
self.runCmd("type summary add --summary-string \"cool object @ ${var%L}\" i_am_cool")
self.runCmd("type summary delete \"i_am_cool [5]\"")
# this test might fail if the compiler tries to store
@ -197,7 +197,7 @@ class DataFormatterTestCase(TestBase):
'[4] = cool object @ 0x'])
# test getting similar output by exploiting ${var} = 'type @ location' for aggregates
self.runCmd("type summary add -f \"${var}\" i_am_cool")
self.runCmd("type summary add --summary-string \"${var}\" i_am_cool")
# this test might fail if the compiler tries to store
# these values into registers.. hopefully this is not
@ -211,7 +211,7 @@ class DataFormatterTestCase(TestBase):
# test getting same output by exploiting %T and %L together for aggregates
self.runCmd("type summary add -f \"${var%T} @ ${var%L}\" i_am_cool")
self.runCmd("type summary add --summary-string \"${var%T} @ ${var%L}\" i_am_cool")
# this test might fail if the compiler tries to store
# these values into registers.. hopefully this is not
@ -223,37 +223,37 @@ class DataFormatterTestCase(TestBase):
'[3] = i_am_cool @ 0x',
'[4] = i_am_cool @ 0x'])
self.runCmd("type summary add -f \"goofy\" i_am_cool")
self.runCmd("type summary add -f \"${var.second_cool%S}\" i_am_cooler")
self.runCmd("type summary add --summary-string \"goofy\" i_am_cool")
self.runCmd("type summary add --summary-string \"${var.second_cool%S}\" i_am_cooler")
self.expect("frame variable the_coolest_guy",
substrs = ['(i_am_cooler) the_coolest_guy = goofy'])
# check that unwanted type specifiers are removed
self.runCmd("type summary delete i_am_cool")
self.runCmd("type summary add -f \"goofy\" \"class i_am_cool\"")
self.runCmd("type summary add --summary-string \"goofy\" \"class i_am_cool\"")
self.expect("frame variable the_coolest_guy",
substrs = ['(i_am_cooler) the_coolest_guy = goofy'])
self.runCmd("type summary delete i_am_cool")
self.runCmd("type summary add -f \"goofy\" \"enum i_am_cool\"")
self.runCmd("type summary add --summary-string \"goofy\" \"enum i_am_cool\"")
self.expect("frame variable the_coolest_guy",
substrs = ['(i_am_cooler) the_coolest_guy = goofy'])
self.runCmd("type summary delete i_am_cool")
self.runCmd("type summary add -f \"goofy\" \"struct i_am_cool\"")
self.runCmd("type summary add --summary-string \"goofy\" \"struct i_am_cool\"")
self.expect("frame variable the_coolest_guy",
substrs = ['(i_am_cooler) the_coolest_guy = goofy'])
# many spaces, but we still do the right thing
self.runCmd("type summary delete i_am_cool")
self.runCmd("type summary add -f \"goofy\" \"union i_am_cool\"")
self.runCmd("type summary add --summary-string \"goofy\" \"union i_am_cool\"")
self.expect("frame variable the_coolest_guy",
substrs = ['(i_am_cooler) the_coolest_guy = goofy'])
# but that not *every* specifier is removed
self.runCmd("type summary delete i_am_cool")
self.runCmd("type summary add -f \"goofy\" \"wrong i_am_cool\"")
self.runCmd("type summary add --summary-string \"goofy\" \"wrong i_am_cool\"")
self.expect("frame variable the_coolest_guy", matching=False,
substrs = ['(i_am_cooler) the_coolest_guy = goofy'])

View File

@ -46,7 +46,7 @@ class DataFormatterTestCase(TestBase):
# Execute the cleanup function during test case tear down.
self.addTearDownHook(cleanup)
self.runCmd("type summary add -f \"JustATest\" Point")
self.runCmd("type summary add --summary-string \"JustATest\" Point")
# Simply check we can get at global variables
self.expect("target variable g_point",
@ -57,7 +57,7 @@ class DataFormatterTestCase(TestBase):
# Print some information about the variables
# (we ignore the actual values)
self.runCmd("type summary add -f \"(x=${var.x},y=${var.y})\" Point")
self.runCmd("type summary add --summary-string \"(x=${var.x},y=${var.y})\" Point")
self.expect("target variable g_point",
substrs = ['x=',

View File

@ -53,10 +53,10 @@ class DataFormatterTestCase(TestBase):
# Execute the cleanup function during test case tear down.
self.addTearDownHook(cleanup)
self.runCmd("type summary add -f \"AllUseIt: x=${var.x} {y=${var.y}} {z=${var.z}}\" --name AllUseIt")
self.runCmd("type summary add -f \"First: x=${var.x} y=${var.y} dummy=${var.dummy}\" First")
self.runCmd("type summary add -f \"Second: x=${var.x} y=${var.y%hex}\" Second")
self.runCmd("type summary add -f \"Third: x=${var.x} z=${var.z}\" Third")
self.runCmd("type summary add --summary-string \"AllUseIt: x=${var.x} {y=${var.y}} {z=${var.z}}\" --name AllUseIt")
self.runCmd("type summary add --summary-string \"First: x=${var.x} y=${var.y} dummy=${var.dummy}\" First")
self.runCmd("type summary add --summary-string \"Second: x=${var.x} y=${var.y%hex}\" Second")
self.runCmd("type summary add --summary-string \"Third: x=${var.x} z=${var.z}\" Third")
self.expect("frame variable first",
substrs = ['First: x=12'])
@ -99,7 +99,7 @@ class DataFormatterTestCase(TestBase):
self.runCmd("thread step-over")
self.runCmd("type summary add -f \"FirstAndFriends: x=${var.x} {y=${var.y}} {z=${var.z}}\" First --name FirstAndFriends")
self.runCmd("type summary add --summary-string \"FirstAndFriends: x=${var.x} {y=${var.y}} {z=${var.z}}\" First --name FirstAndFriends")
self.expect("frame variable first",
substrs = ['FirstAndFriends: x=12',

View File

@ -54,7 +54,7 @@ class DataFormatterTestCase(TestBase):
# Execute the cleanup function during test case tear down.
self.addTearDownHook(cleanup)
self.runCmd("type summary add -f \"${var%@}\" MyClass")
self.runCmd("type summary add --summary-string \"${var%@}\" MyClass")
self.expect("frame variable object2",
substrs = ['MyOtherClass']);
@ -69,7 +69,7 @@ class DataFormatterTestCase(TestBase):
self.expect("type summary list", matching=False,
substrs = ['MyClass'])
self.runCmd("type summary add -f \"a test\" MyClass")
self.runCmd("type summary add --summary-string \"a test\" MyClass")
self.expect("frame variable object2",
substrs = ['a test']);
@ -83,7 +83,7 @@ class DataFormatterTestCase(TestBase):
self.expect("frame variable *object",
substrs = ['a test']);
self.runCmd("type summary add -f \"a test\" MyClass -C no")
self.runCmd("type summary add --summary-string \"a test\" MyClass -C no")
self.expect("frame variable *object2",
substrs = ['*object2 = {',

View File

@ -85,16 +85,16 @@ class DataFormatterTestCase(TestBase):
substrs = ['16777216'])
# put synthetic children in summary in several combinations
self.runCmd("type summary add -f \"fake_a=${svar.fake_a}\" foo")
self.runCmd("type summary add --summary-string \"fake_a=${svar.fake_a}\" foo")
self.expect('frame variable f00_1',
substrs = ['fake_a=16777216'])
self.runCmd("type summary add -f \"fake_a=${var.fake_a}\" foo")
self.runCmd("type summary add --summary-string \"fake_a=${var.fake_a}\" foo")
self.expect('frame variable f00_1',
substrs = ['fake_a=16777216'])
self.runCmd("type summary add -f \"fake_a=${var[1]}\" foo")
self.runCmd("type summary add --summary-string \"fake_a=${var[1]}\" foo")
self.expect('frame variable f00_1',
substrs = ['fake_a=16777216'])
self.runCmd("type summary add -f \"fake_a=${svar[1]}\" foo")
self.runCmd("type summary add --summary-string \"fake_a=${svar[1]}\" foo")
self.expect('frame variable f00_1',
substrs = ['fake_a=16777216'])
@ -252,11 +252,11 @@ class DataFormatterTestCase(TestBase):
'}'])
# check access to synthetic children
self.runCmd("type summary add -f \"item 0 is ${var[0]}\" std::int_vect int_vect")
self.runCmd("type summary add --summary-string \"item 0 is ${var[0]}\" std::int_vect int_vect")
self.expect('frame variable numbers',
substrs = ['item 0 is 1']);
self.runCmd("type summary add -f \"item 0 is ${svar[0]}\" std::int_vect int_vect")
self.runCmd("type summary add --summary-string \"item 0 is ${svar[0]}\" std::int_vect int_vect")
#import time
#time.sleep(19)
self.expect('frame variable numbers',
@ -321,7 +321,7 @@ class DataFormatterTestCase(TestBase):
'smart'])
# test summaries based on synthetic children
self.runCmd("type summary add std::string_vect string_vect -f \"vector has ${svar%#} items\" -e")
self.runCmd("type summary add std::string_vect string_vect --summary-string \"vector has ${svar%#} items\" -e")
self.expect("frame variable strings",
substrs = ['vector has 3 items',
'goofy',
@ -357,7 +357,7 @@ class DataFormatterTestCase(TestBase):
self.runCmd("frame variable numbers_list -T")
#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 -f \"list has ${svar%#} items\" -e")
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")
self.expect("frame variable numbers_list",
@ -442,7 +442,7 @@ class DataFormatterTestCase(TestBase):
'[3]', '!!!'])
# let's prettify string display
self.runCmd("type summary add -f \"${var._M_dataplus._M_p}\" std::string std::basic_string<char> \"std::basic_string<char,std::char_traits<char>,std::allocator<char> >\"")
self.runCmd("type summary add --summary-string \"${var._M_dataplus._M_p}\" std::string std::basic_string<char> \"std::basic_string<char,std::char_traits<char>,std::allocator<char> >\"")
self.expect("frame variable text_list",
substrs = ['list has 4 items',
@ -468,7 +468,7 @@ class DataFormatterTestCase(TestBase):
self.runCmd("frame variable ii -T")
#self.runCmd("script from StdMapSynthProvider import *")
self.runCmd("type summary add -x \"std::map<\" -f \"map has ${svar%#} items\" -e")
self.runCmd("type summary add -x \"std::map<\" --summary-string \"map has ${svar%#} items\" -e")
#import time
#time.sleep(30)
@ -535,7 +535,7 @@ class DataFormatterTestCase(TestBase):
self.runCmd("n")
self.runCmd("frame variable si -T")
#self.runCmd("type summary add std::strint_map strint_map -f \"map has ${svar%#} items\" -e")
#self.runCmd("type summary add std::strint_map strint_map --summary-string \"map has ${svar%#} items\" -e")
#self.runCmd("type synth add std::strint_map strint_map -l StdMapSynthProvider")
self.expect('frame variable si',
@ -588,7 +588,7 @@ class DataFormatterTestCase(TestBase):
self.runCmd("n")
self.runCmd("frame variable is -T")
#self.runCmd("type summary add std::intstr_map intstr_map -f \"map has ${svar%#} items\" -e")
#self.runCmd("type summary add std::intstr_map intstr_map --summary-string \"map has ${svar%#} items\" -e")
#self.runCmd("type synth add std::intstr_map intstr_map -l StdMapSynthProvider")
self.expect('frame variable is',
@ -630,7 +630,7 @@ class DataFormatterTestCase(TestBase):
self.runCmd("n")
self.runCmd("frame variable ss -T")
#self.runCmd("type summary add std::strstr_map strstr_map -f \"map has ${svar%#} items\" -e")
#self.runCmd("type summary add std::strstr_map strstr_map --summary-string \"map has ${svar%#} items\" -e")
#self.runCmd("type synth add std::strstr_map strstr_map -l StdMapSynthProvider")
self.expect('frame variable ss',

View File

@ -90,7 +90,7 @@ class DataFormatterTestCase(TestBase):
substrs = ['int says 1'])
# Change the summary
self.runCmd("type summary add -f \"int says ${var.integer}, and float says ${var.floating}\" i_am_cool")
self.runCmd("type summary add --summary-string \"int says ${var.integer}, and float says ${var.floating}\" i_am_cool")
self.expect("frame variable two",
substrs = ['int says 1',
@ -120,7 +120,7 @@ class DataFormatterTestCase(TestBase):
self.expect("frame variable two", matching=False,
substrs = ['Python summary'])
self.runCmd("type summary add i_am_cool -f \"Text summary\"")
self.runCmd("type summary add i_am_cool --summary-string \"Text summary\"")
self.expect("frame variable one",
substrs = ['Python summary'])
@ -139,7 +139,7 @@ class DataFormatterTestCase(TestBase):
substrs = ['Text summary'])
# disable type summary for pointers, and make a Python regex summary
self.runCmd("type summary add i_am_cool -p -f \"Text summary\"")
self.runCmd("type summary add i_am_cool -p --summary-string \"Text summary\"")
self.runCmd("type summary add -x cool --python-script \"%s\"" % script)
# variables should stick to the type summary
@ -157,7 +157,7 @@ class DataFormatterTestCase(TestBase):
substrs = ['Python summary'])
# return pointers to the type summary
self.runCmd("type summary add i_am_cool -f \"Text summary\"")
self.runCmd("type summary add i_am_cool --summary-string \"Text summary\"")
self.expect("frame variable one",
substrs = ['Text summary'])

View File

@ -54,12 +54,12 @@ class DataFormatterTestCase(TestBase):
self.addTearDownHook(cleanup)
# Setup the summaries for this scenario
#self.runCmd("type summary add -f \"${var._M_dataplus._M_p}\" std::string")
self.runCmd("type summary add -f \"Level 1\" \"DeepData_1\"")
self.runCmd("type summary add -f \"Level 2\" \"DeepData_2\" -e")
self.runCmd("type summary add -f \"Level 3\" \"DeepData_3\"")
self.runCmd("type summary add -f \"Level 4\" \"DeepData_4\"")
self.runCmd("type summary add -f \"Level 5\" \"DeepData_5\"")
#self.runCmd("type summary add --summary-string \"${var._M_dataplus._M_p}\" std::string")
self.runCmd("type summary add --summary-string \"Level 1\" \"DeepData_1\"")
self.runCmd("type summary add --summary-string \"Level 2\" \"DeepData_2\" -e")
self.runCmd("type summary add --summary-string \"Level 3\" \"DeepData_3\"")
self.runCmd("type summary add --summary-string \"Level 4\" \"DeepData_4\"")
self.runCmd("type summary add --summary-string \"Level 5\" \"DeepData_5\"")
# Default case, just print out summaries
self.expect('frame variable',
@ -167,7 +167,7 @@ class DataFormatterTestCase(TestBase):
'}'])
# Change summary and expand, first without -Y then with -Y
self.runCmd("type summary add -f \"${var.m_some_text}\" DeepData_5")
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"'])

View File

@ -54,12 +54,12 @@ class DataFormatterTestCase(TestBase):
self.addTearDownHook(cleanup)
# check that we are not looping here
self.runCmd("type summary add -f \"${var%V}\" SomeData")
self.runCmd("type summary add --summary-string \"${var%V}\" SomeData")
self.expect("frame variable data",
substrs = ['invalid use of aggregate type'])
# ${var%s}
self.runCmd("type summary add -f \"ptr = ${var%s}\" \"char *\"")
self.runCmd("type summary add --summary-string \"ptr = ${var%s}\" \"char *\"")
self.expect("frame variable strptr",
substrs = ['ptr = \"',
@ -69,7 +69,7 @@ class DataFormatterTestCase(TestBase):
substrs = ['ptr = \"',
'Nested Hello world!'])
self.runCmd("type summary add -f \"arr = ${var%s}\" -x \"char \\[[0-9]+\\]\"")
self.runCmd("type summary add --summary-string \"arr = ${var%s}\" -x \"char \\[[0-9]+\\]\"")
self.expect("frame variable strarr",
substrs = ['arr = \"',
@ -80,7 +80,7 @@ class DataFormatterTestCase(TestBase):
'Nested Hello world!'])
# ${var%c}
self.runCmd("type summary add -f \"ptr = ${var%c}\" \"char *\"")
self.runCmd("type summary add --summary-string \"ptr = ${var%c}\" \"char *\"")
self.expect("frame variable strptr",
substrs = ['ptr = \"',
@ -90,7 +90,7 @@ class DataFormatterTestCase(TestBase):
substrs = ['ptr = \"',
'Nested Hello world!'])
self.runCmd("type summary add -f \"arr = ${var%c}\" -x \"char \\[[0-9]+\\]\"")
self.runCmd("type summary add --summary-string \"arr = ${var%c}\" -x \"char \\[[0-9]+\\]\"")
self.expect("frame variable strarr",
substrs = ['arr = \"',
@ -101,7 +101,7 @@ class DataFormatterTestCase(TestBase):
'Nested Hello world!'])
# ${var%char[]}
self.runCmd("type summary add -f \"arr = ${var%char[]}\" -x \"char \\[[0-9]+\\]\"")
self.runCmd("type summary add --summary-string \"arr = ${var%char[]}\" -x \"char \\[[0-9]+\\]\"")
self.expect("frame variable strarr",
substrs = ['arr = \"',
@ -111,7 +111,7 @@ class DataFormatterTestCase(TestBase):
substrs = ['arr = ',
'Nested Hello world!'])
self.runCmd("type summary add -f \"ptr = ${var%char[]}\" \"char *\"")
self.runCmd("type summary add --summary-string \"ptr = ${var%char[]}\" \"char *\"")
self.expect("frame variable strptr",
substrs = ['ptr = \"',
@ -122,7 +122,7 @@ class DataFormatterTestCase(TestBase):
'Nested Hello world!'])
# ${var%a}
self.runCmd("type summary add -f \"arr = ${var%a}\" -x \"char \\[[0-9]+\\]\"")
self.runCmd("type summary add --summary-string \"arr = ${var%a}\" -x \"char \\[[0-9]+\\]\"")
self.expect("frame variable strarr",
substrs = ['arr = \"',
@ -132,7 +132,7 @@ class DataFormatterTestCase(TestBase):
substrs = ['arr = ',
'Nested Hello world!'])
self.runCmd("type summary add -f \"ptr = ${var%a}\" \"char *\"")
self.runCmd("type summary add --summary-string \"ptr = ${var%a}\" \"char *\"")
self.expect("frame variable strptr",
substrs = ['ptr = \"',
@ -142,7 +142,7 @@ class DataFormatterTestCase(TestBase):
substrs = ['ptr = \"',
'Nested Hello world!'])
self.runCmd("type summary add -f \"ptr = ${var[]%char[]}\" \"char *\"")
self.runCmd("type summary add --summary-string \"ptr = ${var[]%char[]}\" \"char *\"")
# I do not know the size of the data, but you are asking for a full array slice..
# use the ${var%char[]} to obtain a string as result
@ -155,7 +155,7 @@ class DataFormatterTestCase(TestBase):
'Nested Hello world!'])
# You asked an array-style printout...
self.runCmd("type summary add -f \"ptr = ${var[0-1]%char[]}\" \"char *\"")
self.runCmd("type summary add --summary-string \"ptr = ${var[0-1]%char[]}\" \"char *\"")
self.expect("frame variable strptr",
substrs = ['ptr = ',
@ -166,7 +166,7 @@ class DataFormatterTestCase(TestBase):
'[{N},{e}]'])
# using [] is required here
self.runCmd("type summary add -f \"arr = ${var%x}\" \"int [5]\"")
self.runCmd("type summary add --summary-string \"arr = ${var%x}\" \"int [5]\"")
self.expect("frame variable intarr",
substrs = ['<invalid usage of pointer value as object>'])
@ -174,7 +174,7 @@ class DataFormatterTestCase(TestBase):
self.expect("frame variable other.intarr",
substrs = ['<invalid usage of pointer value as object>'])
self.runCmd("type summary add -f \"arr = ${var[]%x}\" \"int [5]\"")
self.runCmd("type summary add --summary-string \"arr = ${var[]%x}\" \"int [5]\"")
self.expect("frame variable intarr",
substrs = ['intarr = arr =',
@ -185,7 +185,7 @@ class DataFormatterTestCase(TestBase):
'0x00000009,0x00000008,0x00000007,0x00000006,0x00000005'])
# printing each array item as an array
self.runCmd("type summary add -f \"arr = ${var[]%uint32_t[]}\" \"int [5]\"")
self.runCmd("type summary add --summary-string \"arr = ${var[]%uint32_t[]}\" \"int [5]\"")
self.expect("frame variable intarr",
substrs = ['intarr = arr =',
@ -196,19 +196,18 @@ class DataFormatterTestCase(TestBase):
'{0x00000009},{0x00000008},{0x00000007},{0x00000006},{0x00000005}'])
# printing full array as an array
self.runCmd("log enable lldb types -f dummy.log")
self.runCmd("type summary add -f \"arr = ${var%uint32_t[]}\" \"int [5]\"")
self.runCmd("type summary add --summary-string \"arr = ${var%uint32_t[]}\" \"int [5]\"")
self.expect("frame variable intarr",
substrs = ['intarr = arr =',
'0x00000001,0x00000001,0x00000002,0x00000003,0x00000005'])
self.runCmd("log disable lldb types")
self.expect("frame variable other.intarr",
substrs = ['intarr = arr =',
'0x00000009,0x00000008,0x00000007,0x00000006,0x00000005'])
# printing each array item as an array
self.runCmd("type summary add -f \"arr = ${var[]%float32[]}\" \"float [7]\"")
self.runCmd("type summary add --summary-string \"arr = ${var[]%float32[]}\" \"float [7]\"")
self.expect("frame variable flarr",
substrs = ['flarr = arr =',
@ -219,7 +218,7 @@ class DataFormatterTestCase(TestBase):
'{25.5},{25.7},{25.9},{26.4},{27.1},{27.3},{26.9}'])
# printing full array as an array
self.runCmd("type summary add -f \"arr = ${var%float32[]}\" \"float [7]\"")
self.runCmd("type summary add --summary-string \"arr = ${var%float32[]}\" \"float [7]\"")
self.expect("frame variable flarr",
substrs = ['flarr = arr =',
@ -230,8 +229,8 @@ class DataFormatterTestCase(TestBase):
'25.5,25.7,25.9,26.4,27.1,27.3,26.9'])
# using array smart summary strings for pointers should make no sense
self.runCmd("type summary add -f \"arr = ${var%float32[]}\" \"float *\"")
self.runCmd("type summary add -f \"arr = ${var%int32_t[]}\" \"int *\"")
self.runCmd("type summary add --summary-string \"arr = ${var%float32[]}\" \"float *\"")
self.runCmd("type summary add --summary-string \"arr = ${var%int32_t[]}\" \"int *\"")
self.expect("frame variable flptr", matching=False,
substrs = ['78.5,77.4,78,76.1,76.7,76.8,77'])
@ -240,8 +239,8 @@ class DataFormatterTestCase(TestBase):
substrs = ['1,1,2,3,5'])
# use y and Y
self.runCmd("type summary add -f \"arr = ${var%y}\" \"float [7]\"")
self.runCmd("type summary add -f \"arr = ${var%y}\" \"int [5]\"")
self.runCmd("type summary add --summary-string \"arr = ${var%y}\" \"float [7]\"")
self.runCmd("type summary add --summary-string \"arr = ${var%y}\" \"int [5]\"")
self.expect("frame variable flarr",
substrs = ['flarr = arr =',
@ -259,8 +258,8 @@ class DataFormatterTestCase(TestBase):
substrs = ['intarr = arr = ',
'09 00 00 00,08 00 00 00,07 00 00 00,06 00 00 00,05 00 00 00'])
self.runCmd("type summary add -f \"arr = ${var%Y}\" \"float [7]\"")
self.runCmd("type summary add -f \"arr = ${var%Y}\" \"int [5]\"")
self.runCmd("type summary add --summary-string \"arr = ${var%Y}\" \"float [7]\"")
self.runCmd("type summary add --summary-string \"arr = ${var%Y}\" \"int [5]\"")
self.expect("frame variable flarr",
substrs = ['flarr = arr =',

View File

@ -61,7 +61,7 @@ class DataFormatterTestCase(TestBase):
'z = 8'])
# Check we can still access the missing child by summary
self.runCmd("type summary add BagOfInts -f \"y=${var.y}\"")
self.runCmd("type summary add BagOfInts --summary-string \"y=${var.y}\"")
self.expect('frame variable int_bag',
substrs = ['y=7'])
@ -83,7 +83,7 @@ class DataFormatterTestCase(TestBase):
'z = 8'])
# Summary+Synth must work together
self.runCmd("type summary add BagOfInts -f \"y=${var.y}\" -e")
self.runCmd("type summary add BagOfInts --summary-string \"y=${var.y}\" -e")
self.expect('frame variable int_bag',
substrs = ['y=7',
'x = 6',

View File

@ -53,7 +53,7 @@ class DataFormatterTestCase(TestBase):
# Execute the cleanup function during test case tear down.
self.addTearDownHook(cleanup)
self.runCmd("type summary add -f \"SUMMARY SUCCESS ${var}\" Summarize")
self.runCmd("type summary add --summary-string \"SUMMARY SUCCESS ${var}\" Summarize")
self.expect('frame variable mine_ptr',
substrs = ['SUMMARY SUCCESS summarize_ptr_t @ '])
@ -61,7 +61,7 @@ class DataFormatterTestCase(TestBase):
self.expect('frame variable *mine_ptr',
substrs = ['SUMMARY SUCCESS summarize_t @'])
self.runCmd("type summary add -f \"SUMMARY SUCCESS ${var.first}\" Summarize")
self.runCmd("type summary add --summary-string \"SUMMARY SUCCESS ${var.first}\" Summarize")
self.expect('frame variable mine_ptr',
substrs = ['SUMMARY SUCCESS 10'])

View File

@ -53,7 +53,7 @@ class DataFormatterTestCase(TestBase):
# Execute the cleanup function during test case tear down.
self.addTearDownHook(cleanup)
self.runCmd("type summary add -f \"SUMMARY SUCCESS ${var}\" Summarize")
self.runCmd("type summary add --summary-string \"SUMMARY SUCCESS ${var}\" Summarize")
self.expect('frame variable mine_ptr',
substrs = ['SUMMARY SUCCESS summarize_ptr_t @ '])
@ -61,7 +61,7 @@ class DataFormatterTestCase(TestBase):
self.expect('frame variable *mine_ptr',
substrs = ['SUMMARY SUCCESS summarize_t @'])
self.runCmd("type summary add -f \"SUMMARY SUCCESS ${var.first}\" Summarize")
self.runCmd("type summary add --summary-string \"SUMMARY SUCCESS ${var.first}\" Summarize")
self.expect('frame variable mine_ptr',
substrs = ['SUMMARY SUCCESS 10'])
@ -69,15 +69,15 @@ class DataFormatterTestCase(TestBase):
self.expect('frame variable *mine_ptr',
substrs = ['SUMMARY SUCCESS 10'])
self.runCmd("type summary add -f \"${var}\" Summarize")
self.runCmd("type summary add -f \"${var}\" -e TwoSummarizes")
self.runCmd("type summary add --summary-string \"${var}\" Summarize")
self.runCmd("type summary add --summary-string \"${var}\" -e TwoSummarizes")
self.expect('frame variable',
substrs = ['(TwoSummarizes) twos = TwoSummarizes @ ',
'first = summarize_t @ ',
'second = summarize_t @ '])
self.runCmd("type summary add -f \"SUMMARY SUCCESS ${var.first}\" Summarize")
self.runCmd("type summary add --summary-string \"SUMMARY SUCCESS ${var.first}\" Summarize")
self.expect('frame variable',
substrs = ['(TwoSummarizes) twos = TwoSummarizes @ ',
'first = SUMMARY SUCCESS 1',