Commit Graph

11473 Commits

Author SHA1 Message Date
Siva Chandra e8208ce065 [TestLldbGdbServer] Up sleep duration to 1min in the inferior thread_func.
Summary:
The current sleep duration is not sufficient for Android.

[[ Its a completely different investigation as to why Android needs longer
   sleep durations for this test. ]]

Test Plan: dotest.py -p TestLldbGdbServer on Android and local linux.

Reviewers: chaoren

Reviewed By: chaoren

Subscribers: tberghammer, lldb-commits

Differential Revision: http://reviews.llvm.org/D9926

llvm-svn: 237981
2015-05-22 00:52:41 +00:00
Chaoren Lin 9afad0e954 Fix lldb-platform usage string.
llvm-svn: 237966
2015-05-21 22:43:43 +00:00
Greg Clayton e034a04e4f Added a new command in ProcessGDBRemote that can figure out the performance characterisitics of your GDB remote server.
To addess this, attach to any GDB server and when stopped type:

(lldb) process plugin packet speed-test

The default will send a variety of packets with different amounts of data to send/receive and print the performance of each packet type:

Testing sending 1000 packets of various sizes:
qSpeedTest(send=0      , recv=0      ) in 0.057837000 sec for  17289.97 packets/sec (  0.057837 ms per packet) with standard deviation of   0.007705 ms
qSpeedTest(send=0      , recv=4      ) in 0.056162000 sec for  17805.63 packets/sec (  0.056162 ms per packet) with standard deviation of   0.004439 ms
qSpeedTest(send=0      , recv=8      ) in 0.057687000 sec for  17334.93 packets/sec (  0.057687 ms per packet) with standard deviation of   0.008135 ms
qSpeedTest(send=0      , recv=16     ) in 0.058547000 sec for  17080.29 packets/sec (  0.058547 ms per packet) with standard deviation of   0.005884 ms
qSpeedTest(send=0      , recv=32     ) in 0.058289000 sec for  17155.89 packets/sec (  0.058289 ms per packet) with standard deviation of   0.004057 ms
qSpeedTest(send=0      , recv=64     ) in 0.061324000 sec for  16306.83 packets/sec (  0.061324 ms per packet) with standard deviation of   0.010838 ms
qSpeedTest(send=0      , recv=128    ) in 0.065688000 sec for  15223.48 packets/sec (  0.065688 ms per packet) with standard deviation of   0.006997 ms
qSpeedTest(send=0      , recv=256    ) in 0.070621000 sec for  14160.09 packets/sec (  0.070621 ms per packet) with standard deviation of   0.006188 ms
qSpeedTest(send=0      , recv=512    ) in 0.086738000 sec for  11528.97 packets/sec (  0.086738 ms per packet) with standard deviation of   0.007867 ms
qSpeedTest(send=0      , recv=1024   ) in 0.146375000 sec for   6831.77 packets/sec (  0.146375 ms per packet) with standard deviation of   0.010313 ms
qSpeedTest(send=4      , recv=0      ) in 0.057807000 sec for  17298.94 packets/sec (  0.057807 ms per packet) with standard deviation of   0.009702 ms
....

It will then also use various sizes to receive 4MB of data from the GDB server and print out the stats:

Testing receiving 4.0MB of data using varying receive packet sizes:
qSpeedTest(send=0      , recv=32     ) 131072 packets needed to receive 4.0MB in 7.721290000 sec for 0.518048 MB/sec for  16975.40 packets/sec (  0.058909 ms per packet)
qSpeedTest(send=0      , recv=64     )  65536 packets needed to receive 4.0MB in 4.029236000 sec for 0.992744 MB/sec for  16265.12 packets/sec (  0.061481 ms per packet)
qSpeedTest(send=0      , recv=128    )  32768 packets needed to receive 4.0MB in 2.233854000 sec for 1.790627 MB/sec for  14668.82 packets/sec (  0.068172 ms per packet)
qSpeedTest(send=0      , recv=256    )  16384 packets needed to receive 4.0MB in 1.160024000 sec for 3.448204 MB/sec for  14123.84 packets/sec (  0.070802 ms per packet)
qSpeedTest(send=0      , recv=512    )   8192 packets needed to receive 4.0MB in 0.701603000 sec for 5.701230 MB/sec for  11676.12 packets/sec (  0.085645 ms per packet)
qSpeedTest(send=0      , recv=1024   )   4096 packets needed to receive 4.0MB in 0.596786000 sec for 6.702570 MB/sec for   6863.43 packets/sec (  0.145700 ms per packet)

There is a JSON mode so we can use this in the test suite to track GDB server performance for each platform:

(lldb) process plugin packet speed-test --json
{ "packet_speeds" : {
    "num_packets" : 1000,
    "results" : [
     {"send_size" :      0, "recv_size" :      0, "total_time_nsec" :     64516000, "standard_deviation_nsec" :     20566 },
     {"send_size" :      0, "recv_size" :      4, "total_time_nsec" :     59648000, "standard_deviation_nsec" :     10493 },
     {"send_size" :      0, "recv_size" :      8, "total_time_nsec" :     56894000, "standard_deviation_nsec" :      5480 },
     {"send_size" :      0, "recv_size" :     16, "total_time_nsec" :     59422000, "standard_deviation_nsec" :      6557 },
     {"send_size" :      0, "recv_size" :     32, "total_time_nsec" :     61159000, "standard_deviation_nsec" :     12384 },
     {"send_size" :      0, "recv_size" :     64, "total_time_nsec" :     61386000, "standard_deviation_nsec" :      9208 },
     {"send_size" :      0, "recv_size" :    128, "total_time_nsec" :     64768000, "standard_deviation_nsec" :      4737 },
     {"send_size" :      0, "recv_size" :    256, "total_time_nsec" :     71046000, "standard_deviation_nsec" :      5904 },
     {"send_size" :      0, "recv_size" :    512, "total_time_nsec" :     87233000, "standard_deviation_nsec" :      8967 },
     {"send_size" :      0, "recv_size" :   1024, "total_time_nsec" :    146629000, "standard_deviation_nsec" :      9526 },
     {"send_size" :      4, "recv_size" :      0, "total_time_nsec" :     57131000, "standard_deviation_nsec" :      7884 },
     {"send_size" :      4, "recv_size" :      4, "total_time_nsec" :     56772000, "standard_deviation_nsec" :      6064 },
     {"send_size" :      4, "recv_size" :      8, "total_time_nsec" :     57450000, "standard_deviation_nsec" :      6341 },
     {"send_size" :      4, "recv_size" :     16, "total_time_nsec" :     58279000, "standard_deviation_nsec" :      5998 },
     {"send_size" :      4, "recv_size" :     32, "total_time_nsec" :     59995000, "standard_deviation_nsec" :      6294 },
     {"send_size" :      4, "recv_size" :     64, "total_time_nsec" :     61632000, "standard_deviation_nsec" :      7838 },
     {"send_size" :      4, "recv_size" :    128, "total_time_nsec" :     66535000, "standard_deviation_nsec" :      8026 },
     {"send_size" :      4, "recv_size" :    256, "total_time_nsec" :     72754000, "standard_deviation_nsec" :      9519 },
     {"send_size" :      4, "recv_size" :    512, "total_time_nsec" :     87072000, "standard_deviation_nsec" :      9268 },
     {"send_size" :      4, "recv_size" :   1024, "total_time_nsec" :    147221000, "standard_deviation_nsec" :      9702 },
     {"send_size" :      8, "recv_size" :      0, "total_time_nsec" :     57900000, "standard_deviation_nsec" :      7356 },
     {"send_size" :      8, "recv_size" :      4, "total_time_nsec" :     58116000, "standard_deviation_nsec" :      7630 },
     {"send_size" :      8, "recv_size" :      8, "total_time_nsec" :     57745000, "standard_deviation_nsec" :      8541 },
     {"send_size" :      8, "recv_size" :     16, "total_time_nsec" :     59091000, "standard_deviation_nsec" :      7851 },
     {"send_size" :      8, "recv_size" :     32, "total_time_nsec" :     59943000, "standard_deviation_nsec" :      6761 },
     {"send_size" :      8, "recv_size" :     64, "total_time_nsec" :     62097000, "standard_deviation_nsec" :      8580 },
     {"send_size" :      8, "recv_size" :    128, "total_time_nsec" :     69942000, "standard_deviation_nsec" :     16645 },
     {"send_size" :      8, "recv_size" :    256, "total_time_nsec" :     72927000, "standard_deviation_nsec" :     11031 },
     {"send_size" :      8, "recv_size" :    512, "total_time_nsec" :     87221000, "standard_deviation_nsec" :      8002 },
     {"send_size" :      8, "recv_size" :   1024, "total_time_nsec" :    148696000, "standard_deviation_nsec" :     10383 },
     {"send_size" :     16, "recv_size" :      0, "total_time_nsec" :     59890000, "standard_deviation_nsec" :     15160 },
     {"send_size" :     16, "recv_size" :      4, "total_time_nsec" :     56664000, "standard_deviation_nsec" :      4650 },
     {"send_size" :     16, "recv_size" :      8, "total_time_nsec" :     57574000, "standard_deviation_nsec" :      7787 },
     {"send_size" :     16, "recv_size" :     16, "total_time_nsec" :     59312000, "standard_deviation_nsec" :      8104 },
     {"send_size" :     16, "recv_size" :     32, "total_time_nsec" :     59764000, "standard_deviation_nsec" :      7496 },
     {"send_size" :     16, "recv_size" :     64, "total_time_nsec" :     61644000, "standard_deviation_nsec" :      8331 },
     {"send_size" :     16, "recv_size" :    128, "total_time_nsec" :     66476000, "standard_deviation_nsec" :      9251 },
     {"send_size" :     16, "recv_size" :    256, "total_time_nsec" :     72386000, "standard_deviation_nsec" :      8627 },
     {"send_size" :     16, "recv_size" :    512, "total_time_nsec" :     87810000, "standard_deviation_nsec" :     12318 },
     {"send_size" :     16, "recv_size" :   1024, "total_time_nsec" :    146918000, "standard_deviation_nsec" :     11595 },
     {"send_size" :     32, "recv_size" :      0, "total_time_nsec" :     56493000, "standard_deviation_nsec" :      6577 },
     {"send_size" :     32, "recv_size" :      4, "total_time_nsec" :     57069000, "standard_deviation_nsec" :      5931 },
     {"send_size" :     32, "recv_size" :      8, "total_time_nsec" :     57563000, "standard_deviation_nsec" :      8157 },
     {"send_size" :     32, "recv_size" :     16, "total_time_nsec" :     59694000, "standard_deviation_nsec" :      6932 },
     {"send_size" :     32, "recv_size" :     32, "total_time_nsec" :     60852000, "standard_deviation_nsec" :      8010 },
     {"send_size" :     32, "recv_size" :     64, "total_time_nsec" :     61926000, "standard_deviation_nsec" :      8372 },
     {"send_size" :     32, "recv_size" :    128, "total_time_nsec" :     66734000, "standard_deviation_nsec" :      8047 },
     {"send_size" :     32, "recv_size" :    256, "total_time_nsec" :     72000000, "standard_deviation_nsec" :      8103 },
     {"send_size" :     32, "recv_size" :    512, "total_time_nsec" :     88268000, "standard_deviation_nsec" :     12289 },
     {"send_size" :     32, "recv_size" :   1024, "total_time_nsec" :    147946000, "standard_deviation_nsec" :     12122 },
     {"send_size" :     64, "recv_size" :      0, "total_time_nsec" :     58126000, "standard_deviation_nsec" :      5895 },
     {"send_size" :     64, "recv_size" :      4, "total_time_nsec" :     58927000, "standard_deviation_nsec" :      8933 },
     {"send_size" :     64, "recv_size" :      8, "total_time_nsec" :     58163000, "standard_deviation_nsec" :      6663 },
     {"send_size" :     64, "recv_size" :     16, "total_time_nsec" :     59901000, "standard_deviation_nsec" :      8340 },
     {"send_size" :     64, "recv_size" :     32, "total_time_nsec" :     60365000, "standard_deviation_nsec" :      6319 },
     {"send_size" :     64, "recv_size" :     64, "total_time_nsec" :     61776000, "standard_deviation_nsec" :      7461 },
     {"send_size" :     64, "recv_size" :    128, "total_time_nsec" :     66984000, "standard_deviation_nsec" :      6810 },
     {"send_size" :     64, "recv_size" :    256, "total_time_nsec" :     73913000, "standard_deviation_nsec" :      8826 },
     {"send_size" :     64, "recv_size" :    512, "total_time_nsec" :     88134000, "standard_deviation_nsec" :      8356 },
     {"send_size" :     64, "recv_size" :   1024, "total_time_nsec" :    146932000, "standard_deviation_nsec" :      7571 },
     {"send_size" :    128, "recv_size" :      0, "total_time_nsec" :     57616000, "standard_deviation_nsec" :      6158 },
     {"send_size" :    128, "recv_size" :      4, "total_time_nsec" :     59091000, "standard_deviation_nsec" :      7458 },
     {"send_size" :    128, "recv_size" :      8, "total_time_nsec" :     60263000, "standard_deviation_nsec" :     11999 },
     {"send_size" :    128, "recv_size" :     16, "total_time_nsec" :     59238000, "standard_deviation_nsec" :      6102 },
     {"send_size" :    128, "recv_size" :     32, "total_time_nsec" :     60783000, "standard_deviation_nsec" :      6244 },
     {"send_size" :    128, "recv_size" :     64, "total_time_nsec" :     62975000, "standard_deviation_nsec" :      8947 },
     {"send_size" :    128, "recv_size" :    128, "total_time_nsec" :     65742000, "standard_deviation_nsec" :      5907 },
     {"send_size" :    128, "recv_size" :    256, "total_time_nsec" :     72402000, "standard_deviation_nsec" :      6601 },
     {"send_size" :    128, "recv_size" :    512, "total_time_nsec" :     87457000, "standard_deviation_nsec" :      9004 },
     {"send_size" :    128, "recv_size" :   1024, "total_time_nsec" :    148412000, "standard_deviation_nsec" :     10532 },
     {"send_size" :    256, "recv_size" :      0, "total_time_nsec" :     58705000, "standard_deviation_nsec" :      7274 },
     {"send_size" :    256, "recv_size" :      4, "total_time_nsec" :     58818000, "standard_deviation_nsec" :      5453 },
     {"send_size" :    256, "recv_size" :      8, "total_time_nsec" :     59451000, "standard_deviation_nsec" :      6926 },
     {"send_size" :    256, "recv_size" :     16, "total_time_nsec" :     60237000, "standard_deviation_nsec" :      5781 },
     {"send_size" :    256, "recv_size" :     32, "total_time_nsec" :     61456000, "standard_deviation_nsec" :      5591 },
     {"send_size" :    256, "recv_size" :     64, "total_time_nsec" :     62615000, "standard_deviation_nsec" :      7588 },
     {"send_size" :    256, "recv_size" :    128, "total_time_nsec" :     68554000, "standard_deviation_nsec" :      7766 },
     {"send_size" :    256, "recv_size" :    256, "total_time_nsec" :     74557000, "standard_deviation_nsec" :      8748 },
     {"send_size" :    256, "recv_size" :    512, "total_time_nsec" :     87929000, "standard_deviation_nsec" :      9510 },
     {"send_size" :    256, "recv_size" :   1024, "total_time_nsec" :    148522000, "standard_deviation_nsec" :     11394 },
     {"send_size" :    512, "recv_size" :      0, "total_time_nsec" :     59697000, "standard_deviation_nsec" :      7825 },
     {"send_size" :    512, "recv_size" :      4, "total_time_nsec" :     59427000, "standard_deviation_nsec" :      5706 },
     {"send_size" :    512, "recv_size" :      8, "total_time_nsec" :     59538000, "standard_deviation_nsec" :      6863 },
     {"send_size" :    512, "recv_size" :     16, "total_time_nsec" :     61139000, "standard_deviation_nsec" :      7645 },
     {"send_size" :    512, "recv_size" :     32, "total_time_nsec" :     62203000, "standard_deviation_nsec" :      7985 },
     {"send_size" :    512, "recv_size" :     64, "total_time_nsec" :     62577000, "standard_deviation_nsec" :      8118 },
     {"send_size" :    512, "recv_size" :    128, "total_time_nsec" :     68722000, "standard_deviation_nsec" :     10581 },
     {"send_size" :    512, "recv_size" :    256, "total_time_nsec" :     74290000, "standard_deviation_nsec" :      8931 },
     {"send_size" :    512, "recv_size" :    512, "total_time_nsec" :     88635000, "standard_deviation_nsec" :      7771 },
     {"send_size" :    512, "recv_size" :   1024, "total_time_nsec" :    149589000, "standard_deviation_nsec" :     11456 },
     {"send_size" :   1024, "recv_size" :      0, "total_time_nsec" :     63243000, "standard_deviation_nsec" :      6331 },
     {"send_size" :   1024, "recv_size" :      4, "total_time_nsec" :     64381000, "standard_deviation_nsec" :      8372 },
     {"send_size" :   1024, "recv_size" :      8, "total_time_nsec" :     63481000, "standard_deviation_nsec" :      5608 },
     {"send_size" :   1024, "recv_size" :     16, "total_time_nsec" :     65549000, "standard_deviation_nsec" :      8826 },
     {"send_size" :   1024, "recv_size" :     32, "total_time_nsec" :     65485000, "standard_deviation_nsec" :      6822 },
     {"send_size" :   1024, "recv_size" :     64, "total_time_nsec" :     67125000, "standard_deviation_nsec" :      9829 },
     {"send_size" :   1024, "recv_size" :    128, "total_time_nsec" :     72680000, "standard_deviation_nsec" :      7641 },
     {"send_size" :   1024, "recv_size" :    256, "total_time_nsec" :     79206000, "standard_deviation_nsec" :      9854 },
     {"send_size" :   1024, "recv_size" :    512, "total_time_nsec" :     92418000, "standard_deviation_nsec" :      9107 },
     {"send_size" :   1024, "recv_size" :   1024, "total_time_nsec" :    152392000, "standard_deviation_nsec" :     11124 }
    ]
  },
  "download_speed" : {
    "byte_size" : 4194304,
    "results" : [
     {"send_size" :      0, "recv_size" :     32, "total_time_nsec" :   7735630000 },
     {"send_size" :      0, "recv_size" :     64, "total_time_nsec" :   3985169000 },
     {"send_size" :      0, "recv_size" :    128, "total_time_nsec" :   2128791000 },
     {"send_size" :      0, "recv_size" :    256, "total_time_nsec" :   1172077000 },
     {"send_size" :      0, "recv_size" :    512, "total_time_nsec" :    703833000 },
     {"send_size" :      0, "recv_size" :   1024, "total_time_nsec" :    594966000 }
    ]
  }
}

llvm-svn: 237953
2015-05-21 20:52:06 +00:00
Zachary Turner b48b40405e Don't import module `lock` at global scope.
`lock` depends on `fcntl`, which doesn't exist on Windows.  Until
someone implements an equivalent locking mechanism on Windows, we
can't have lock imported globally.

llvm-svn: 237946
2015-05-21 20:16:02 +00:00
Zachary Turner 3c1c5b9d88 Fix race condition when detaching/killing an inferior.
llvm-svn: 237945
2015-05-21 19:56:26 +00:00
Vince Harron 85d1965abd dotest.py - debug feature that helps find dosep races
SUMMARY
dosep.py starts lots and lots of dotest instances.

This option helps you find if two (or more) dotest instances are using
the same directory at the same time.

Enable it to cause test failures and stderr messages if dotest
instances try to run in the same directory simultaneously.

It is disabled by default because it litters the test directories with
".dirlock" files

TEST PLAN
Set lldbtest.debug_confirm_directory_exclusivity = True
run ./dosep.py

Differential Revision: http://reviews.llvm.org/D9868

llvm-svn: 237935
2015-05-21 19:09:29 +00:00
Vince Harron 0289dcbd91 XPASS a bunch of GdbRemote/LldbGdbServer tests
Depends on r237932
"Fixed intermittent failures in TestGdbRemote*/TestLldbGdbServer"

Test Plan:
Ran dosep 100x, no failures in these tests

Differential Revision: http://reviews.llvm.org/D9892

llvm-svn: 237933
2015-05-21 18:55:39 +00:00
Vince Harron 65f9916370 Fixed intermittent failures in TestGdbRemote*/TestLldbGdbServer
test/tools/lldb-server/commandline/Test* were actually executing in
their parent directory. This looks fine at first because they aren't
compiling an inferior executable.

Unfortunately, they still call "make clean" during their cleanup,
which is likely causing all kinds of havok in tests running in the
parent directory

Differential Revision: http://reviews.llvm.org/D9869

llvm-svn: 237932
2015-05-21 18:54:12 +00:00
Vince Harron 1f160377ae Re-enable packet logging for GdbRemote/LldbServer tests
Creates logs in session dir

Differential Revision: http://reviews.llvm.org/D9847

llvm-svn: 237931
2015-05-21 18:51:20 +00:00
Vince Harron 47fc26f9fe Fix lldb executable discovery on OS X
It was broken by r237632

Differential Revision: http://reviews.llvm.org/D9846

llvm-svn: 237928
2015-05-21 18:21:07 +00:00
Siva Chandra 73eddaa2d8 [TestChangeValueAPI] Remove expectedFailureGcc decorator.
Test Plan: dotest.py -C <clang|gcc> -p TestChangeValueAPI

Reviewers: vharron

Reviewed By: vharron

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D9116

llvm-svn: 237927
2015-05-21 18:20:46 +00:00
Vince Harron 35b17dca50 dotest.py - log session to a file instead of a StringIO class
That way, if the test gets killed (by a dosep timeout) we get to see the session
trace

Test Plan:
Run dotest.py
Kill it while it's running, check the session dir for Test* files

Differential Revision: http://reviews.llvm.org/D9845

llvm-svn: 237926
2015-05-21 18:20:21 +00:00
Vince Harron 0b9dbb5794 Add logging for XTIMEOUT/UnexpectedSuccess
If an expected timeout test times out, touch
<session-dir>/ExpectedTimeout-<test-name>

If an expected timeout test passes, touch
<session-dir>/UnexpectedCompletion-<test-name>

Differential Revision: http://reviews.llvm.org/D9843

llvm-svn: 237925
2015-05-21 18:18:52 +00:00
Vince Harron 41657ccf17 Modify dosep.py to add default session dir parameter
This ensures that all spawned dotest instances store their traces
in the same location.

Test Plan:
run dosep.py with and without a -s option for dotest

cd lldb/test
./dosep.py
./dosep.py -o '-s /tmp/traces'

Differential Revision: http://reviews.llvm.org/D9839

llvm-svn: 237923
2015-05-21 18:15:09 +00:00
Siva Chandra 2f8e607d48 [TestBuiltinTrap] Change skipIfGcc to expectedFailure for GCC <= 4.6.
Test Plan: dotest.py -C gcc -p TestBuiltinTrap

Reviewers: vharron

Reviewed By: vharron

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D9117

llvm-svn: 237922
2015-05-21 18:12:19 +00:00
Vince Harron 37a38e6e9b TestInlineStepping - made XFAIL more specific
Differential Revision: http://reviews.llvm.org/D9828

llvm-svn: 237921
2015-05-21 18:07:16 +00:00
Adrian McCarthy 1406f9154e Update Makefile to reflect that TestNumThreads now uses std::thread instead of pthreads.
llvm-svn: 237919
2015-05-21 17:47:58 +00:00
Robert Flack ab78164ad8 Only check for matching arch and UUID when looking for dsym in vincinity of executable.
ModuleSpecs::FindMatchingModuleSpec looks for matching filenames but when
looking for the dSYM we should only be looking for a matching architecture and
and UUID. Jason pointed out this mistake in http://reviews.llvm.org/D9174 when
this function was incorrectly converted to not be Mac specific.

Test Plan:
Running LLDB on test/lang/c/shared_lib_stripped_symbols/a.out in a debugger I've
verified LocateDSYMInVincinityOfExecutable correctly locates the matching dSYM.

Differential Revision: http://reviews.llvm.org/D9896

llvm-svn: 237907
2015-05-21 15:44:24 +00:00
Tamas Berghammer a98788d17e Add bug number for TestEvents
llvm-svn: 237904
2015-05-21 14:04:17 +00:00
Tamas Berghammer 9691518143 Handle aggregate return types in SysV-arm ABI
Differential revision: http://reviews.llvm.org/D9910

llvm-svn: 237901
2015-05-21 13:44:40 +00:00
Tamas Berghammer 350d8b311b Add float/double return value handling to SysV-arm ABI
This is neccessary for evaluating expressions with float/double return
value and for displaying float/double return values in case of a thread
step out.

Differential revision: http://reviews.llvm.org/D9907

llvm-svn: 237900
2015-05-21 13:34:46 +00:00
Tamas Berghammer b5f4e6dd53 XFAIL TestEvents on Linux bacuse it is flaky
llvm-svn: 237888
2015-05-21 10:16:55 +00:00
Pavel Labath f249efa7e9 XFAILing TestRaise on darwin due to an apparent bug
llvm-svn: 237887
2015-05-21 10:15:57 +00:00
Pavel Labath 39036ac31d [NativeProcessLinux] Fix handling of SIGSTOP
Summary:
Previously, NPL tried to reinject SIGSTOP into the inferior in an attempt to get the process to
start in the group-stop state. This was:
a) wrong (reinjection should be controlled by "process handle" lldb setting)
b) racy (it should use Resume for transparent resuming instead of RequestResume)
c) broken (llgs crashed on inferior SIGSTOP)

With this change, SIGSTOP is handled just like any other signal delivered to the inferior: we
stop all threads and report signal reception to lldb. SIGSTOP reinjection does not behave the
same way as it would outside the debugger, but simulating this is a hard problem and is not
normally necessary.

Test Plan: I have added a test which verifies we get SIGSTOP reports and we do not crash.

Reviewers: ovyalov, chaoren

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D9852

llvm-svn: 237880
2015-05-21 08:32:18 +00:00
Vince Harron a7959f6585 trivial log print fix
llvm-svn: 237878
2015-05-21 05:57:28 +00:00
Jim Ingham 7ac5c86ba9 Fix the logic in DynamicLoaderMacOSXDYLD::Clear that would only remove the old dyld notification
breakpoint only  if the process it was for is still alive.  We need to always remove this because
it has a pointer to the old loader, and    if we ever hit it we will crash.  I also put in a sanity
check in the callback function to make sure we don't invoke it if the process is wrong.

<rdar://problem/21006189>

llvm-svn: 237866
2015-05-21 00:27:01 +00:00
Greg Clayton 07b5899367 Fixed an issue with expressions that define types in the expression. We must currently touch the members of the struct in the right order or our ClangASTImporter::DeportType() will copy the resulting type into the target AST incorrectly. This is a work around for <rdar://problem/21049838> which the copy type issue so that it doesn't happen.
<rdar://problem/20902950>

llvm-svn: 237865
2015-05-21 00:26:58 +00:00
Chaoren Lin 36758cf16a Using -pthread instead of -lpthread to appease GCC.
llvm-svn: 237864
2015-05-21 00:19:15 +00:00
Adrian McCarthy 58443f2429 Have TestNumThreads use std::thread instead of pthreads so that it can work cross-platform.
llvm-svn: 237844
2015-05-20 22:32:44 +00:00
Chaoren Lin 2bf454021c Default dst value for platform put-file.
Summary: It should default to working-dir/src-filename if dst is not specified.

Reviewers: clayborg, flackr

Reviewed By: flackr

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D9890

llvm-svn: 237831
2015-05-20 20:23:23 +00:00
Jim Ingham 40d66e6108 Since the asan report function doesn't gather bp or sp,
don't put those values in the Structured Data we make up
from the report.

<rdar://problem/21038887>

llvm-svn: 237824
2015-05-20 19:15:43 +00:00
Zachary Turner c62733b0de Implement attach to process on Windows.
Differential Revision: http://reviews.llvm.org/D9801
Reviewed by: Adrian McCarthy

llvm-svn: 237817
2015-05-20 18:31:17 +00:00
Ilia K 38810f430b Fix handling of hijacked events in synchronous mode
Summary:
This patch includes the following changes:
* Fix Target::Launch to handle hijacked event in synchronous mode
* Improve MiStartupOptionsTestCase tests to expect *stopped (MI)
* Add SBProcess::GetStopEventForStopID
* Add ProcessModID::SetStopEventForLastNaturalStopID/GetStopEventForStopID
* Add const qualifier to ProcessModID::GetLastNaturalStopID
* Add SBProcess::GetStopEventForStopID
* Don't broadcast hijacked event in Target::Launch
* Add CMICmnLLDBDebugger::CheckIfNeedToRebroadcastStopEvent/RebroadcastStopEvent

Test Plan: ./dotest.py -v --executable $BUILDDIR/bin/lldb tools/lldb-mi/startup_options/

Reviewers: zturner, jingham, clayborg, abidh

Reviewed By: clayborg

Subscribers: abidh, zturner, lldb-commits, clayborg, jingham

Differential Revision: http://reviews.llvm.org/D9371

llvm-svn: 237781
2015-05-20 10:15:47 +00:00
Siva Chandra 8fd94c9e68 [GDBRemoteCommunicationClient] Increase timeout for qfProcessInfo packet.
Summary:
The test in TestPlatformCommand which runs "platform process list" has
been timing out for Android when running running dosep.py with
LLDB_TEST_THREADS=8. This patch increases the packet timeout to a large
value of 1min to accommodate the long time required for a response for
the qfProcessInfo packet on Android.

Test Plan: LLDB_TEST_THREADS=8 ./dosep.py on Android.

Reviewers: chaoren

Reviewed By: chaoren

Subscribers: tberghammer, lldb-commits

Differential Revision: http://reviews.llvm.org/D9866

llvm-svn: 237752
2015-05-20 00:30:31 +00:00
Chaoren Lin 70e0cbb3ed Remove trailing slash from dumping directory FileSpec.
Reviewers: domipheus, ovyalov

Reviewed By: ovyalov

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D9862

llvm-svn: 237741
2015-05-19 23:11:58 +00:00
Enrico Granata 4518586234 A previous patch made it so that ValueObjects could update themselves even in the face of an invalid execution context (which was required for the dynamic and synthetic values of const objects)
It turns out, child values also need similar provisions

This patch simplifies things a bit allowing ValueObject subclasses to just declare whether they can accept an invalid context at update time, and letting the update machinery in the EvaluationPoint to the rest
Also, this lets ValueObjectChild proclaim that its parent chooses whether such blank-slate updates are possible

llvm-svn: 237714
2015-05-19 18:53:13 +00:00
Tamas Berghammer 0d0ec9f2d7 Mark TestEvents as XTIMEOUT on Linux
llvm-svn: 237679
2015-05-19 10:49:40 +00:00
Ilia K 5e47696da2 Don't print =breakpoint-created if BP info was emitted in the result record (MI)
llvm-svn: 237676
2015-05-19 09:57:56 +00:00
Vince Harron d347f27f45 dotest - minor doc fix
llvm-svn: 237665
2015-05-19 05:10:22 +00:00
Oleksiy Vyalov 09e9079d5c Use ADB pull to download modules from android target.
http://reviews.llvm.org/D9816

llvm-svn: 237640
2015-05-18 23:44:06 +00:00
Adrian McCarthy 2f8e4c3bf9 Enable debugging of multithreaded programs on Windows.
llvm-svn: 237637
2015-05-18 23:24:32 +00:00
Vince Harron 0c6160156a Make it possible to run dotest on Linux without any parameters
dotest will select clang-3.5 by default and fall back on clang/gcc
dotest will look for the lldb executable in the typical cmake
output locations:
{lldb}/../../../build/bin (next to llvm directory)
{lldb}/../../../build/host/bin (next to llvm directory)
{lldb}/../build/bin (next to lldb directory)
{lldb}/../build/host/bin (next to lldb directory)

llvm-svn: 237632
2015-05-18 23:07:18 +00:00
Vince Harron 7b6039d456 Fixes errors in remote tests
llvm-svn: 237603
2015-05-18 19:44:19 +00:00
Vince Harron f8b9a1da2b Refactored dotest arg parser so that it's accessible from dosep
This allows dosep to understand an act on dotest arguments

Differential Revision: http://reviews.llvm.org/D9820

llvm-svn: 237602
2015-05-18 19:40:54 +00:00
Vince Harron f1518f5981 dotest - Refactored some code into loops
Renamed 'base' to 'lldbRootDirectory'
Renamed 'lldbPath' to 'lldbPythonDir'
Added cmake output directories to lldb executable search locations
Fixed invocation of lldb -P to ignore 'Cannot read termcap database'

Differential Revision: http://reviews.llvm.org/D9818

llvm-svn: 237601
2015-05-18 19:40:00 +00:00
Vince Harron 790d95cbec Refactored lldb executable name discovery
The lldb executable was referenced through the code by 7 different
(effectively) global variables.

global lldbExecutablePath
global lldbExecutable
os.environ['LLDB_EXEC']
os.environ['LLDB_TEST']
dotest.lldbExec
dotest.lldbHere
lldbtest.lldbExec

This change uses one global variable lldbtest_config.lldbExec to
replace them all.

Differential Revision: http://reviews.llvm.org/D9817

llvm-svn: 237600
2015-05-18 19:39:03 +00:00
Vince Harron 0f173ac130 XTIMEOUT TestThreadSpecificBreakpoint.py on darwin
Differential Revision: http://reviews.llvm.org/D9815

llvm-svn: 237599
2015-05-18 19:36:33 +00:00
Vince Harron e9efc17974 Change lldb-mi deployment target to use Xcode project global setting
Differential Revision: http://reviews.llvm.org/D9705

llvm-svn: 237598
2015-05-18 19:35:07 +00:00
Tamas Berghammer 45176c2341 Fix test expectation in TestThreadExit after r237566
llvm-svn: 237578
2015-05-18 16:08:06 +00:00
Pavel Labath 8dd974f735 Update the failure reason of TestConvenienceVariables and tighten the XFAIL
llvm-svn: 237577
2015-05-18 15:48:48 +00:00