Change "breakpoint list" command to default to brief output rather than full output.

Modify test cases in test suite to either expect brief output or to pass -f for full
output as appropriate.

llvm-svn: 124905
This commit is contained in:
Caroline Tice 2011-02-04 22:59:41 +00:00
parent 116a9d7c38
commit 79042b3e93
21 changed files with 33 additions and 29 deletions

View File

@ -641,7 +641,7 @@ CommandObjectMultiwordBreakpoint::VerifyBreakpointIDs (Args &args, Target *targe
CommandObjectBreakpointList::CommandOptions::CommandOptions() :
Options (),
m_level (lldb::eDescriptionLevelFull) // Breakpoint List defaults to brief descriptions
m_level (lldb::eDescriptionLevelBrief) // Breakpoint List defaults to brief descriptions
{
}
@ -708,7 +708,7 @@ CommandObjectBreakpointList::CommandOptions::ResetOptionValues ()
{
Options::ResetOptionValues();
m_level = lldb::eDescriptionLevelFull;
m_level = lldb::eDescriptionLevelBrief;
m_internal = false;
}

View File

@ -74,7 +74,7 @@ class AliasTestCase(TestBase):
self.runCmd ("bpa -p 1 -o 'print frame; print bp_loc'")
self.runCmd ("bpa -c 2 -o 'frame variable b'")
self.expect ("bpi",
self.expect ("bpi -f",
substrs = [ "Current breakpoints:",
"1: name = 'foo', locations = 1",
"print frame; print bp_loc",

View File

@ -64,7 +64,7 @@ class ArrayTypesTestCase(TestBase):
'stop reason = breakpoint'])
# The breakpoint should have a hit count of 1.
self.expect("breakpoint list", BREAKPOINT_HIT_ONCE,
self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
substrs = ['resolved, hit count = 1'])
# Issue 'variable list' command on several array-type variables.

View File

@ -58,7 +58,7 @@ class BitfieldsTestCase(TestBase):
'stop reason = breakpoint'])
# The breakpoint should have a hit count of 1.
self.expect("breakpoint list", BREAKPOINT_HIT_ONCE,
self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
substrs = [' resolved, hit count = 1'])
# This should display correctly.

View File

@ -58,6 +58,10 @@ class BreakpointCommandTestCase(TestBase):
# The breakpoint list now only contains breakpoint 1.
self.expect("breakpoint list", "Breakpoints 1 & 2 created",
substrs = ["1: file ='main.c', line = %d, locations = 1" % self.line,
"2: file ='main.c', line = %d, locations = 1" % self.line] )
self.expect("breakpoint list -f", "Breakpoints 1 & 2 created",
substrs = ["1: file ='main.c', line = %d, locations = 1" % self.line,
"2: file ='main.c', line = %d, locations = 1" % self.line],
patterns = ["1.1: .+at main.c:%d, .+unresolved, hit count = 0" % self.line,
@ -105,13 +109,13 @@ class BreakpointCommandTestCase(TestBase):
startstr = "error: '2' is not a currently valid breakpoint id.")
# The breakpoint list now only contains breakpoint 1.
self.expect("breakpoint list", "Breakpoint 1 exists",
self.expect("breakpoint list -f", "Breakpoint 1 exists",
substrs = ["1: file ='main.c', line = %d, locations = 1, resolved = 1" %
self.line,
"hit count = 1"])
# Not breakpoint 2.
self.expect("breakpoint list", "No more breakpoint 2", matching=False,
self.expect("breakpoint list -f", "No more breakpoint 2", matching=False,
substrs = ["2: file ='main.c', line = %d, locations = 1, resolved = 1" %
self.line])
@ -126,7 +130,7 @@ class BreakpointCommandTestCase(TestBase):
'stop reason = breakpoint'])
# The breakpoint should have a hit count of 2.
self.expect("breakpoint list", BREAKPOINT_HIT_TWICE,
self.expect("breakpoint list -f", BREAKPOINT_HIT_TWICE,
substrs = ['resolved, hit count = 2'])
def breakpoint_command_script_parameters (self):

View File

@ -67,7 +67,7 @@ class BreakpointConditionsTestCase(TestBase):
startstr = '(int) val = 3')
# Also check the hit count, which should be 3, by design.
self.expect("breakpoint list", BREAKPOINT_HIT_THRICE,
self.expect("breakpoint list -f", BREAKPOINT_HIT_THRICE,
substrs = ["resolved = 1",
"Condition: val == 3",
"hit count = 3"])
@ -83,7 +83,7 @@ class BreakpointConditionsTestCase(TestBase):
# created breakpoint, so that when the breakpoint hits, val == 1.
self.runCmd("process kill")
self.runCmd("breakpoint modify -c ''")
self.expect("breakpoint list", BREAKPOINT_STATE_CORRECT, matching=False,
self.expect("breakpoint list -f", BREAKPOINT_STATE_CORRECT, matching=False,
substrs = ["Condition:"])
# Now run the program again.

View File

@ -63,7 +63,7 @@ class BreakpointIgnoreCountTestCase(TestBase):
patterns = ['Process .* stopped'])
# Also check the hit count, which should be 2, due to ignore count of 1.
self.expect("breakpoint list", BREAKPOINT_HIT_THRICE,
self.expect("breakpoint list -f", BREAKPOINT_HIT_THRICE,
substrs = ["resolved = 1",
"hit count = 2"])

View File

@ -40,7 +40,7 @@ class BreakpointLocationsTestCase(TestBase):
self.line)
# The breakpoint list should show 3 locations.
self.expect("breakpoint list", "Breakpoint locations shown correctly",
self.expect("breakpoint list -f", "Breakpoint locations shown correctly",
substrs = ["1: file ='main.c', line = %d, locations = 3" % self.line],
patterns = ["where = a.out`func_inlined .+unresolved, hit count = 0",
"where = a.out`main .+\[inlined\].+unresolved, hit count = 0"])
@ -85,7 +85,7 @@ class BreakpointLocationsTestCase(TestBase):
substrs = ["stop reason = breakpoint 1."])
# At this point, 1.1 has a hit count of 0 and the other a hit count of 1".
self.expect("breakpoint list", "The breakpoints should report correct hit counts",
self.expect("breakpoint list -f", "The breakpoints should report correct hit counts",
patterns = ["1\.1: .+ unresolved, hit count = 0 +Options: disabled",
"1\.2: .+ resolved, hit count = 1",
"1\.3: .+ resolved, hit count = 1"])

View File

@ -84,7 +84,7 @@ class ClassTypesTestCase(TestBase):
'stop reason = breakpoint'])
# The breakpoint should have a hit count of 1.
self.expect("breakpoint list", BREAKPOINT_HIT_ONCE,
self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
substrs = [' resolved, hit count = 1'])
# We should be stopped on the ctor function of class C.
@ -172,7 +172,7 @@ class ClassTypesTestCase(TestBase):
'stop reason = breakpoint'])
# The breakpoint should have a hit count of 1.
self.expect("breakpoint list", BREAKPOINT_HIT_ONCE,
self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
substrs = [' resolved, hit count = 1'])
# Continue on inside the ctor() body...

View File

@ -48,7 +48,7 @@ class DeadStripTestCase(TestBase):
'stop reason = breakpoint'])
# The breakpoint should have a hit count of 1.
self.expect("breakpoint list 1", BREAKPOINT_HIT_ONCE,
self.expect("breakpoint list -f 1", BREAKPOINT_HIT_ONCE,
substrs = [' resolved, hit count = 1'])
self.runCmd("continue")
@ -60,7 +60,7 @@ class DeadStripTestCase(TestBase):
'stop reason = breakpoint'])
# The breakpoint should have a hit count of 1.
self.expect("breakpoint list 3", BREAKPOINT_HIT_ONCE,
self.expect("breakpoint list -f 3", BREAKPOINT_HIT_ONCE,
substrs = [' resolved, hit count = 1'])

View File

@ -47,7 +47,7 @@ class EnumTypesTestCase(TestBase):
'stop reason = breakpoint'])
# The breakpoint should have a hit count of 1.
self.expect("breakpoint list", BREAKPOINT_HIT_ONCE,
self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
substrs = [' resolved, hit count = 1'])
# Look up information about the 'days' enum type.

View File

@ -41,7 +41,7 @@ class ForwardDeclarationTestCase(TestBase):
'stop reason = breakpoint'])
# The breakpoint should have a hit count of 1.
self.expect("breakpoint list", BREAKPOINT_HIT_ONCE,
self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
substrs = [' resolved, hit count = 1'])
# This should display correctly.

View File

@ -45,7 +45,7 @@ class FunctionTypesTestCase(TestBase):
'stop reason = breakpoint'])
# The breakpoint should have a hit count of 1.
self.expect("breakpoint list", BREAKPOINT_HIT_ONCE,
self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
substrs = [' resolved, hit count = 1'])
# Check that the 'callback' variable display properly.

View File

@ -45,7 +45,7 @@ class GlobalVariablesTestCase(TestBase):
'stop reason = breakpoint'])
# The breakpoint should have a hit count of 1.
self.expect("breakpoint list", BREAKPOINT_HIT_ONCE,
self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
substrs = [' resolved, hit count = 1'])
# Check that GLOBAL scopes are indicated for the variables.

View File

@ -184,7 +184,7 @@ class LoadUnloadTestCase(TestBase):
'stop reason = breakpoint'])
# The breakpoint should have a hit count of 1.
self.expect("breakpoint list", BREAKPOINT_HIT_ONCE,
self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
substrs = [' resolved, hit count = 1'])
# Issue the 'contnue' command. We should stop agaian at a_function.
@ -199,7 +199,7 @@ class LoadUnloadTestCase(TestBase):
'stop reason = breakpoint'])
# The breakpoint should have a hit count of 2.
self.expect("breakpoint list", BREAKPOINT_HIT_ONCE,
self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
substrs = [' resolved, hit count = 2'])

View File

@ -69,7 +69,7 @@ class SetValuesTestCase(TestBase):
'stop reason = breakpoint'])
# The breakpoint should have a hit count of 1.
self.expect("breakpoint list", BREAKPOINT_HIT_ONCE,
self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
substrs = [' resolved, hit count = 1'])
# main.c:15

View File

@ -47,7 +47,7 @@ class SendSignalTestCase(TestBase):
'stop reason = breakpoint'])
# The breakpoint should have a hit count of 1.
self.expect("breakpoint list", BREAKPOINT_HIT_ONCE,
self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
substrs = [' resolved, hit count = 1'])
self.runCmd("process status")

View File

@ -47,7 +47,7 @@ class UnsignedTypesTestCase(TestBase):
substrs = ['state is stopped', 'stop reason = breakpoint'])
# The breakpoint should have a hit count of 1.
self.expect("breakpoint list", BREAKPOINT_HIT_ONCE,
self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
substrs = [' resolved, hit count = 1'])
# Execute the assignment statement.

View File

@ -56,7 +56,7 @@ class STLTestCase(TestBase):
'stop reason = breakpoint'])
# The breakpoint should have a hit count of 1.
self.expect("breakpoint list", BREAKPOINT_HIT_ONCE,
self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
substrs = [' resolved, hit count = 1'])
# Now do 'thread step-in', we should stop on the basic_string template.

View File

@ -52,7 +52,7 @@ class StructTypesTestCase(TestBase):
'stop reason = breakpoint'])
# The breakpoint should have a hit count of 1.
self.expect("breakpoint list", BREAKPOINT_HIT_ONCE,
self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
substrs = [' resolved, hit count = 1'])

View File

@ -47,7 +47,7 @@ class UnsignedTypesTestCase(TestBase):
substrs = ['state is stopped', 'stop reason = breakpoint'])
# The breakpoint should have a hit count of 1.
self.expect("breakpoint list", BREAKPOINT_HIT_ONCE,
self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
substrs = [' resolved, hit count = 1'])
# Test that unsigned types display correctly.