Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Change ProcessGDBRemote last stop packet to a container. | Ewan Crawford | 2015-05-27 | 4 | -18/+62 | |
| | | | | | | | | | | | | | | | In ProcessGDBRemote we currently have a single packet, m_last_stop_packet, used to set the thread stop info. However in non-stop mode we can receive several stop reply packets in a sequence for different threads. As a result we need to use a container to hold them before they are processed. This patch also changes the return type of CheckPacket() so we can detect async notification packets. Reviewers: clayborg Subscribers: labath, ted, deepak2427, lldb-commits Differential Revision: http://reviews.llvm.org/D9853 llvm-svn: 238323 | |||||
* | Make log options uniform betwwen lldb-platform and lldb-gdbserver | Tamas Berghammer | 2015-05-27 | 2 | -9/+3 | |
| | | | | | | | | | | This change also get rid of an unused Debugger instance in GDBRemoteCommunicationServerLLGS and the command interpreter from lldb-platform what was used only for enabling logging. Differential revision: http://reviews.llvm.org/D9876 llvm-svn: 238319 | |||||
* | Add real time signals support to FreeBSDSignals | Ed Maste | 2015-05-27 | 1 | -4/+66 | |
| | | | | | | | | Apply r238009 to FreeBSD as well. Differential Revision: http://reviews.llvm.org/D10037 llvm-svn: 238316 | |||||
* | Added XML to the host layer. | Greg Clayton | 2015-05-26 | 4 | -580/+453 | |
| | | | | | | | | | | | | We know have on API we should use for all XML within LLDB in XML.h. This API will be easy back the XML parsing by different libraries in case libxml2 doesn't work on all platforms. It also allows the only place for #ifdef ...XML... to be in XML.h and XML.cpp. The API is designed so it will still compile with or without XML support and there is a static function "bool XMLDocument::XMLEnabled()" that can be called to see if XML is currently supported. All APIs will return errors, false, or nothing when XML isn't enabled. Converted all locations that used XML over to using the host XML implementation. Added target.xml support to debugserver. Extended the XML register format to work for LLDB by including extra attributes and elements where needed. This allows the target.xml to replace the qRegisterInfo packets and allows us to fetch all register info in a single packet. <rdar://problem/21090173> llvm-svn: 238224 | |||||
* | Move register reading form NativeProcessLinux to NativeRegisterContextLinux* | Tamas Berghammer | 2015-05-26 | 17 | -1592/+1461 | |
| | | | | | | | | | | | | | | | | | This change reorganize the register read/write code inside lldb-server on Linux with moving the architecture independent code into a new class called NativeRegisterContextLinux and all of the architecture dependent code into the appropriate NativeRegisterContextLinux_* class. As part of it the compilation of the architecture specific register contexts are only compiled on the specific architecture because they can't be used in other cases. The purpose of this change is to remove a lot of duplicated code from the different register contexts and to remove the architecture dependent codes from the global NativeProcessLinux class. Differential revision: http://reviews.llvm.org/D9935 llvm-svn: 238196 | |||||
* | Did some cleanup to stop us from leaking Pipe file descriptors. | Greg Clayton | 2015-05-23 | 2 | -7/+6 | |
| | | | | | | | | | | The main issue was the Communication::Disconnect() was calling its Connection::Disconnect() but this wouldn't release the pipes that the ConnectionFileDescriptor was using. We also have someone that is holding a strong reference to the Process so that when you re-run, target replaces its m_process_sp, but it doesn't get destructed because someone has a strong reference to it. I need to track that down. But, even if we have a strong reference to the a process that is outstanding, we need to call Process::Finalize() to have it release as much of its resources as possible to avoid memory bloat. Removed the ProcessGDBRemote::SetExitStatus() override and replaced it with ProcessGDBRemote::DidExit(). Now we aren't leaking file descriptors and the stand alone test suite should run much better. llvm-svn: 238089 | |||||
* | Use target's SIGSTOP and SIGINT when making decision about continue after ↵ | Oleksiy Vyalov | 2015-05-22 | 1 | -6/+6 | |
| | | | | | | | | async packet. http://reviews.llvm.org/D9857 llvm-svn: 238068 | |||||
* | Add real time signals support to LinuxSignals | Pavel Labath | 2015-05-22 | 2 | -68/+134 | |
| | | | | | | | | | | | | | | Summary: This enables correct handling of real time signals by lldb. Test Plan: Added a test that verifies handling of SIGRTMIN Reviewers: tberghammer, ovyalov Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9911 llvm-svn: 238009 | |||||
* | Added a new command in ProcessGDBRemote that can figure out the performance ↵ | Greg Clayton | 2015-05-21 | 3 | -61/+214 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 | |||||
* | Fix race condition when detaching/killing an inferior. | Zachary Turner | 2015-05-21 | 3 | -32/+49 | |
| | | | | llvm-svn: 237945 | |||||
* | [NativeProcessLinux] Fix handling of SIGSTOP | Pavel Labath | 2015-05-21 | 1 | -25/+9 | |
| | | | | | | | | | | | | | | | | | | | | | | | | 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 | |||||
* | Implement attach to process on Windows. | Zachary Turner | 2015-05-20 | 5 | -46/+190 | |
| | | | | | | | Differential Revision: http://reviews.llvm.org/D9801 Reviewed by: Adrian McCarthy llvm-svn: 237817 | |||||
* | [GDBRemoteCommunicationClient] Increase timeout for qfProcessInfo packet. | Siva Chandra | 2015-05-20 | 1 | -0/+3 | |
| | | | | | | | | | | | | | | | | | | | | | 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 | |||||
* | Enable debugging of multithreaded programs on Windows. | Adrian McCarthy | 2015-05-18 | 7 | -26/+42 | |
| | | | | llvm-svn: 237637 | |||||
* | Fixed arm64 build error | Vince Harron | 2015-05-16 | 2 | -4/+4 | |
| | | | | llvm-svn: 237493 | |||||
* | [NativeProcessLinux] Fix removal of temporary breakpoints | Pavel Labath | 2015-05-15 | 2 | -19/+21 | |
| | | | | | | | | | | | | | | | | | | | | | | Summary: There was an issue in NPL, where we attempted removal of temporary breakpoints (used to implement software single stepping), while some threads of the process were running. This is a problem since we currently always use the main thread's ID in the removal ptrace call. Therefore, if the main thread was still running, the ptrace call would fail, and the software breakpoint would remain, causing all kinds of problems. This change removes the breakpoints after all threads have stopped. This fixes TestExitDuringStep on Android arm and can also potentially help in other situations, as previously the breakpoint would not get removed if the thread stopped for another reason. Test Plan: TestExitDuringStep passes, other tests remain unchanged. Reviewers: tberghammer Subscribers: tberghammer, aemerson, lldb-commits Differential Revision: http://reviews.llvm.org/D9792 llvm-svn: 237448 | |||||
* | [NativeProcessLinux] Fix potential race during thread exit | Pavel Labath | 2015-05-15 | 1 | -31/+7 | |
| | | | | | | | | | | | | | | | | | | | Summary: This is the same issue as we had in D9145 for thread creation. Going through the full ThreadDidStop/RequestResume cycle can cause a deferred notification to fire, which is not correct when we are ignoring an event and resuming the thread. In this case it doesn't matter much since the thread will die after that anyway, but for correctness, we should do the same thing here. Also treating the SIGTRAP case the same way. Test Plan: Tests continue to pass. Reviewers: chaoren, ovyalov Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9696 llvm-svn: 237445 | |||||
* | Fix StopInfoWatchpoint handling after r237411 | Pavel Labath | 2015-05-15 | 1 | -1/+3 | |
| | | | | | | | | | | | | r237411 exposed the following issue: ProcessGDBRemote used the description field in the stop-reply to set the description of the StopInfo. In the case of watchpoints, the packet description contains the raw address that got hit, which is not exactly the information we want to display to the user as the stop info. Therefore, I have changed the code to use the packet description only if the StopInfo does not already have a description. This makes the behavior equivalent to the pre-r237411 behavior as then the SetDecription call got ignored for watchpoints. llvm-svn: 237436 | |||||
* | Fix a few compile warnings | Ilia K | 2015-05-15 | 1 | -2/+2 | |
| | | | | llvm-svn: 237425 | |||||
* | LLDB build broke after applying patch http://reviews.llvm.org/D9706 | Omair Javaid | 2015-05-15 | 2 | -12/+9 | |
| | | | | | | This patch fixes the issue. llvm-svn: 237421 | |||||
* | This patch adds support for setting/clearing hardware watchpoints and ↵ | Omair Javaid | 2015-05-15 | 8 | -4/+662 | |
| | | | | | | | | breakpoints on AArch64 (Arm v8) 64-bit hardware. http://reviews.llvm.org/D9706 llvm-svn: 237419 | |||||
* | Reverting r237392 since it broke TestNumThreads on ubuntu builder. | Oleksiy Vyalov | 2015-05-15 | 7 | -42/+26 | |
| | | | | llvm-svn: 237415 | |||||
* | Enable multithreaded debugging on Windows. | Adrian McCarthy | 2015-05-14 | 7 | -26/+42 | |
| | | | | llvm-svn: 237392 | |||||
* | Initial FreeBSD/arm live debugging support | Ed Maste | 2015-05-13 | 1 | -0/+4 | |
| | | | | | | | Patch by Tom Rix, except using the RegisterContextFreeBSD_arm files added in r235305 instead. llvm-svn: 237303 | |||||
* | Remove DoAttachToProcessWithId(lldb::pid_t). | Zachary Turner | 2015-05-13 | 6 | -32/+1 | |
| | | | | | | | | | | There were two versions of DoAttachToprocessWithId. One that takes a pid_t, and the other which takes a pid_t and a ProcessAttachInfo. There were no callers of the former version, and all of the implementations of this version were simply forwarding calls to one version or the other. llvm-svn: 237281 | |||||
* | Remote Non-Stop Support | Ewan Crawford | 2015-05-13 | 5 | -7/+104 | |
| | | | | | | | | | | | | | | | | | | | | Summary: This patch is the beginnings of support for Non-stop mode in the remote protocol. Letting a user examine stopped threads, while other threads execute freely. Non-stop mode is enabled using the setting target.non-stop-mode, which sends a QNonStop packet when establishing the remote connection. Changes are also made to treat the '?' stop reply packet differently in non-stop mode, according to spec https://sourceware.org/gdb/current/onlinedocs/gdb/Remote-Non_002dStop.html#Remote-Non_002dStop. A setting for querying the remote for default thread on setup is also included. Handling of '%' async notification packets will be added next. Reviewers: clayborg Subscribers: lldb-commits, ADodds, ted, deepak2427 Differential Revision: http://reviews.llvm.org/D9656 llvm-svn: 237239 | |||||
* | Fixed a ton of gcc compile warnings | Vince Harron | 2015-05-13 | 6 | -46/+39 | |
| | | | | | | | | | | Removed some unused variables, added some consts, changed some casts to const_cast. I don't think any of these changes are very controversial. Differential Revision: http://reviews.llvm.org/D9674 llvm-svn: 237218 | |||||
* | Windows: fix bug in getcwd() and add chdir(). | Ted Woodward | 2015-05-12 | 1 | -5/+0 | |
| | | | | | | | | | | | | | | | | | Summary: GetCurrentDirectory() returns the number of characters copied; 0 is a failure, not a success. Add implementation for chdir(). Reviewers: zturner Reviewed By: zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9300 llvm-svn: 237162 | |||||
* | Return the correct user register count for arm from NativeRegisterContext | Tamas Berghammer | 2015-05-12 | 2 | -0/+12 | |
| | | | | | | | | The defult implementation falls back to GetRegisterCount what includes the debug registers also what shouldn't be displayed to the user. llvm-svn: 237111 | |||||
* | Remove handling of eStateStopped from NativeProcessLinux::Resume | Pavel Labath | 2015-05-12 | 2 | -135/+8 | |
| | | | | | | | | | | | | | | | | | | | | | | | Summary: NPL::Resume attempted to handle eStateStopped as a resume action. However: - GDBRemoteCommunicationServerLLGS (the only user of NPL) never sets this action - it could set this action in response to a vCont:t packet, but LLDB never produces this packet - gdb-remote protocol documentation says vCont:t packet is used only in non-stop mode, but LLDB does not support non-stop mode - even if LLDB supported non-stop mode, this implementation of eStateStopped does something different from what the spec says it should (according to spec, it should stop the specified thread, but this seems to want to stop all threads). Given the facts above, I believe we should remove this unused and untested code, as it probably doesn't even work and removing it makes the rest of the code noticably simpler. Reviewers: ovyalov, chaoren Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9657 llvm-svn: 237103 | |||||
* | [NativeProcessLinux] Remove event mutex and clean functions using it | Pavel Labath | 2015-05-12 | 2 | -242/+72 | |
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Since the former-TSC events are now processed synchronously, there is no need for to protect them with a separate mutex - all the actions are now guarded by the big m_threads_mutex. With the mutex gone, the following functions, no longer have any purpose and were removed: NotifyThreadCreate: replaced by direct calls to ThreadWasCreated NotifyThreadStop: replaced by direct calls to ThreadDidStop NotifyThreadDeath: folded into StopTrackingThread ResetForExec: inlined as it consisted of a single line of code RequestThreadResume(AsNeeded): replaced by direct calls to ResumeThread StopThreads: removed, as it was never called Test Plan: tests continue to pass Reviewers: ovyalov, chaoren Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9603 llvm-svn: 237101 | |||||
* | Get lldb-server building on android-9 | Vince Harron | 2015-05-12 | 6 | -82/+34 | |
| | | | | | | Build lldb-server with an android-9 sysroot. llvm-svn: 237078 | |||||
* | [NativeProcessLinux] Remove double thread state accounting | Pavel Labath | 2015-05-11 | 4 | -167/+112 | |
| | | | | | | | | | | | | | | | | | | Summary: Now that all thread events are processed synchronously, there is no need to have separate records of whether a thread is running. This changes the (ever-dwindling) remains of the TSC to use NativeThreadLinux as the authoritative source of the state of threads. The rest of the ThreadContext we need has been moved to a member of NTL. Test Plan: ninja check-lldb continues to pass Reviewers: chaoren, ovyalov Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9562 llvm-svn: 236983 | |||||
* | Add support for ./dotest.py --channel and --log-success | Vince Harron | 2015-05-10 | 1 | -0/+9 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: New dotest options that allow arbitrary log channels and categories to be enabled. Also enables logging for locally run debug servers. Log messages are separated into separate files per test case. (this makes it possible to log in dosep runs) These new log files are stored side-by-side with trace files in the session directory. These files are deleted by default if the test run is successful. If --log-success is specified, even successful logs are retained. --log-success is useful for creating reference log files. Test Plan: add '--channel "lldb all" --channel "gdb-remote packets" --log-success' to your dotest options Tested on OSX and Linux Differential Revision: http://reviews.llvm.org/D9594 llvm-svn: 236956 | |||||
* | Fixed minor compile warnings | Vince Harron | 2015-05-10 | 1 | -2/+1 | |
| | | | | llvm-svn: 236945 | |||||
* | Convert mmap options for target in InferiorCallMmap. | Robert Flack | 2015-05-09 | 2 | -11/+2 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Converts the MAP_PRIVATE and MAP_ANON options to the target platform constants (on which the call runs) rather than using those of the compiled host. Test Plan: Run test suite, the following tests requiring memory allocation / JIT support begin passing when running mac -> linux: Test11588.py TestAnonymous.py TestBreakpointConditions.py TestCPPStaticMethods.py TestCStrings.py TestCallStdStringFunction.py TestDataFormatterCpp.py TestDataFormatterStdList.py TestExprDoesntBlock.py TestExprHelpExamples.py TestFunctionTypes.py TestPrintfAfterUp.py TestSBValuePersist.py TestSetValues.py Differential Revision: http://reviews.llvm.org/D9511 llvm-svn: 236933 | |||||
* | Set path syntax for remote executable FileSpec. | Chaoren Lin | 2015-05-09 | 1 | -4/+4 | |
| | | | | | | | | | | Reviewers: ovyalov, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9579 llvm-svn: 236925 | |||||
* | This patch allows LLDB to use the $qXfer:Libraries: packet. | Aidan Dodds | 2015-05-08 | 2 | -8/+345 | |
| | | | | | | Differential Revision: http://reviews.llvm.org/D9471 llvm-svn: 236817 | |||||
* | [NativeProcessLinux] Remove the stop callback | Pavel Labath | 2015-05-08 | 2 | -157/+71 | |
| | | | | | | | | | | | | | | | | | Summary: The stop callback is a remnant of the ThreadStateCoordinator. We don't need it now that TSC is gone, as we know exactly which function to call when threads stop. This also removes some stop-related functions, which were just forwarding calls to one another. Test Plan: ninja check-lldb continues to pass Reviewers: chaoren, ovyalov Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9531 llvm-svn: 236814 | |||||
* | Add logging to ProcessWindows. | Zachary Turner | 2015-05-07 | 6 | -166/+484 | |
| | | | | llvm-svn: 236776 | |||||
* | [NativeProcessLinux] Remove logging and error callbacks | Pavel Labath | 2015-05-07 | 2 | -296/+156 | |
| | | | | | | | | | | | | | | | | Summary: These are remnants of the thread state coordinator, which are now unnecessary. I have basically inlined the callbacks. No functional change. Test Plan: Tests continue to pass. Reviewers: chaoren, vharron Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9343 llvm-svn: 236707 | |||||
* | [LLDB][MIPS] Software single stepping | Mohit K. Bhakkad | 2015-05-07 | 1 | -4/+8 | |
| | | | | | | | | | | Patch by Jaydeep Patil Reviewers: clayborg, jasonmolenda Subscribers: bhushan, mohit.bhakkad, sagar, lldb-commits. Differential Revision: http://reviews.llvm.org/D9519 llvm-svn: 236696 | |||||
* | [NativeProcessLinux] Remove the post-stop lambda | Pavel Labath | 2015-05-06 | 2 | -132/+55 | |
| | | | | | | | | | | | | | | | | | | | | | | | Summary: The lambda was always calling SetState(eStateStopped) with small variations, so I have inlined the code. Given that we don't have the TSC anymore, I believe we don't need to be so generic. The only major change here is the way we choose a stop reason thread when we're interrupting a program on client request. Previously, we were setting a null stop reason for all threads and then fixing up the reason for one victim thread in the lambda. Now, I make sure the stop reason is set for the victim thread correctly in the first place. I also take the opportunity to rename CallAfter* functions into something more appropriate. Test Plan: All tests continue to pass. Reviewers: chaoren, vharron Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9321 llvm-svn: 236595 | |||||
* | [NativeProcessLinux] fold ThreadStateCoordinator into NPL | Pavel Labath | 2015-05-06 | 5 | -918/+849 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Since all TSC operations are now executed synchronously, TSC has become a little more than a messenger between different parts of NativeProcessLinux. Therefore, the reason for its existance has disappeared. This commit moves the contents of the TSC into the NPL class. This will enable us to remove all the boilerplate code in NPL (as it stands now, this is most of the class), which I plan to do in subsequent commits. Unfortunately, this also means we will lose the unit tests for the TSC. However, since the size of the TSC has diminished, the unit tests were not testing much at this point anyway, so it's not a big loss. No functional change. Test Plan: All tests continue to pass. Reviewers: vharron, chaoren Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9296 llvm-svn: 236587 | |||||
* | [ThreadStateCoordinator] Remove Event classes | Pavel Labath | 2015-05-06 | 2 | -614/+399 | |
| | | | | | | | | | | | | | | | | | Summary: This is a cleanup patch for thread state coordinator. After making processing of all events synchronous, there is no need to have a a separate class for each event. I have moved back processing of all events back into the TSC class. No functional change. Test Plan: All tests continue to pass. Reviewers: chaoren, vharron Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9254 llvm-svn: 236576 | |||||
* | Fix process launch from Windows host to Android target. | Chaoren Lin | 2015-05-05 | 1 | -2/+2 | |
| | | | | | | | | | | | | | | | | Summary: - Denormalized path on Windows host causes bad `A` packet. - Executables copied from Windows host doesn't have executable bits. Reviewers: tberghammer, zturner, ovyalov Reviewed By: ovyalov Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D9492 llvm-svn: 236516 | |||||
* | Fix Android build. | Chaoren Lin | 2015-05-05 | 1 | -1/+1 | |
| | | | | llvm-svn: 236509 | |||||
* | [NativeProcessLinux] Get rid of the thread state coordinator thread | Pavel Labath | 2015-05-05 | 4 | -253/+126 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change removes the thread state coordinator thread by making all the operations it was performing synchronous. In order to prevent deadlock, NativeProcessLinux must now always call m_monitor->DoOperation with the m_threads_mutex released. This is needed because HandleWait callbacks lock the mutex (which means the monitor thread will block waiting on whoever holds the lock). If the other thread now requests a monitor operation, it will wait for the monitor thread do process it, creating a deadlock. To preserve this invariant I have introduced two new Monitor commands: "begin operation block" and "end operation block". They begin command blocks the monitor from processing waitpid events until the corresponding end command, thereby assuring the monitor does not attempt to acquire the mutex. Test Plan: Run the test suite locally, verify no tests fail. Reviewers: vharron, chaoren Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9227 llvm-svn: 236501 | |||||
* | Fix GetModuleInfo() not checking for unsupported RSP response. | Aidan Dodds | 2015-05-05 | 1 | -1/+1 | |
| | | | | | | http://reviews.llvm.org/D9473 llvm-svn: 236486 | |||||
* | Don't force a vendor check in ProcessMachCore::CanDebug() -- if this | Jason Molenda | 2015-04-29 | 1 | -7/+3 | |
| | | | | | | | | is a Mach-O file and it is a Mach-O core file, activate the ProcessMachCore plugin. <rdar://problem/20739989> llvm-svn: 236170 |