Commit Graph

1897 Commits

Author SHA1 Message Date
Sean Callanan 0b342b6ddf Fixed signed operations in the IR interpreter.
Scalar now can make itself signed if needed.

<rdar://problem/13977632>

llvm-svn: 182668
2013-05-24 20:36:56 +00:00
Sean Callanan fbf5c682cb Fixed a bug where persistent variables did not
live as long as they needed to.  This led to
equality tests involving persistent variables
often failing or succeeding when they had no
business doing so.

To do this, I introduced the ability for a
memory allocation to "leak" - that is, to
persist in the process beyond the lifetime of
the expression.  Hand-declared persistent
variables do this now.

<rdar://problem/13956311>

llvm-svn: 182528
2013-05-22 22:49:06 +00:00
Greg Clayton 23386cb1df <rdar://problem/13455021>
Add test case to make sure we don't regress on fat files full of skinny BSD archives.

llvm-svn: 182440
2013-05-21 23:58:54 +00:00
Greg Clayton fc2f7a53f7 Quiet the new exec test case down so it doesn't spew debug prints.
llvm-svn: 182429
2013-05-21 22:00:39 +00:00
Greg Clayton 8cda7f0830 Added a test case that verifies that LLDB can debug across a process exec'ing itself into a new program. This currently is only enabled for Darwin since we exec from 64 bit to 32 bit and vice versa for 'x86_64' targets.
This can easily be adapted for linux and other platforms, but I didn't want to break any buildbots by assuming it will work.

llvm-svn: 182428
2013-05-21 21:55:59 +00:00
Ashok Thirumurthi 7129bd8e25 Avoided the use of two test decorators with xfail/xpass logic in the same test.
- Used xfail and skip, temporarily, while resolving bugzilla #15671.

llvm-svn: 182159
2013-05-17 21:00:56 +00:00
Ashok Thirumurthi c97a6083e2 Fix xpasses on the gcc buildbots using compiler versions to qualify the xfail.
- Note that this is not correct, as the failure is associated with build options of libc.so, however it's failing on a Debian buildbot that uses gcc 4.6.2 (and the real goal is a complete backtrace even with -fomit-frame-pointer).

- Adds helpers to lldbtest.py to check the expectedCompiler and expectedVersion, with an eventual goal of reducing the number of test decorators.
--- Currently allows a comparison operator and a compiler version to be specified.
--- Can be extended to support ranges of compiler versions.

llvm-svn: 182155
2013-05-17 20:15:07 +00:00
Ashok Thirumurthi 26c0a19f62 Modifies the log directory to ensure that the log file will be found on tear-down (i.e. for CI agents that clean up artifacts aggressively).
- Uses the cwd following the model of TestPublicAPIHeaders.py

llvm-svn: 182116
2013-05-17 15:44:58 +00:00
Ashok Thirumurthi b4e5134ff8 Adds a test case for bugzilla #15671 patterned after TestInferiorCrashing.py.
- On Linux, the partial back-trace after an assert can cause the basic test to fail as discussed on lldb-dev.
- Uses SBFrame to walk up the stack to the assert site and tests expression evaluation of locals, globals and arguments.

Thanks to Daniel for review and testing on OS/X.

llvm-svn: 182115
2013-05-17 15:35:15 +00:00
Ashok Thirumurthi 51e9c19334 Uses a helper to consistently verify the stop reason in all tests.
- Also removes a redundant import statement.

llvm-svn: 182111
2013-05-17 15:22:33 +00:00
Ashok Thirumurthi 14238b6c78 Updated TestAbbreviations to reflect the changed output in r182068.
llvm-svn: 182104
2013-05-17 15:03:59 +00:00
Jim Ingham 641a67ce26 Handle the case where there is a user breakpoint set at the location of one of our
function call exception catching breakpoints.  We need to force ourselves to stop in
that case.

<rdar://problem/13903801>

llvm-svn: 182056
2013-05-16 21:52:36 +00:00
Daniel Malea 3be69dac8d Fix Linux 'platform status' command. Its output is now closer to that on Mac OS X
- resolves llvm.org/pr14806

Patch by Matthew Sorrels!

llvm-svn: 182030
2013-05-16 17:52:04 +00:00
Ashok Thirumurthi 863bd4a534 Fixed an xpass due to r181841 on Linux with gcc. Note that the clang variant contains to xfail, and r181841 is a fix for the test.
llvm-svn: 181918
2013-05-15 20:26:30 +00:00
Daniel Malea e8bdd1f5c0 Clean up linux test decorators and add links to known bugs
- s/skipOnLinux/skipIfLinux/ to match style of every other decorator
- linkify bugizilla/PR numbers in comments

No intended change in functionality.

llvm-svn: 181913
2013-05-15 18:48:32 +00:00
Daniel Malea 243b379aa1 Re-enable tests disabled due to llvm.org/pr14541
- "platform process list" command works on Linux now
- "process attach -n" (attach to process by name also works on Linux now)

llvm-svn: 181905
2013-05-15 17:55:12 +00:00
Daniel Malea 5cb6ea08f1 Revert r181833: lldb prompt issue still occurs on buildbot (http://lab.llvm.org:8011/builders/lldb-x86_64-linux/builds/4124)
- maybe consider checking in the 'good' version of libedit to avoid ancient system version

llvm-svn: 181903
2013-05-15 17:50:37 +00:00
Daniel Malea 0a693d9d66 Disable test case that causes assertion failure on Linux
- filed llvm.org/pr16016
- fixed URL for llvm.org/pr16000

llvm-svn: 181902
2013-05-15 17:46:16 +00:00
Jim Ingham c0dfddb302 Didn't mean to check in this change...
llvm-svn: 181858
2013-05-15 01:12:43 +00:00
Jim Ingham bd4a5eccd6 Need to add the LLDB.framework directory to the rpath for the driver programs or they won't run.
llvm-svn: 181857
2013-05-15 01:11:30 +00:00
Greg Clayton 609a433159 Unbreak the linux buildbot tests. This still fails for the clang that is being used on linux.
llvm-svn: 181845
2013-05-14 23:21:47 +00:00
Greg Clayton bc8d23956c Fixed the test case to pass on Darwin. This might pass on linux as well. The test case now properly validates g_points as a global for the class A version, and the static variable for the file static.
llvm-svn: 181840
2013-05-14 22:17:29 +00:00
Daniel Malea 9d38385861 Remove XFAIL from tests affected by llvm.org/pr-14637
- unable to repro locally, much like many people commenting on the issue

llvm-svn: 181833
2013-05-14 21:19:22 +00:00
Daniel Malea 9fbc230de2 Fix GCC buildbot failures in API/Multithreaded tests
- fix typo initializing unique_ptr
- add missing throw specifier to play nice with older libstdc++ exception class

llvm-svn: 181831
2013-05-14 21:00:47 +00:00
Daniel Malea 4835990a6f Skip C++ API/Multithreaded tests that are unsupported with Clang/libstdc++
- older versions of clang are unable to include <chrono> from libstdc++
- skipping tests until buildbots are updated

llvm-svn: 181829
2013-05-14 20:48:54 +00:00
Daniel Malea b2132553d9 Adding C++ tests that drive LLDB from multiple threads
- test_breakpoint_callback -- filed llvm.org/pr-16000
- test_listener_resume -- resume a process from a thread waiting on SBListener
- test_listener_event_description -- SBEvent description from SBListener thread
- test_listener_event_process -- query process/thread/stack info from SBListener thread

llvm-svn: 181819
2013-05-14 19:13:25 +00:00
Ashok Thirumurthi b5209bd875 Avoid $rax for 32-bit inferiors to fix a failing i386 test on the darwin buildbots.
llvm-svn: 181789
2013-05-14 13:34:25 +00:00
Andrew Kaylor d4dc579304 Adding new test cases for inferior crashing.
llvm-svn: 181742
2013-05-13 23:47:25 +00:00
Matt Kopec 201284a8d3 Add expression tests for a function in an anonymous namespace.
llvm-svn: 181741
2013-05-13 22:00:32 +00:00
Ashok Thirumurthi cdb5b61a2d Prevent convenience registers from being included in "read register" as they are derived registers.
- Also refactors TestRegisters.py because test_convenience_registers_with_process_attach now fails with an assert.

TODO: Cross-reference the skipOnLinux decorator with a bugzilla report after root-causing this issue.
llvm-svn: 181737
2013-05-13 21:45:50 +00:00
Daniel Malea b218b7f22a Unset CFLAGS/CXXFLAGS when running tests via cmake/make check targets
- should fix automatic tests set up on http://llvm-jenkins.debian.net
- needed in order to make Debian package builds depend on passing test suite

llvm-svn: 181736
2013-05-13 21:41:35 +00:00
Daniel Malea 09ec3a51c6 Cleanup test output when run via cmake/make check targets
llvm-svn: 181735
2013-05-13 21:37:02 +00:00
Ashok Thirumurthi 1999b6d68c Fixed expression evaluation with convenience registers.
- Also improved test coverage for passing tests to include expr/x
and a sanity check for $eax as the lower half of $rax.

llvm-svn: 181727
2013-05-13 19:56:46 +00:00
Matt Kopec d608996610 Add temporary fix for calling c++ global/anonymous functions on Linux.
llvm-svn: 181613
2013-05-10 17:53:48 +00:00
Andrew Kaylor 29d65744c9 Adding support for setting thread stop state when a process stops.
This re-submission of this patch fixes a problem where the code sometimes caused a deadlock.  The Process::SetPrivateState method was locking the Process::m_private_state variable and then later calling ThreadList::DidStop, which locks the ThreadList mutex.  Other methods in ThreadList which were being called from other threads lock the ThreadList mutex and then call Process::GetPrivateState which locks the Process::m_private_state mutex.  To avoid deadlocks, Process::SetPrivateState now locks the ThreadList mutex before locking the Process::m_private_state mutex.

llvm-svn: 181609
2013-05-10 17:19:04 +00:00
Ashok Thirumurthi 1fef0071ac Removed expectedFailureDarwin, and added a note about the disparity between the automated tests and testing at the lldb command-line.
llvm-svn: 181602
2013-05-10 16:10:23 +00:00
Ashok Thirumurthi f19caa1227 Added an integration test to step through a crash and then test for globals, locals, arguments, registers and the back-trace.
llvm-svn: 181599
2013-05-10 14:37:49 +00:00
Ashok Thirumurthi acbb1a5db5 Fixed "log enable linux registers" and added a test.
- Eliminated the use of static for methods that read m_register_infos, so that these routines can be implemented in the base class.
- Eliminated m_register_infos in the base class because this is not used when derived classes call UpdateRegisterInfo.
- Also moved the namespace using declarations from headers to source files.

Thanks to Daniel and Samuel for their review feedback.

llvm-svn: 181538
2013-05-09 19:59:47 +00:00
Daniel Malea e347243061 Revert r181482 as it causes occasional hangs in LLDB buildbots
llvm-svn: 181526
2013-05-09 17:34:40 +00:00
Ashok Thirumurthi 582133e88e Skipping a test that asserts with gcc and icc to allow the test suite to run to completion on the gcc buildbot.
llvm-svn: 181512
2013-05-09 14:46:01 +00:00
Enrico Granata da144dc216 Changing the std::map test case to use source breakpoints instead of relying on the nexting always "getting it right" to stop at the locations of interest
This should make us more robust in the face of changing compiler line tables and other library modifications

llvm-svn: 181497
2013-05-09 01:04:59 +00:00
Greg Clayton 65c163529d Fixed the process attach by name test to get the target _after_ doing process attach. Otherwise the target isn't valid. This fixes 2 test suite failures on darwin.
llvm-svn: 181488
2013-05-08 23:45:06 +00:00
Greg Clayton dbe445fdd8 Remove debug print statement.
llvm-svn: 181486
2013-05-08 23:37:59 +00:00
Andrew Kaylor 14263f31ae Adding code to set thread state to stopped when the process stops.
llvm-svn: 181482
2013-05-08 23:15:46 +00:00
Enrico Granata b7d6e2a4e0 Test case added for importing packages
llvm-svn: 181472
2013-05-08 21:26:37 +00:00
Matt Kopec 4fadea28d1 Mark multi-threaded watchpoint test as skip on Linux due to lldb assertions in the debian buildbot.
llvm-svn: 181454
2013-05-08 17:52:17 +00:00
Matt Kopec 52c8476a47 Fix assertion from previous fix for debian os watchpoints.
Also mark one of the tests as expected fail on Linux due to the debian fix.

llvm-svn: 181448
2013-05-08 16:52:34 +00:00
Daniel Malea ee6481273e Adding test-case for llvm.org/pr15936 (known failure with GCC 4.6/4.7)
- verify that backtraces for stacks that include functions which contain 
  illegal instructions are correct, and that variables in said functions can be
  printed.

llvm-svn: 181442
2013-05-08 15:09:30 +00:00
Daniel Malea 32052b62ae Fix rdar-13338477 test-case for Linux.
- Using __builtin_trap confuses the stack unwinder
- __builtin_trap specific test will be added shortly

llvm-svn: 181441
2013-05-08 15:07:24 +00:00
Jim Ingham 221d51cf84 Figure out the reply to "PlanExplainsStop" once when we stop and then use the cached
value.  This fixes problems, for instance, with the StepRange plans, where they know that
they explained the stop because they were at their "run to here" breakpoint, then deleted
that breakpoint, so when they got asked again, doh!  I had done this for a couple of plans
in an ad hoc fashion, this just formalizes it.

Also add a "ResumeRequested" in Process so that the code in the completion handlers can
tell the ShouldStop logic they want to resume rather than just directly resuming.  That allows 
us to handle resuming in a more controlled fashion.

Also, SetPublicState can take a "restarted" flag, so that it doesn't drop the run lock when
the target was immediately restarted.
--This line, and those below , will be ignored--

M    test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
M    include/lldb/Target/ThreadList.h
M    include/lldb/Target/ThreadPlanStepOut.h
M    include/lldb/Target/Thread.h
M    include/lldb/Target/ThreadPlanBase.h
M    include/lldb/Target/ThreadPlanStepThrough.h
M    include/lldb/Target/ThreadPlanStepInstruction.h
M    include/lldb/Target/ThreadPlanStepInRange.h
M    include/lldb/Target/ThreadPlanStepOverBreakpoint.h
M    include/lldb/Target/ThreadPlanStepUntil.h
M    include/lldb/Target/StopInfo.h
M    include/lldb/Target/Process.h
M    include/lldb/Target/ThreadPlanRunToAddress.h
M    include/lldb/Target/ThreadPlan.h
M    include/lldb/Target/ThreadPlanCallFunction.h
M    include/lldb/Target/ThreadPlanStepOverRange.h
M    source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.h
M    source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp
M    source/Target/StopInfo.cpp
M    source/Target/Process.cpp
M    source/Target/ThreadPlanRunToAddress.cpp
M    source/Target/ThreadPlan.cpp
M    source/Target/ThreadPlanCallFunction.cpp
M    source/Target/ThreadPlanStepOverRange.cpp
M    source/Target/ThreadList.cpp
M    source/Target/ThreadPlanStepOut.cpp
M    source/Target/Thread.cpp
M    source/Target/ThreadPlanBase.cpp
M    source/Target/ThreadPlanStepThrough.cpp
M    source/Target/ThreadPlanStepInstruction.cpp
M    source/Target/ThreadPlanStepInRange.cpp
M    source/Target/ThreadPlanStepOverBreakpoint.cpp
M    source/Target/ThreadPlanStepUntil.cpp
M    lldb.xcodeproj/xcshareddata/xcschemes/Run Testsuite.xcscheme

llvm-svn: 181381
2013-05-08 00:35:16 +00:00