Commit Graph

8533 Commits

Author SHA1 Message Date
Greg Clayton 34f1159bbd Fixed SBDebugger.CreateTarget("filename") and also make sure remote targets don't pickup bogus locally cached files.
<rdar://problem/16217254>
<rdar://problem/16078651>

llvm-svn: 202890
2014-03-04 21:20:23 +00:00
Todd Fiala 1251053e04 Get Linux i386 running.
This change uses a fixed known offset for the Linux i386 DR0 register.
This change also undoes the 32-bit wordsize change from r169645 that
revolved around being 32-bit/64-bit friendly in
WriteRegOperation::Execute within the Linux ProcessMonitor.cpp. I ran
all the tests on x86_64 Linux with no failures. I also ran some simple
tests with 32-bit Linux exe on x86_64 host and 32-bit linux exe on
i686 32-bit host and these worked fine.

Note (from Todd): the UserData struct in the Linux i386 register
context (only used by Linux i386 host running Linux 32-bit inferior)
is out of sync with what shows up in the sys/user.h for an 32-bit
Linux build (per an earlier change of mine to make it look more like
x86_64 host running x86 exe). I think we should (1) make i386 Linux
targets run using the same register context (and correct ones) on i386
and x86_64 linux hosts if that is possible, and (2) we could use some
tests around the register handling, particularly to verify things like
DR0 registers are in the right spots on host/target combos that we can
verify vs. known correct values.

Change by Matthew Gardiner.

llvm-svn: 202887
2014-03-04 20:46:32 +00:00
Todd Fiala c25fd190ef Modified some test annotations so that tests on Linux that should be skipped don't show up as XFAIL.
The following two tests showed up as XFAIL even though they should
always be skipped on Linux, due to the @unittest2.expectedFailure
annotation appearing above the @dsym_test annotation:

TestObjCNewSyntax.ObjCNewSyntaxTestCase.test_expr_with_dsym
TestBlocks.BlocksTestCase.test_expr_with_dsym.

For those two, I simply moved the @dsym_test annotation to the top so
that it would be marked for skip ahead of being marked for XFAIL.

TestObjCNewSyntax.ObjCNewSyntaxTestCase.test_expr_with_dwarf I marked
as @skipIfLinux since my understanding is that isn't a valid test to
run on Linux. So rather than categorize as a fail (i.e. something
wrong to be fixed), just skip it. (My recent changes to Linux tests
have been following that model: if it could never work, skip; if it's
broken, mark XFAIL so we can easily track, fix, notice the fix and
adjust accordingly).

TestDeadStrip.DeadStripTestCase.test_with_dwarf I had previously
marked as XFAIL but this would never work on Linux with the current
linker AFAICT.  Marked it as skip.

llvm-svn: 202788
2014-03-04 05:28:24 +00:00
Jim Ingham 8f63266569 Fix a couple of typo's in breakpoint descriptions.
llvm-svn: 202782
2014-03-04 03:09:00 +00:00
Jason Molenda 8d08a78c30 Temporarily revert part of Greg's changes in r202738 which are causing problems with the testsuite and SBDebugger::CreateTarget().
llvm-svn: 202776
2014-03-04 02:07:24 +00:00
Greg Clayton e556a4230c Stop messages from being emitted out of order when detaching.
llvm-svn: 202756
2014-03-03 20:29:02 +00:00
Jim Ingham 8225d59b3f Only require thread scope when we're about to run the function on a thread.
llvm-svn: 202740
2014-03-03 19:16:45 +00:00
Greg Clayton 6fea17e874 "size_t" isn't always 64 bit, it is 32 bit on 32 bit systems. All printf style statements that were assuming size_t were 64 bit were changed, and they were also changed to display them as unsigned values as "size_t" isn't signed.
If you print anything with 'size_t', please cast it to "uint64_t" in the printf and use PRIu64 or PRIx64.

llvm-svn: 202738
2014-03-03 19:15:20 +00:00
Deepak Panickal 6419e98ee1 Check if the terminal is interactive and set the flags accordingly
llvm-svn: 202726
2014-03-03 15:53:37 +00:00
Deepak Panickal d582f69469 Move Windows getopt for building the DLL
llvm-svn: 202725
2014-03-03 15:52:27 +00:00
Deepak Panickal 627f4ae811 Build liblldb.dll in Windows
llvm-svn: 202724
2014-03-03 15:50:36 +00:00
Deepak Panickal 99fbc07600 Fix Windows build using portable types for formatting the log outputs
llvm-svn: 202723
2014-03-03 15:39:47 +00:00
Ed Maste 6fa32b6f54 Don't require a valid thread if expr can be evaluated statically
This seems reasonable and the BackticksWithNoTargetTestCase suggests it
should be this way.

llvm-svn: 202722
2014-03-03 15:37:30 +00:00
Ed Maste aa954d1188 Update test class name and comment to match test
llvm-svn: 202718
2014-03-03 15:01:28 +00:00
Jim Ingham 36a02e0655 Make sure the exe_ctx passed to ClangUserExpression::Execute has a valid thread.
<rdar://problem/15949113>

llvm-svn: 202561
2014-03-01 00:17:06 +00:00
Sean Callanan 866e91c9d4 Better error reporting when a variable can't be
read during materialization.  First of all, report
if we can't read the data for some reason.  Second,
consult the ValueObject's error and report that if
there's some problem.

<rdar://problem/16074201>

llvm-svn: 202552
2014-02-28 22:27:53 +00:00
Ed Maste 111387c47b Simplify POSIXThread register context handling
This seems a little more straightforward and is equivalent to r201457
for ELF core files.  A case for FreeBSD i386 is also added (it was
incorrectly using the 64-bit register context and corrupting mememory).

Better (user-facing) error handling is still needed.

Review: http://llvm-reviews.chandlerc.com/D2765
llvm-svn: 202549
2014-02-28 22:15:58 +00:00
Todd Fiala 620ea83926 Fixed configure-based build on OS X.
This change adds a missing include path to the
ObjC LanguageRuntime path to the MacOSX SystemRuntime
plugin's Makefile.

It also adds the panel and curses library to the liblldb
shared library linkage step.

Changes by Jevin Sweval with a minor tweak.

llvm-svn: 202547
2014-02-28 21:55:46 +00:00
Greg Clayton 3121fde41a Be sure to propagate the error back out SBTarget::Attach() when we fail to launch debugserver as root.
<rdar://problem/15669788>

llvm-svn: 202536
2014-02-28 20:47:08 +00:00
Greg Clayton ec67ab1e0c Fixed "process launch --tty" on MacOSX.
llvm-svn: 202535
2014-02-28 20:25:41 +00:00
Greg Clayton b4874f1a70 Fixed all overlapping prompt issues.
I carefully reviewed exactly how the IOHandlers interact and found places where we weren't properly controlling things. There should be no overlapping prompts and all output should now come out in a controlled fashion.

<rdar://problem/16111293>

llvm-svn: 202525
2014-02-28 18:22:24 +00:00
Todd Fiala d6ed44f926 Converted TestDeadStrip.py to be expected failure on Linux.
llvm-svn: 202522
2014-02-28 18:16:50 +00:00
Todd Fiala bae1d15491 Adjust TestExprDoesntBlock.py to be expected failure on Linux.
I suspect I may have misrun the test previously for check-in
r202456 re: pr15258.  This test fails consistently on my end.
I changed the test to expected failure on Linux.

llvm-svn: 202517
2014-02-28 17:49:20 +00:00
Todd Fiala 163bc1da1b Enabled TestSetWatchlocation.py on Linux.
This worked 25 out of 25 times for me on Ubuntu 12.04 LTS x86_64 built
with gcc 4.8.2 and the July 2013 libedit.

llvm-svn: 202516
2014-02-28 17:28:44 +00:00
Todd Fiala 4112545855 Converted TestRegisterVariables to run on Linux and skip with clang.
TestRegisterVariables.test_with_dwarf_and_run_command was being
skipped on Linux due to issues with clang. I converted it to a
@expectedFailureClang and no longer skip on Linux.

llvm-svn: 202515
2014-02-28 17:19:20 +00:00
Todd Fiala 319758af88 Converted TestConstVariables expected failure to @expectedFailureClang.
TestConstVariables.py was disabled on Linux and marked as
unconditional expected failure. This change removes the Linux disable
and makes the expected failure conditional on using clang. The test
runs fine on gcc-built lldb.

llvm-svn: 202514
2014-02-28 17:13:42 +00:00
Ed Maste c71f60f4a1 Restore signal delivery to the inferior on FreeBSD
This was broken in the threaded inferior implementation for FreeBSD
(r196787) and caused FreeBSD to resume always with no signal.

llvm-svn: 202513
2014-02-28 17:13:39 +00:00
Todd Fiala 4c523d3f8d Enable TestExitDuringBreak.test_with_dwarf on Linux.
This test passed 50 out of 50 times for me on Unbuntu 12.04 LTS x86_64
with lldb built using gcc 4.8.2 and July 2013 libedit.

This is related to:
http://llvm.org/bugs/show_bug.cgi?id=16170

llvm-svn: 202512
2014-02-28 17:04:04 +00:00
Todd Fiala 9ce4a73c89 Adjust TestConcurrentEvents.py test running for Linux.
Related to this bug:
http://llvm.org/bugs/show_bug.cgi?id=16714

On TOT lldb svn r202507, I found several of the tests disabled within
TestConcurrentEvents.py to run fine, and several of them to fail 100%
of the time on my system (25 out of 25 times).

This changes the following tests for Linux:

Enables (these all work consistently):
* test_many_watchpoints_dwarf
* test_signal_watch_break_dwarf (line 250)
* test_signal_watch_break_dwarf (line 260 - same named test?)
* test_crash_with_watchpoint_dwarf
* test_crash_with_watchpoint_breakpoint_signal_dwarf
* test_delayed_crash_with_breakpoint_watchpoint_dwarf

Marks as expected failure (these all fail consistently):
* test_many_watchpoints_dwarf
* test_watch_break_dwarf
* test_delay_watch_break_dwarf
* test_watch_break_dwarf_delay
* test_signal_watch_dwarf
* test_delay_signal_watch_dwarf
* test_signal_delay_watch_dwarf
* test_two_breakpoints_one_watchpoint_dwarf
* test_breakpoints_delayed_breakpoint_one_watchpoint_dwarf
* test_two_watchpoint_threads_dwarf
* test_watchpoint_with_delay_watchpoint_threads_dwarf
* test_two_watchpoints_one_breakpoint_dwarf
* test_two_watchpoints_one_delay_breakpoint_dwarf
* test_watchpoint_delay_watchpoint_one_breakpoint_dwarf
* test_two_watchpoints_one_signal_dwarf
* test_signal_watch_break_dwarf

llvm-svn: 202511
2014-02-28 16:50:05 +00:00
Todd Fiala 722311edc8 Enabled TestBreakAfterJoin.py on Linux.
This is related to:
http://llvm.org/bugs/show_bug.cgi?id=16170

This test ran successfully 40 out of 40 times on Ubuntu 12.04 LTS
x86_64.

llvm-svn: 202508
2014-02-28 15:54:36 +00:00
Todd Fiala f9dc4b7373 Change TestStopHookMechanism to @expectedFailureLinux.
Similar to my previous check-in related to:
http://llvm.org/bugs/show_bug.cgi?id=15037

10 out of 10 runs of this failed.  Mark it XFAIL.

llvm-svn: 202507
2014-02-28 15:47:48 +00:00
Todd Fiala 71c53fb25b Marked linux TestStopHookMultipleThreads as expected failure.
Related to this bug:
http://llvm.org/bugs/show_bug.cgi?id=15037

Previously this was marked as skipped. I tried running it 10 times in
a row and it failed every time. Switched it to XFAIL.

llvm-svn: 202506
2014-02-28 15:26:10 +00:00
Ed Maste 2c2f83ef07 Fix types to eliminate compiler warnings in FreeBSD host class
llvm-svn: 202498
2014-02-28 13:46:51 +00:00
Jim Ingham 286fb1ef32 Plumb the EvaluateExpressionOptions::{Set,Get}StopOthers through the SB API, and make it work in RunThreadPlan.
Also remove SetStopOthers from the ThreadPlanCallFunction, because if the value you have doesn't match what is
in the EvaluateExpressionOptions the plan was passed when created it won't work correctly.

llvm-svn: 202464
2014-02-28 02:52:06 +00:00
Todd Fiala 550b1a298a Re-enable TestExprDoesntBlock.py on Linux.
This is related to:
http://llvm.org/bugs/show_bug.cgi?id=15258

I ran this test 10 times successfully against Ubuntu 12.04 LTS x86_64
with lldb built with gcc 4.8.2 and July 2013 libedit.

llvm-svn: 202456
2014-02-28 00:46:57 +00:00
Todd Fiala 7ffb2b0b53 Enable TestCallThatRestarts test on Linux.
This is related to:
http://llvm.org/bugs/show_bug.cgi?id=15278

I ran this 20 times in a row without failure at svn r202440 on Ubuntu
12.04 LTS x86_64 using July 2013 libedit and gcc 4.8.2.

llvm-svn: 202448
2014-02-28 00:20:10 +00:00
Greg Clayton 52c3a07ece Revert Xcode run argument settings that were accidentally checked in.
llvm-svn: 202447
2014-02-28 00:13:03 +00:00
Todd Fiala 347284f82d Re-enable TestMultithreaded.py test on Linux.
I could not get http://llvm.org/bugs/show_bug.cgi?id=16016)
to fail on my end running 10 times in a row.  Re-enabling
the test.

llvm-svn: 202446
2014-02-28 00:13:00 +00:00
Sylvestre Ledru 451ca2924c remove useless declarations found thanks to scan-build
llvm-svn: 202440
2014-02-27 22:46:23 +00:00
Greg Clayton 46822c7c72 Fixed the lldb_perf_clang.cpp test case to be able to run correctly.
1 - There were some outdated options being passed to clang
2 - There were some bad paths being passed as options
3 - The path to the main.cpp file ("/tmp/main.cpp") was wrong when the tests were being run, now we create a temp file
4 - Added a new ActionType::eNone to do nothing (no continue, step, or kill)

llvm-svn: 202431
2014-02-27 21:35:49 +00:00
Todd Fiala 4507f06aaa Fix linux x86 debugging on a linux x86 host (32-bit on 32-bit).
This change fixes up issues with specifying the size of the i386
register infos for FPU registers.  The bug was that for the i386
register context, the size of the FPU registers were still being
computed based on the x86_64 FXSAVE structure.

This change permits the FPR_SIZE macro to optionally be defined
outside of RegisterInfos_i386.h, which RegisterContextLinux_i386.cpp
does properly. It redefines the FPR_i386 structure with all the
accessible parts that RegisterInfos_i386.h wants to see, which we had
not done before when we made the overall size of the structure
properly sized a recently.

This change also modifies POSIXThread to create a
RegisterContextLinux_i386 only when the host is 32-bit; otherwise, it
uses the RegisterContextLinux_x86_64, which works properly for 32-bit
and 64-bit inferiors on a 64-bit host.

I tested this debugging a Linux x86 exe on an x86 host (Ubuntu 13.10
x86), and debugging a Linux x86 exe and a Linux x86-64 exe on an
x86-64 host (Ubuntu 12.04 LTS).  Those cases all worked.

Thanks to Matthew Gardiner who discoverd may key insights into
tracking down the issue. The motivation for this change and some of
the code originates from him via this thread:

http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20140224/010554.html

llvm-svn: 202428
2014-02-27 20:46:12 +00:00
Jim Ingham d6efa2a977 Check call to fgetc for EINTR.
<rdar://problem/16140277>

llvm-svn: 202426
2014-02-27 19:48:13 +00:00
Greg Clayton 1681092f96 Remove an assertion that was being hit due to slow DNS name lookups on MacOSX for "localhost".
Changed all "localhost" to "127.0.0.1" to prevent potentially long name lookups.

<rdar://problem/16154630>

llvm-svn: 202424
2014-02-27 19:38:18 +00:00
Greg Clayton fdbad6d5d8 Improve logging a bit by printing the exception or signal type description.
llvm-svn: 202423
2014-02-27 19:35:12 +00:00
Todd Fiala 955fe6f6ed Fix build break due to signature change on ASTContext' setExternalSource parameter.
This change converts points to clang::ExternalASTSource from llvm::OwningPtr<> to
llvm::IntrusiveRefCntPtr<>.

llvm-svn: 202411
2014-02-27 17:18:23 +00:00
Sylvestre Ledru 7ba631f651 update the declaration from llvm::OwningPtr to llvm::IntrusiveRefCntPtr to match the clang update (r202346) on ASTContext
llvm-svn: 202376
2014-02-27 10:46:57 +00:00
Greg Clayton 19e1135108 A better long term fix for stopping the process when it is running by writing to the pipe that was used for cancel.
We now write a 'q' to indicate to exit the IOHandlerProcessSTDIO::Run(), and a 'i' to interrupt the process. This should make this code safer to use in a signal handler function.

llvm-svn: 202311
2014-02-26 22:47:33 +00:00
Ed Maste 1b019d8ae2 Remove link_system_libs, unused after LLVM r201969
llvm-svn: 202309
2014-02-26 22:39:31 +00:00
Jason Molenda d84f606deb Small fix for i386 extended backtraces; wasn't skipping a
4-byte reserved area when reading the libBacktraceRecording API results.
Also, add a little logging about queues being created.
<rdar://problem/16127752> 

llvm-svn: 202306
2014-02-26 22:27:09 +00:00
Todd Fiala 994f63dc00 Fix x86 32-bit register context definition to build properly on 32 and 64-bit hosts.
This fix changes thee x86 32-bit floating point register area to be
the proper size independent of the host platform.

Note as of this change list, this register context is not yet used
since selecting it exposes issues with watchpoint assertions.

Change by Matthew Gardiner.

llvm-svn: 202285
2014-02-26 18:51:03 +00:00