summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Refactor log channel registration mechanismPavel Labath2017-02-1511-491/+330
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: We currently have two log channel registration mechanisms. One uses a set of function pointers and the other one is based on the PluginManager. The PluginManager dependency is unfortunate, as logging is also used in lldb-server, and the PluginManager pulls in a lot of classes which are not used in lldb-server. Both approach have the problem that they leave too much to do for the user, and so the individual log channels end up reimplementing command line argument parsing, category listing, etc. Here, I replace the PluginManager-based approach with a one. The new API is more declarative, so the user only needs to specify the list of list of channels, their descriptions, etc., and all the common tasks like enabling/disabling categories are hadled by common code. I migrate the LogChannelDWARF (only user of the PluginManager method) to the new API. In the follow-up commits I'll replace the other channels with something similar. Reviewers: clayborg, zturner, beanz Subscribers: aprantl, lldb-commits Differential Revision: https://reviews.llvm.org/D29895 llvm-svn: 295190
* Fix debug build of unit testsPavel Labath2017-02-151-0/+3
| | | | | | | | | | | | | | | | | | Summary: It turns out listing each library twice is not enough to resolve all references in a debug build on linux - a number of executables fails to link with random symbols missing. Increasing the number to three seems to be enough. The choice of lldbCore to set the multiplicity on is somewhat arbitrary, but it seems fitting, as it is the biggest layering transgressor. Reviewers: beanz Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D29888 llvm-svn: 295189
* Fix unittests after r295088Pavel Labath2017-02-151-0/+0
| | | | | | | This resurrects TestModule.so which got lost during the move and is needed for the ModuleCache test. llvm-svn: 295171
* Fix TestNameLookup for GCCPavel Labath2017-02-151-2/+2
| | | | | | | | | | | | | | | | | | | | Summary: GCC emits also symbols for the __PRETTY_FUNCTION__ virtual variable, which we accidentaly pick up when looking for functions for with "unique_function_name" in the name. This makes the target.FindFunctions call fail, as that symbol is not a function. I also strenghten the test a bit to make sure we actually find all the functions we are interested in. I've put a check that we find at least 6 functions, but maybe this should be *exactly* 6 ? Reviewers: clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D29932 llvm-svn: 295170
* Bug 30863 - Step doesn't stop with conditional breakpoint on the next lineBoris Ulasevich2017-02-1510-34/+260
| | | | | | | | | Differential Revisions: https://reviews.llvm.org/D26497 (committed r290168, temporary reverted r290197) https://reviews.llvm.org/D28945 (fix for Ubuntu tests fail) https://reviews.llvm.org/D29909 (fix for TestCallThatThrows test fail) llvm-svn: 295168
* Use StringRef and APFloat instead of lldb/StringConvert.hZachary Turner2017-02-141-11/+10
| | | | llvm-svn: 295091
* Remove dependencies from Utility to Core and Target.Zachary Turner2017-02-1490-111/+131
| | | | | | | | | | With this patch, the only dependency left is from Utility to Host. After this is broken, Utility will finally be standalone. Differential Revision: https://reviews.llvm.org/D29909 llvm-svn: 295088
* XFAIL TestNameLookup for GCCPavel Labath2017-02-141-1/+2
| | | | | | | I think I have a fix for this, but it needs review. This should keep the bots happy until then. llvm-svn: 295047
* Before returning a pc value for a stack frame,Jason Molenda2017-02-141-3/+21
| | | | | | | run it through the ABI's FixCodeAddress method. <rdar://problem/29711506> llvm-svn: 295025
* Fix buildbots.Greg Clayton2017-02-131-1/+1
| | | | llvm-svn: 294991
* FindFunctions now works again with mangled names.Greg Clayton2017-02-135-20/+158
| | | | | | <rdar://problem/28147057> llvm-svn: 294990
* [CMake] Adding API dependency on UtilityChris Bieneman2017-02-131-0/+1
| | | | | | Utility is directly referenced from Breakpoint. llvm-svn: 294987
* [CMake] Adding API dependency on UtilityChris Bieneman2017-02-131-0/+1
| | | | | | Utility is directly referenced from API. llvm-svn: 294986
* Try to fix windows build (broken by r294939)Pavel Labath2017-02-132-6/+2
| | | | | | log->Debug is gone, switch to using log->Verbose llvm-svn: 294944
* Remove some dead code from ProcessPOSIXLogPavel Labath2017-02-132-41/+0
| | | | llvm-svn: 294940
* Clean up debug loggingPavel Labath2017-02-137-79/+31
| | | | | | | | | | | | | | | | | | | | | Summary: We've had two ways to print a "debug" log message. - Log::GetDebug() was testing a Stream flag which was never set. - Log::Debug() was checking for the presence of "log enable --debug" flag. Given that these two were used very rarely and we already have a different way to specify "I want a more verbose log", I propose to remove these two functions and migrate the callers to LLDB_LOGV. This commit does that. Reviewers: clayborg, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D29823 llvm-svn: 294939
* Fix the lldb_private::Function::GetDescription to print out the name and ↵Greg Clayton2017-02-101-6/+9
| | | | | | | | mangled name correctly. Previously this was getting the function type's name which was not correct. This info appears in the output of "image lookup --verbose --address ADDRESS". llvm-svn: 294804
OpenPOWER on IntegriCloud