Commit Graph

16 Commits

Author SHA1 Message Date
Jim Ingham 85e8b81492 - Changed all the places where CommandObjectReturn was exporting a StreamString to just exporting
a Stream, and then added GetOutputData & GetErrorData to get the accumulated data.
- Added a StreamTee that will tee output to two provided lldb::StreamSP's.
- Made the CommandObjectReturn use this so you can Tee the results immediately to
the debuggers output file, as well as saving up the results to return when the command
is done executing.
- HandleCommands now uses this so that if you have a set of commands that continue the target
you will see the commands come out as they are processed.
- The Driver now uses this to output the command results as you go, which makes the interface
more reactive seeming.

llvm-svn: 126015
2011-02-19 02:53:09 +00:00
Caroline Tice 79042b3e93 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
2011-02-04 22:59:41 +00:00
Johnny Chen ab62873b63 Fix test function breakpoint_command_script_parameters()'s expect-pattern so that
it passes when using clang as the compiler to build the inferior.

llvm-svn: 124707
2011-02-02 00:56:40 +00:00
Caroline Tice 836e3aba16 Add a test case to verify that the frame and breakpoint location
are being properly passed down to script breakpoint commands.

llvm-svn: 124511
2011-01-29 00:20:56 +00:00
Johnny Chen 73f7fa82e5 Modify one assertion message.
llvm-svn: 122428
2010-12-22 19:23:44 +00:00
Johnny Chen a91b9474da Add text about test class cleanup.
llvm-svn: 117148
2010-10-22 21:06:04 +00:00
Johnny Chen bc095dbe68 The test should remove 'output.txt' if it exists before launching the inferior
process which is supposed to create the file.

llvm-svn: 117136
2010-10-22 19:51:42 +00:00
Johnny Chen 92b9e6e323 Add an assert that 'output.txt' exists before opening it.
llvm-svn: 116775
2010-10-19 00:16:14 +00:00
Johnny Chen 0c724effb8 The StateType representation has been changed. Modify the test cases to accommodate.
llvm-svn: 116705
2010-10-18 15:44:42 +00:00
Johnny Chen aadcef54de Make calling the super class's setUp() method less fragile.
llvm-svn: 116490
2010-10-14 17:31:24 +00:00
Johnny Chen 456c9c343e Apply (query-replace "frame variable" "frame variable -t") and fix a comment about 'expr var',
not 'frame variable var'.

llvm-svn: 116419
2010-10-13 19:22:50 +00:00
Johnny Chen 48daa1fddb Avoid using hardcoded line number to break on. Use the line_number() utility
function to get the line number to break on during setUp().

llvm-svn: 116344
2010-10-12 21:52:29 +00:00
Johnny Chen 277c8f0f1d Wrap the rest of file reading operations inside a with block and convert a assertTrue()
usage to self.expect() which is more descriptive.

llvm-svn: 116115
2010-10-08 22:10:42 +00:00
Johnny Chen 06b89fe646 Pass '-f' option to rm command so that it won't report an error if the file to
be removed does not exist for any reason.

llvm-svn: 116025
2010-10-08 00:50:36 +00:00
Johnny Chen cf11e6066b These prints should go to stderr as well. Plus add a global assert string.
llvm-svn: 115167
2010-09-30 17:06:27 +00:00
Johnny Chen ea88e94318 Added a more complex test case of breakpoint commands, which executes a sequence
of 'breakpoint command add/list/remove' commands to set breakpoint callbacks,
list them, and then remove one.

Modified the lldbtest.TestBase.expect() method to add two additional keyword
arguments:

o matching (default to True), which, if set to False, reverses the semantics of
  'expect' to 'expect not'

o patterns (default to None), which specifies a list of regexp patterns to match
  against the output from running the command

TestBreakpointCommand.py uses the matching=False and the patterns=[...] expect()
API.

llvm-svn: 114480
2010-09-21 21:08:53 +00:00