Commit Graph

1305 Commits

Author SHA1 Message Date
Caroline Tice 82305fc59a Add proper EOF handling to Communication & Connection classes:
Add bool member to Communication class indicating whether the
Connection should be closed on receiving an EOF or not.  Update the
Connection read to return an EOF status when appropriate.  Modify the
Communication class to pass the EOF along or not, and to close the
Connection or not, as appropriate.

llvm-svn: 120723
2010-12-02 18:31:56 +00:00
Johnny Chen 5f46b89df2 On second thought, inserting a delay of 1.0 second slows down the test suite
for the types directory quite a bit and masking out potential problems.  Enable
the delay via an environment variable, instead.

llvm-svn: 120719
2010-12-02 18:03:37 +00:00
Johnny Chen 560befce38 GenericTester.generic_type_expr_tester():
Don't overwhelm the expression mechanism.  Previously, there was no delay
    between successive invocations of 'expression' command.  The test suite
    run has experienced 'Resume timed out' or similar error messages.  Now we
    currently add a sleep of 1.0 second before issuing the next 'expression'
    command.

llvm-svn: 120626
2010-12-01 23:46:33 +00:00
Johnny Chen b91cb31490 Add a mechanism of overwriting the default 1.0 second wait time between test
cases when specifying '-w' to the test driver, by using an environment variable
LLDB_TIME_WAIT_BETWEEN_TEST_CASES.

llvm-svn: 120625
2010-12-01 23:35:13 +00:00
Johnny Chen d6c05708eb Remove @expectedFailure decorator as the bug has been fixed.
llvm-svn: 120624
2010-12-01 23:15:58 +00:00
Johnny Chen 6bc1366366 TestBase.setUp() needs to make sure lldb.blacklist is not None
before iterating on it.

llvm-svn: 120623
2010-12-01 23:07:36 +00:00
Johnny Chen 75739045d3 Add a '-b blacklistFile' option to the test driver to take a file specifying the
test classes or test cases to be excludued from the test suite.

Check in an example blacklist file: blacklist.py:

"""
'blacklist' is a Python dictionary, it stores the mapping of a string describing
either a testclass or a testcase, i.e, testclass.testmethod, to the reason (a
string) it is blacklisted.

Following is an example which states that test class IntegerTypesExprTestCase
should be skipped because 'This test class crashed' and the test case
FoundationTestCase.test_data_type_and_expr_with_dsym should be skipped because
it is 'Temporarily disabled'.

blacklist = {'IntegerTypesExprTestCase': 'This test class crashed',
             'FoundationTestCase.test_data_type_and_expr_with_dsym': 'Temporarily disabled'
             }
"""

blacklist = {}

An example of invoking the test driver and specifying a blacklist file:

./dotest.py -b blacklist.py -v types

This runs the tests under 'types' directory but excludes the tests specified in
balcklist.py.

llvm-svn: 120620
2010-12-01 22:47:54 +00:00
Greg Clayton 3c14438fe8 Fixed 32 bit debugging after recent architecture changes to debugserver.
llvm-svn: 120618
2010-12-01 22:45:40 +00:00
Sean Callanan 3670ba5c87 Fixed ClangUserExpression's wrapping of expressions
in C++ methods.  There were two fixes involved:

 - For an object whose contents are not known, the
   expression should be treated as a non-member, and
   "this" should have no meaning.

 - For a const object, the method should be declared
   const as well.

llvm-svn: 120606
2010-12-01 21:35:54 +00:00
Johnny Chen 5237e90cbe Add test cases to test that:
1. 'help image du sym' is ambiguous.
2. 'help image du line' is not ambiguous.

llvm-svn: 120587
2010-12-01 19:10:59 +00:00
Sean Callanan 83b0918938 Allowed ClangExpressionDeclMap to dematerialize
persistent variables even after the parser has
finished running.

llvm-svn: 120521
2010-12-01 01:29:06 +00:00
Sean Callanan 1d47cafc1c Whitespace fix.
llvm-svn: 120520
2010-12-01 01:28:23 +00:00
Johnny Chen ce81496fab Make CommandObjectMultiword::GetSubcommandSP() more robust by appending the
exactly-matched sub_cmd to the passed in 'matches' string list.

llvm-svn: 120516
2010-12-01 01:04:22 +00:00
Johnny Chen 19e302bc70 Remove the @expectedFailure decorator as the bug has been fixed.
llvm-svn: 120515
2010-12-01 01:01:23 +00:00
Jim Ingham 97253e62e9 GetCommandObject returns no matches in the match array when there is only one match. That's odd, but I don't want to change that right now, just cope with it where I'm doing the command matching.
llvm-svn: 120511
2010-12-01 00:42:17 +00:00
Johnny Chen c7c03d919a Add @expectedFailure decorator for a known bug:
rdar://problem/8689814 test failure: test/macosx/universal (the i386 slice does not break?)

llvm-svn: 120505
2010-12-01 00:03:17 +00:00
Johnny Chen be6fb3a85f Add expectedFailure decorator for test_help_image_dump_symtab_should_not_crash().
Possibly due to http://llvm.org/viewvc/llvm-project?rev=120484&view=rev.

llvm-svn: 120503
2010-11-30 23:57:58 +00:00
Jim Ingham 271ad29a4e Fix completion for multi-word commands in the "help" command.
llvm-svn: 120484
2010-11-30 22:59:37 +00:00
Johnny Chen 1922a8dbea Remove @skip decorators for fixed crashes.
llvm-svn: 120479
2010-11-30 22:34:19 +00:00
Sean Callanan f5a998643c Fixed a problem where m_register_info was not being
copied by the copy constructor for ClangExpressionVariable.
This meant that a NULL m_register_info wouldn't be
copied, and instead the field was uninitialized, potentially
confusing the materializer.

llvm-svn: 120472
2010-11-30 22:01:58 +00:00
Johnny Chen 876e6b31f5 Skip two test classes due to:
rdar://problem/8710994 Assertion failed: (reg_info) GDBRemoteRegisterContext.cpp, line 199

llvm-svn: 120462
2010-11-30 21:09:06 +00:00
Johnny Chen 4bb6ceb764 Entire test class skipped due to:
rdar://problem/8710994 Assertion failed: (reg_info) GDBRemoteRegisterContext.cpp, line 199

llvm-svn: 120434
2010-11-30 17:59:40 +00:00
Johnny Chen ed6b6055b4 Entire test class skipped due to:
rdar://problem/8710994 Assertion failed: (reg_info) GDBRemoteRegisterContext.cpp, line 199

llvm-svn: 120432
2010-11-30 17:53:12 +00:00
Johnny Chen ad6e34609d Skipped two test cases due to seg fault while hadnling command:
Application Specific Information:
HandleCommand(command = "expression self->str")


radar:8711052

llvm-svn: 120431
2010-11-30 17:46:46 +00:00
Johnny Chen aa9bc2eca5 Entire test class skipped due to:
rdar://problem/8710994 Assertion failed: (reg_info) GDBRemoteRegisterContext.cpp, line 199

llvm-svn: 120430
2010-11-30 17:35:58 +00:00
Jim Ingham f48169bb4f Moved the code in ClangUserExpression that set up & ran the thread plan with timeouts, and restarting with all threads into a utility function in Process. This required a bunch of renaming.
Added a ThreadPlanCallUserExpression that differs from ThreadPlanCallFunction in that it holds onto a shared pointer to its ClangUserExpression so that can't go away before the thread plan is done using it.

Fixed the stop message when you hit a breakpoint while running a user expression so it is more obvious what has happened.

llvm-svn: 120386
2010-11-30 02:22:11 +00:00
Sean Callanan 348b5897f9 Added a feature where registers can be referred to
using special $-variables from expressions.

(lldb) expr $rip

These variables are available for reading and
writing.

llvm-svn: 120367
2010-11-30 00:27:43 +00:00
Johnny Chen a994070040 Add comment for a branch of test logic which applies to ['clang', 'llvm-gcc'] only.
llvm-svn: 120355
2010-11-29 23:58:04 +00:00
Johnny Chen 11d2bae187 Minor comment fix.
llvm-svn: 120352
2010-11-29 23:47:40 +00:00
Jason Molenda c1903406e5 Fix build error when lldb is being built i386.
llvm-svn: 120322
2010-11-29 21:38:58 +00:00
Johnny Chen c9ea0f8425 Add an expect() statement within breakpoint_conditions() method which tests that
the process status is indeed 'stopped' before invoking 'frame variable -t val'
command to inspect the frame variable.  When I run the test suite, it sometimes
emits an output like:

runCmd: frame variable -t val
runCmd failed!
error: you must be stopped in a valid stack frame to view frame variables.

The expect() statement inserted is to make sure that the process is stopped and
we have a valid frame.

llvm-svn: 120318
2010-11-29 20:49:09 +00:00
Johnny Chen 4921b11320 Change the variable TestBase.timeWait to the more descriptive timeWaitNextLaunch.
Increase the delta between successive test cases, enabled with the '-w' option to
the test driver, from 0.5 to 1.0 second, to arrive at a cleaner state before the
next test case.

llvm-svn: 120315
2010-11-29 20:20:34 +00:00
Johnny Chen bbda8ed39a Add comment.
llvm-svn: 120295
2010-11-29 17:52:43 +00:00
Johnny Chen 46389e9ddf When looping through the test suite more than once (repeat count > 1), we should
ignore and not enforce the signleton pattern for the LLDBTestResult class.

llvm-svn: 120294
2010-11-29 17:50:10 +00:00
Greg Clayton facfd06c4f When we resolve a forward declaration type, be sure to put it into the m_die_to_type map so we don't assert later when someone tries to resolve the type.
llvm-svn: 119910
2010-11-20 19:16:50 +00:00
Sean Callanan fbfd7ba547 Removed a stray dump() that made it into top-of-tree.
llvm-svn: 119890
2010-11-20 02:23:49 +00:00
Sean Callanan a3aa0cf6e6 Made GetVariableValue() more robust in the face
of failures in the AST importer.  Also ensured
that a variable will not be blindly added if
GetVariableValue() returns an error.

llvm-svn: 119889
2010-11-20 02:19:29 +00:00
Sean Callanan 80eee3a989 Removed a stray dump().
llvm-svn: 119888
2010-11-20 02:06:01 +00:00
Jason Molenda 2d107dd02b Change the DWARFExpression::Evaluate methods to take an optional
RegisterContext* - normally this is retrieved from the ExecutionContext's
StackFrame but when we need to evaluate an expression while creating
the stack frame list this can be a little tricky.

Add DW_OP_deref_size, needed for the _sigtramp FDE expression.

Add support for processing DWARF expressions in RegisterContextLLDB.

Update callers to DWARFExpression::Evaluate.

llvm-svn: 119885
2010-11-20 01:28:30 +00:00
Greg Clayton cd55b1957e Revert the End of file stuff that was added as it was causing read threads
to hang around and take a ton of CPU time. Caroline will fix this when she
gets back from vacation.

llvm-svn: 119877
2010-11-20 00:17:57 +00:00
Greg Clayton a651b537d6 Updated to latest and greatest clang for a "print cvr-qualifiers on function
declarations" fix.

llvm-svn: 119847
2010-11-19 21:46:54 +00:00
Caroline Tice efed613172 Add the ability to catch and do the right thing with Interrupts (often control-c)
and end-of-file (often control-d).

llvm-svn: 119837
2010-11-19 20:47:54 +00:00
Johnny Chen 601e72c88a Add TestSignedTypes.py to test that variables with signed types display correctly.
llvm-svn: 119836
2010-11-19 20:35:15 +00:00
Sean Callanan 6abfabff61 Modifications to type handling logic. We no longer
perform recursive type lookups, because these are not
required for full type fidelity.  We also make the
SelectorTable last for the full lifetime of the Clang
compiler; this was the source of many bugs.

llvm-svn: 119835
2010-11-19 20:20:02 +00:00
Johnny Chen beae523a20 Fill in more test sequences for Python API SBFrame.LookupVarInScope(name, scope).
Change SBFrame::LookupVarInScope() to also work with "global" scope in addition
to "local" and "parameter" scope.

llvm-svn: 119811
2010-11-19 18:07:14 +00:00
Greg Clayton 35f1a0d58d Print out addresses with the correct width for 32 bit programs.
llvm-svn: 119786
2010-11-19 04:16:11 +00:00
Greg Clayton dbe5450898 Fixed an issue where the UserSettingsControllers were being created out of
order and this was causing the target, process and thread trees to not be
available.

llvm-svn: 119784
2010-11-19 03:46:01 +00:00
Sean Callanan f7c3e27f62 Added support for indicating to the expression parser
that the result of an expression should be coerced to
a specific type.  Also made breakpoint conditions pass
in the bool type for this type.

The expression parser ignores this indication for now.

llvm-svn: 119779
2010-11-19 02:52:21 +00:00
Greg Clayton 1b95a6ff95 Added some logging back and cleaned up the code to match LLDB's coding
conventions.

llvm-svn: 119771
2010-11-19 01:05:25 +00:00
Johnny Chen 835a88cb15 Add Python API tests for file and class static variables, too.
llvm-svn: 119758
2010-11-18 23:33:43 +00:00