summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* Switch SBBreakpoint to storing a weak_ptr of the internal breakpoint objectPavel Labath2017-02-276-277/+253
| | | | | | | | | | | | | | | | | Summary: There is nothing we can do with the breakpoint once the associated target becomes deleted. This will make sure we don't hold on to more resources than we need in this case. In particular, this fixes the case TestStepOverBreakpoint on windows, where a lingering SBBreakpoint object causes us to nor unmap the executable file from memory. Reviewers: clayborg, jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D30249 llvm-svn: 296328
* Three LoadLibCxxFormatters formatters were given a regex string toJason Molenda2017-02-251-3/+3
| | | | | | | | | | match but the 'is_regex' argument was not passed as true. Not sure this is causing a bug, but noticed it while working on another bug. These formatters gained a regex in r274489 for NDK but didn't pick up the is_regex flag at the time. <rdar://problem/30646077> llvm-svn: 296243
* DataBufferMemoryMap.cpp out, DataBufferLLVM.cpp in. Unbreak the build.Jason Molenda2017-02-251-8/+6
| | | | llvm-svn: 296238
* Delete DataBufferMemoryMap.Zachary Turner2017-02-2414-760/+359
| | | | | | | | | | | | | | | After a series of patches on the LLVM side to get the mmaping code up to compatibility with LLDB's needs, it is now ready to go, which means LLDB's custom mmapping code is redundant. So this patch deletes it all and uses LLVM's code instead. In the future, we could take this one step further and delete even the lldb DataBuffer base class and rely entirely on LLVM's facilities, but this is a job for another day. Differential Revision: https://reviews.llvm.org/D30054 llvm-svn: 296159
* Hardware breakpoints for Linux on Arm/AArch64 targetsOmair Javaid2017-02-2420-140/+703
| | | | | | | | Please look at below differential link for upstream discussion. Differential revision: https://reviews.llvm.org/D29669 llvm-svn: 296119
* Attempt to fix windows unit testsPavel Labath2017-02-241-6/+6
| | | | | | | In LLVM r296049, IPDBSession::getGlobalScope lost its constness. Adjust the unittest to account for that. llvm-svn: 296107
* Implement QPassSignals GDB package in lldb-serverPavel Labath2017-02-2413-6/+228
| | | | | | | | | | | | | | | Summary: QPassSignals package allows lldb client to tell lldb-server to ignore certain types of signals and re-inject them back to inferior without stopping execution. Reviewers: jmajors, labath Subscribers: danalbert, srhines, emaste, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D30286 Author: Eugene Zemtsov <ezemtsov@google.com> llvm-svn: 296101
* Fix a race condition in FuncUnwinders where the mutex was beingJason Molenda2017-02-244-10/+16
| | | | | | | | | | | | | | | acquired only after checking if the ivar shared pointer was already filled in. But when I assign an UnwindPlan object to the shared pointer, I assign an empty object and then fill it in. That leaves a window where another thread could get the shared pointer to the empty (but quickly being-filled-in) object and lead to a crash. Also two changes from Greg for correctness on the TestMultipleDebuggers test case. <rdar://problem/30564102> llvm-svn: 296084
* Introduce support for Debug Registers in RegisterContextNetBSD_x86_64Kamil Rytarowski2017-02-241-268/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: NetBSD 7.99.62 introduced Debug Registers interface similar to the FreeBSD one. This interface will land NetBSD-8.0. Introduce support for this interface in Register Context NetBSD x86_64 unconditionally as older versions of NetBSD will not be supported. This change allows to reduce diff with other ports and remove local copy of the RegisterInfos_x86_64.h content. NetBSD Register Context for 32-bit x86 support will be added later. Sponsored by <The NetBSD Foundation> Reviewers: labath, joerg, emaste, clayborg Reviewed By: labath, clayborg Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D30287 llvm-svn: 296071
* Switch NetBSD from paccept(2) to accept4(2)Kamil Rytarowski2017-02-241-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: NetBSD 8.0 will ship with accept4(2) in libc wrapping paccept(2). This change reduces needless difference with other platforms. Older versions of NetBSD will not be supported. No functional change. Sponsored by <The NetBSD Foundation> Reviewers: joerg, emaste, labath, clayborg Reviewed By: emaste, labath, clayborg Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D30288 llvm-svn: 296070
* Switch "windows" log channel to the new registration mechanismPavel Labath2017-02-232-159/+17
| | | | llvm-svn: 295968
* Switch "posix" to the new log channel registration mechanismPavel Labath2017-02-235-220/+30
| | | | | | | | | | | | | | | | | | Summary: This also removes magic rename code, which caused the channel to be called "linux" when built on a linux machine, and "freebsd" when built on a freebsd one, which seems unnecessary - registering a new channel is sufficiently simple now that if we wish to log something extremely os-specific, we can just create a new channel. None of the current categories seem very specific to one OS or another. Reviewers: emaste, krytarowski Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D30250 llvm-svn: 295954
* Finish the reformatting of the lldb-server test executablesPavel Labath2017-02-233-366/+316
| | | | | | This also reformats the executables in subfolders of lldb-server tests. llvm-svn: 295952
* Reformat inferior's main.cpp in lldb-server testPavel Labath2017-02-232-333/+302
| | | | | | | | | | | | | | | | | Summary: main.cpp is complete mess of tabs and spaces. This change brings it to compliance with LLVM coding style. Reviewers: jmajors, labath Reviewed By: jmajors, labath Subscribers: krytarowski, jingham, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D30234 Author: Eugene Zemtsov <ezemtsov@google.com> llvm-svn: 295950
* Ensure lldb-server waits for child debug servers to start up when passing ↵Howard Hellyer2017-02-231-7/+16
| | | | | | | | | | | | | | | | | | | | | | them a port number to listen on. Summary: When lldb-server is started with the -P <port> or -m/-M <min/max port> options to specify which ports are available for remote connections the child debug server is told what port it should listen on. In those cases lldb-server needs to wait for the child to report it’s port number as otherwise it can tell the lldb client that the child is up and listening before it is actually listening on that port. lldb-server already waits in the cases where a port wasn’t specified by waiting until the child reports the port it is using. It was skipping this synchronisation step when passed a port numbers as it knew what the port would be however it does need to ensure the child process has had time to open that port and waiting until the child reports the port number makes sure this has happened. This patch just removes the one case where a child was spawned and lldb-server did not wait for it to report it’s port number before telling the client lldb process the child is ready to connect to. This issue was discussed on lldb-dev in a thread here: http://lists.llvm.org/pipermail/lldb-dev/2017-February/012002.html Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D30255 llvm-svn: 295947
* Changed builld-llvm.py to use .json filesSean Callanan2017-02-235-31/+111
| | | | | | | | | | | | | | | | | | | | | | | LLDB has many branches in a variety of repositories. The build-script.py file is subtly different for each set. This is unnecessary and causes merge headaches. This patch makes build-llvm.py consult a directory full of .json files, each one of which matches a particular branch using a regular expression. This update to the patch introduces a FALLBACK file whose contents take precedence if the current branch could not be identified. If the current branch could be identified, FALLBACK is updated, allowing the user to e.g. cut branches off of known branches and still have the automatic checkout mechanism work. It also documents all of this. Differential revision: https://reviews.llvm.org/D30275 llvm-svn: 295922
* Reverted 295897 pending refinements and fixes for green-dragon.Sean Callanan2017-02-233-80/+31
| | | | llvm-svn: 295915
* Fixed errors in AllocatedBlock:Greg Clayton2017-02-221-4/+9
| | | | | | | | | - Allow zero byte size request for memory and ensure it gets a unique address - Exit the free block loop when we find an appropriate free block <rdar://problem/30644888> llvm-svn: 295907
* Changed builld-llvm.py to use .json filesSean Callanan2017-02-223-31/+80
| | | | | | | | | | | | | | LLDB has many branches in a variety of repositories. The build-script.py file is subtly different for each set. This is unnecessary and causes merge headaches. This patch makes build-llvm.py consult a directory full of .json files, each one of which matches a particular branch using a regular expression. Differential revision: https://reviews.llvm.org/D30275 llvm-svn: 295897
* Fix header documentation.Greg Clayton2017-02-221-2/+2
| | | | llvm-svn: 295882
* Fix header documentation.Greg Clayton2017-02-221-5/+3
| | | | llvm-svn: 295881
* Switch "lldb" log channel to the new registration mechanismPavel Labath2017-02-225-301/+45
| | | | llvm-svn: 295823
* Replace WINLOG_*** macros with LLDB_LOGPavel Labath2017-02-226-374/+244
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The main difference here is that in the WINLOG macros you can specify log categories per call, whereas here you have to go the usual lldb route of getting a Log* variable first. While this means you have to write at least two statements, it usually means that each statement will fit on a single line, whereas fitting the WINLOG invocation on a single line was almost impossible. So the total size of code does not increase even in functions with a single log statement, and functions with more logging get shorter. The downside here is reduced flexibility in specifying the log categories, which a couple of functions used quite heavily (e.g. RefreshStateAfterStop). For these I chose a single category used most prominently and put everything into that, although a solution with multiple log variables is definitely possible. Reviewers: zturner, amccarth Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D30172 llvm-svn: 295822
* Add format_provider for the MemoryRegionInfo::OptionalBool enumPavel Labath2017-02-223-0/+42
| | | | llvm-svn: 295821
* Mark TestDarwinLogBasic.py as an xfail because the logging isJason Molenda2017-02-221-0/+1
| | | | | | | not being picked up; filed <rdar://problem/30645203> to track the work to investigate this. llvm-svn: 295804
* Log: Fix race in accessing the stream variablePavel Labath2017-02-213-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The code was attempting to copy the shared pointer member in order to guarantee atomicity, but this is not enough. Instead, protect the pointer with a proper read-write mutex. This bug was present here for a long time, but my recent refactors must have altered the timings slightly, such that now this fails fairly often when running the tests: the test runner runs the "log disable" command just as the thread monitoring the lldb-server child is about to report that the server has exited. I add a test case for this. It's not possible to reproduce the race deterministically in normal circumstances, but I have verified that before the fix, the test failed when run under tsan, and was running fine afterwards. Reviewers: clayborg, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D30168 llvm-svn: 295712
* Fix spelling mistake.Jason Molenda2017-02-211-1/+1
| | | | llvm-svn: 295694
* Fix a couple of corner cases in NameMatchesPavel Labath2017-02-2013-80/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: I originally set out to move the NameMatches closer to the relevant function and add some unit tests. However, in the process I've found a couple of bugs in the implementation: - the early exits where not always correct: - (test==pattern) does not mean the match will always suceed because of regular expressions - pattern.empty() does not mean the match will fail because the "" is a valid prefix of any string So I cleaned up those and added some tests. The only tricky part here was that regcomp() implementation on darwin did not recognise the empty string as a regular expression and returned an REG_EMPTY error instead. The simples fix here seemed to be to replace the empty expression with an equivalent non-empty one. Reviewers: clayborg, zturner Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D30094 llvm-svn: 295651
* [test] Fix finding LLDB tools when building stand-aloneMichal Gorny2017-02-192-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use both LLDB- and LLVM-specific tool/library directories when LLDB is being built stand-alone. This ensures that the freshly-built tools (and libraries) are used correctly. Without this patch, the test suite uses LLVM_TOOLS_DIR and LLVM_LIBS_DIR to locate lldb, and set PATH and LD_LIBRARY_PATH. When doing a stand-alone build, these variables represent the installed LLVM. As a result, tests either fail due to missing lldb executable or use an earlier installed LLDB version rather than the one being built. To solve this, additional LLDB_TOOLS_DIR and LLDB_LIBS_DIR variables are added and populated using LLVM_*_OUTPUT_INTDIR. Those variables contain directories used to output built executables and libraries. In stand-alone builds, they represent the build-tree directories used by LLDB. In integrated builds, they have the same values as LLVM_*_DIR and therefore using them does not harm. The new variables are prepended to PATH and LD_LIBRARY_PATH to ensure that freshly built binaries are preferred over potentially earlier installed ones. Furthermore, paths used to locate various tools are updated to match appropriate locations. Differential Revision: https://reviews.llvm.org/D29985 llvm-svn: 295621
* Update the location of ModuleCacheTest.cpp fromJason Molenda2017-02-181-10438/+10446
| | | | | | | | | | | | unittest/Utility to unittest/Target so the unit tests can be run from xcode again. The diff is enormous - I think zachary might have put windows line endings or something with his last commit? didn't look too closely but his commit & this commit have every line being different. llvm-svn: 295530
* Updated the results formatter to eliminate redundant data.Sean Callanan2017-02-181-27/+4
| | | | | | | | | | | | | | | | | | The testsuite's results formatter maintains a result_status_counts structure solely for the purpose of setting the return status code after the testsuite has run. This data is redundant with the result_events structure that contains the results of individual tests. There are subtle bugs arising from this redundancy that make some builds report no errors but a nonzero status. Rather than try to make sure these two are always in agreement, I've just rewritten the code that used to use the counts to now use the per-test results. <rdar://problem/30496966> llvm-svn: 295522
* NPL: Fix an incorrect logging formatv callPavel Labath2017-02-171-2/+2
| | | | llvm-svn: 295457
* Switch GDBRemoteLog to the new registration mechanismPavel Labath2017-02-173-213/+32
| | | | llvm-svn: 295455
* Switch ProcessKDPLog to the new channel registration mechanismPavel Labath2017-02-174-203/+35
| | | | llvm-svn: 295450
* Fix compiler warnings for missing switch cases in lldb.Pavel Labath2017-02-174-87/+10
| | | | | | | | | | | | | | | | | | | Summary: There have been a few new values added to a few LLVM enums this change makes sure that LLDB code handles them correctly. Reviewers: labath Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D30005 Author: Eugene Zemtsov <ezemtsov@google.com> llvm-svn: 295445
* Fix VASprintfTest on darwinPavel Labath2017-02-171-2/+2
| | | | | | | | | The way of injecting an error into the printf call was not working on darwin - the C library still happily format the character. It only returns an error after we use a wide character that does not fit into a single byte, so switch the test to use that. llvm-svn: 295443
* Reapply "Refactor log channel registration mechanism"Pavel Labath2017-02-1711-492/+339
| | | | | | | | | Changes wrt. previous version: - add #include <atomic>: fix build on windows - add extra {} around the string literals used to initialize llvm::StringLiteral: fix gcc build llvm-svn: 295442
* NPL: Fix one more bug in the single step workaroundPavel Labath2017-02-173-6/+10
| | | | | | | | | | | | | | | | | In the case we are stepping over the thread creation instruction, we will end up calling Thread::SingleStep back-to-back twice (because of the intermediate PTRACE_EVENT_CLONE stop). This will cause the cpu mask to be set inappropriately (because the old SingleStepCheck object will be destroyed after we create the new one), and the single-step will fail. Before the refactor the code was still incorrect in this case, but in a different way (the thread was left with the incorrect mask after the stepping was complete), so this was not easy to spot. This fixes TestCreateDuringInstructionStep on the affected devices. llvm-svn: 295440
* Fix breakage caused by r295368Pavel Labath2017-02-174-3/+4
| | | | | | | Also move the ErrorTest into the Utility package, to follow the class it is testing. llvm-svn: 295436
* Add myself to CODE_OWNERS.txt for NetBSDKamil Rytarowski2017-02-171-0/+4
| | | | llvm-svn: 295400
* Fix buildZachary Turner2017-02-162-2/+2
| | | | llvm-svn: 295369
* Finish breaking the dependency from Utility.Zachary Turner2017-02-1623-10529/+10612
| | | | | | Differential Revision: https://reviews.llvm.org/D29964 llvm-svn: 295368
* Reindent the code to avoid an error with gcc:Sylvestre Ledru2017-02-161-35/+35
| | | | | | error: this ‘else’ clause does not guard... [-Werror=misleading-indentation] llvm-svn: 295352
* NPL: Fix single step workaroundPavel Labath2017-02-163-10/+13
| | | | | | | | | | | | While refactoring the code in r293046 I made a very basic error - relying on destructor side-effects of a copyable object. Fix that and make the object non-copyable. This fixes the tests on the platforms that need this workaround, but unfortunately we don't have a way to make a more platform-agnostic test right now. llvm-svn: 295345
* [lldb] Add support for "external" reports in ThreadSanitizer LLDB pluginKuba Mracek2017-02-161-2/+31
| | | | | | | | TSan now has the ability to report races on "external" object, i.e. any library class/object that has read-shared write-exclusive threading semantics. The detection and reporting work almost out of the box, but TSan can now provide the type of the object (as a string). This patch implements this into LLDB. Differential Revision: https://reviews.llvm.org/D30024 llvm-svn: 295342
* Fix build due to clang r295311Pavel Labath2017-02-161-1/+0
| | | | | | BuiltinType::Kind::OCLNDRange was removed. llvm-svn: 295328
* Fix a bug introduced in r235737 where code with important sideJason Molenda2017-02-162-2/+4
| | | | | | | | | | effects was passed as an expression to assert() calls. If lldb is built without asserts, the expression was eliminated and we lost the side effects -- these methods stopped working. <rdar://problem/30342959> llvm-svn: 295271
* Fix Xcode project.Greg Clayton2017-02-151-12/+12
| | | | llvm-svn: 295212
* Skip TestStepOverBreakpoint on windowsPavel Labath2017-02-151-0/+2
| | | | llvm-svn: 295211
* Revert "Refactor log channel registration mechanism"Pavel Labath2017-02-1511-330/+491
| | | | | | | The change breaks on Windows and NetBSD bots. Revert while I investigate. llvm-svn: 295201
OpenPOWER on IntegriCloud