summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* llgs-tests: Add support for "exit" stop-reply packetsPavel Labath2017-12-156-62/+149
| | | | | | | | | | | | | | | | | | Summary: This makes StopReply class abstract, so that we can represent different types of stop replies such as StopReplyStop and StopReplyExit (there should also be a StopReplySignal, but I don't need that right now so I haven't implemented it yet). This prepares the ground for a new test I'm writing. Reviewers: eugene, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D41067 llvm-svn: 320820
* Fix 32-bit builds broken by 320813Pavel Labath2017-12-151-2/+2
| | | | | | cast to size_t to avoid narrowing error. llvm-svn: 320816
* ObjectFileELF: Add support for compressed sectionsPavel Labath2017-12-1510-3/+116
| | | | | | | | | | | | | | | | Summary: We use the llvm decompressor to decompress SHF_COMPRESSED sections. This enables us to read data from debug info sections, which are sometimes compressed, particuarly in the split-dwarf case. This functionality is only available if llvm is compiled with zlib support. Reviewers: clayborg, zturner Subscribers: emaste, mgorny, aprantl, lldb-commits Differential Revision: https://reviews.llvm.org/D40616 llvm-svn: 320813
* llgs-tests: Make addition of new tests easierPavel Labath2017-12-158-100/+189
| | | | | | | | | | | | | | | | | | | Summary: Adding a new test would require one to duplicate a significant part of the existing test that we have. This attempts to reduce that by moving some part of that code to the test fixture. The StandardStartupTest fixture automatically starts up the server and connects it to the client. I also add a more low-level TestBase fixture, which allows one to start up the client and server in a custom way (I am going to need this for the test I am writing). Reviewers: eugene, zturner Subscribers: lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D41066 llvm-svn: 320809
* [ExpressionParser] Fix evaluation failures due to mismatch in C++ versions.Davide Italiano2017-12-151-0/+8
| | | | | | | | | | | | | | | | | | | | | | | Clang recently switched to C++14 (with GNU extensions) as the default dialect, but LLDB didn't catch up. This causes failures as LLDB still evaluates ObjectiveC expressions as Objective C++ using C++98 as standard. There are things not available in C++98, including, e.g. nullptr. In some cases Objective-C `nil` is defined as `nullptr` so this causes an evaluation failure. Switch the default to overcome this issue (actually, currently lldb evaluates both C++11 and C++14 as C++11, but that seems a larger change and definitely could be re-evaluated in the future). No test as this is currently failing on the LLDB bots after the clang switch (so, de facto, there's a test already for it). This is a recommit, with a thinko fixed (the code was previously placed incorrectly). <rdar://problem/36011995> llvm-svn: 320778
* [ExpressionParser] Rollback C++98 as the standard for evaluating.Davide Italiano2017-12-151-8/+0
| | | | | | | Some ubuntu bots are failing with this patch in, let me unblock while I investigate. llvm-svn: 320769
* [ExpressionParser] Fix evaluation failures due to mismatch in C++ versions.Davide Italiano2017-12-141-0/+8
| | | | | | | | | | | | | | | | | | | | Clang recently switched to C++14 (with GNU extensions) as the default dialect, but LLDB didn't catch up. This causes failures as LLDB still evaluates ObjectiveC expressions as Objective C++ using C++98 as standard. There are things not available in C++98, including, e.g. nullptr. In some cases Objective-C `nil` is defined as `nullptr` so this causes an evaluation failure. Switch the default to overcome this issue (actually, currently lldb evaluates both C++11 and C++14 as C++11, but that seems a larger change and definitely could be re-evaluated in the future). No test as this is currently failing on the LLDB bots after the clang switch (so, de facto, there's a test already for it). <rdar://problem/36011995> llvm-svn: 320761
* [ClangASTContext] Remove dead stuff found fixing something else.Davide Italiano2017-12-141-75/+0
| | | | llvm-svn: 320759
* ObjectFile: remove ReadSectionData/MemoryMapSectionData mutual recursionPavel Labath2017-12-143-22/+1
| | | | | | | | | | | | | | | | | | | | | | | | Summary: These two functions were calling each other, while handling different branches of the if(IsInMemory()). This had a reason at some point in the past, but right now it's just confusing. I resolve this by removing the MemoryMapSectionData function and inlining the !IsInMemory branch into ReadSectionData. There isn't anything mmap-related in this function anyway, as the decision whether to mmap is handled at a higher level. This is a preparatory step to make ObjectFileELF be able to decompress compressed sections (I want to make sure that all calls reading section data are routed through a single piece of code). Reviewers: clayborg Subscribers: emaste, JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D41169 llvm-svn: 320705
* Remove stderr message from GDBRemoteCommunicationServerLLGSPavel Labath2017-12-141-7/+2
| | | | | | | | A similar error message is printed again in lldb-gdbserver.cpp, so the user will see the message twice. Also, this is generic library code, we shouldn't really be using stderr here. llvm-svn: 320704
* [IRExecutionUnit] Initialize uninititialized member variable.Davide Italiano2017-12-131-2/+2
| | | | | | | | Found by the ubsan build. <rdar://problem/31106358> llvm-svn: 320541
* [DataEncoder] Replace buggy versions of write functions.Davide Italiano2017-12-131-36/+8
| | | | | | | | | This fixes a previously introduced thinko, now that I have a better idea of what's going on :) <rdar://problem/35941757> llvm-svn: 320540
* [lldb] Set component when invoking add_llvm_install_targetsPetr Hosek2017-12-131-2/+4
| | | | | | | | | This is needed to ensure that the distribution and install-distribution targets work properly. Differential Revision: https://reviews.llvm.org/D41144 llvm-svn: 320537
* Add an #include to appease an older clang, NFCVedant Kumar2017-12-121-0/+1
| | | | | | | Add in a missing #include that AppleClang-900 complains about when building with -DLLVM_ENABLE_MODULES. llvm-svn: 320522
* Avoid module import in a textual header, NFCVedant Kumar2017-12-121-5/+2
| | | | | | This unbreaks the lldb modules build (-DLLVM_ENABLE_MODULES=On). llvm-svn: 320456
* [TestModulesInlineFunctions] This test now passes.Davide Italiano2017-12-121-1/+0
| | | | | | | | | Remove yet another spurious unexpected success. Ack'ed by Jim Ingham. Fixes PR25743. llvm-svn: 320454
* [TestCppScope] This test now passes on Darwin.Davide Italiano2017-12-121-5/+0
| | | | | | | | | I tested on x86-64 and Jason on embedded architectures. This cleans up another couple of reported unexpected successes. <rdar://problem/28623427> llvm-svn: 320452
* [testsuite] Remove even more testing vestiges.Davide Italiano2017-12-121-3/+0
| | | | | | | With this one, the number of unexpected successes for the LLDB test suite when building with clang ToT goes down to 18. llvm-svn: 320450
* Rollback [Testsuite] Rename this file from *m -> *mm.Davide Italiano2017-12-121-0/+0
| | | | | | | | After discussing this with Jim and Jason, I think my commit was actually sweeping the issue under the carpet rather than fixing it. I'll take a closer look between tonight and tomorrow. llvm-svn: 320447
* [testsuite] Remove testing failures vestiges.Davide Italiano2017-12-121-60/+0
| | | | | | | | | | | | | | | | | Some tests are failing on macOS when building with the in-tree clang, and this is because they're conditional on the version released. Apple releases using a different versioning number, but as these are conditional on clang < 7, they fail for clang ToT (which is 6.0). As a general solution, we actually need either a mapping between Apple internal release version and public ones. That said, I discussed this with Fred , and Apple Clang 6.0 seems to be old enough that we can remove this altogether (which means I can delay implementing the general purpose solution for a bit). Differential Revision: https://reviews.llvm.org/D41101 llvm-svn: 320444
* [lldb] Switch to add_llvm_install_targetsShoaib Meenai2017-12-121-10/+6
| | | | | | | | | | | This adds the install-*-stripped targets to LLDB, which are required for the install-distribution-stripped option. We also need to create some install-*-stripped targets manually, which are modeled after their corresponding install-* targets. Differential Revision: https://reviews.llvm.org/D41099 llvm-svn: 320443
* [test-suite] Un'XFAIL a test that's not failing anymore.Davide Italiano2017-12-111-1/+0
| | | | | | | | | | This is the first of a series of commits aiming to improve overall LLDB's hygiene. Feel free to shout at me in case I break something. <rdar://problem/30915340> llvm-svn: 320425
* [Testsuite] Rename this file from *m -> *mm.Davide Italiano2017-12-111-0/+0
| | | | | | | | Should hopefully bring the bots back. <rdar://problem/35976115> llvm-svn: 320422
* dotest.py: Correctly annotate lldbinline tests with debug info categoriesPavel Labath2017-12-111-1/+4
| | | | | | | This enables one to run all dwo tests with dotest.py --category dwo, or skip them with --skip-category. llvm-svn: 320377
* Add a StringList constructor to Args classPavel Labath2017-12-114-1/+18
| | | | | | | | | Host::GetEnvironment returns a StringList, but the interface for launching a process takes Args. The fact that we use two classes for representing an environment is not ideal, but for now we should at least have an easy way to convert between the two. llvm-svn: 320366
* Fix osx build broken in r320346Pavel Labath2017-12-111-1/+0
| | | | llvm-svn: 320349
* Move PseudoTerminal to the lldb_private namespacePavel Labath2017-12-1113-26/+23
| | | | | | | lldb_utility doesn't make sense, as it is no longer even living in the "utility" module. llvm-svn: 320346
* MainLoop: avoid infinite loop when pty slave gets closedPavel Labath2017-12-112-1/+21
| | | | | | | | | | | | | | | | | | | | | Summary: For ptys (at least on Linux), the end-of-file (closing of the slave FD) is signalled by the POLLHUP flag. We were ignoring this flag, which meant that when this happened, we would spin in a loop, continuously calling poll(2) and not making any progress. This makes sure we treat POLLHUP as a read event (reading will return 0), and we call the registered callback when it happens. This is the behavior our clients expect (and is consistent with how select(2) works). Reviewers: eugene, beanz Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D41008 llvm-svn: 320345
* Revert "[DataEncoder] Replace buggy versions of write functions."Davide Italiano2017-12-111-8/+36
| | | | | | | The commit exposes a bunch of failures in the LLDB testsuite that I need to analyze more carefully. Reverting for now. llvm-svn: 320341
* [DarwinLog] Remove other dead code. Found while reading this file.Davide Italiano2017-12-101-54/+0
| | | | llvm-svn: 320338
* [MachException] Garbage collect unused and dead code.Davide Italiano2017-12-101-27/+0
| | | | llvm-svn: 320337
* [DataEncoder] Replace buggy versions of write functions.Davide Italiano2017-12-101-36/+8
| | | | | | | | | | They cause an ubsan error when ran through the testsuite (store to misaligned address is UB). This commit kills two birds with one stone, as we also remove some code while fixing it. <rdar://problem/35941757> llvm-svn: 320335
* Change uses of strncpy in debugserver to strlcpyJason Molenda2017-12-095-15/+15
| | | | | | | | for better safety. <rdar://problem/32906923> llvm-svn: 320242
* Change the ordering that we search for kexts and kernels on the localJason Molenda2017-12-091-7/+22
| | | | | | | | | | | | | | | | | | | | | computer. When doing kernel debugging, lldb scrapes around a few well-known locations to find kexts and kernels. It builds up two lists - kexts and kernels with dSYM, and kexts and kernels without dSYMs. After both lists have failed to provide a file, then we'll call out to things like the DebugSymbols framework to find a kext/kernel. This meant that when you had a kext/kernel on the local computer that did not have debug information, lldb wouldn't consult DebugSymbols etc once it'd locked on to one of these no-debug-info binaries on the local computer. Reorder this so we give DebugSymbols etc a shot at finding a debug-info file before we use any of the no-debug-info binaries that were found on the system. <rdar://problem/34434440> llvm-svn: 320241
* Update PlatformDarwin::GetDeveloperDir to handle the twoJason Molenda2017-12-091-8/+13
| | | | | | | | | | | | | | | | | most common cases where the Xcode.app bundle puts lldb - either as a default part of the bundle, or in a toolchain subdirectory, so the platform subclasses can find files relative to this directory. Dropped support for handling the case where the lldb framework was in /Library/PrivateFrameworks. I think this was intended to handle the case where lldb is installed in / (outside the Xcode.app bundle) - but in that case, we can look in the raw directory file paths to find anything. <rdar://problem/35285622> llvm-svn: 320240
* [MachException] Avoid alignment UB, NFCVedant Kumar2017-12-082-4/+11
| | | | | | | | | | | Fix alignment UB in some Mach exception-handling logic. This lets us build lldb and debugserver with UBSan in trapping mode, and get further along in the testing process before a trap is encountered. rdar://35923991 llvm-svn: 320127
* Remove extant references to g_message_mutex, NFCVedant Kumar2017-12-082-17/+6
| | | | | | Thanks to Jim Ingham for providing the explanation! llvm-svn: 320126
* These tests don't depend on debug info format.Jim Ingham2017-12-071-0/+2
| | | | | | Mark them as such. llvm-svn: 320077
* Disable warnings related to anonymous types in the ObjC pluginVedant Kumar2017-12-073-1/+24
| | | | | | | | | | | This part of lldb make use of anonymous structs and unions. The usage is idiomatic and doesn't deserve a warning. Logic in the NSDictionary and NSSet plugins use anonymous structs in a manner consistent with the relevant Apple frameworks. Differential Revision: https://reviews.llvm.org/D40757 llvm-svn: 320071
* [SBBreakpointOptionCommon] Give this class an explicit destructor.Davide Italiano2017-12-072-0/+3
| | | | llvm-svn: 320067
* [SBBreakpoint] Outline some functions to prevent to be exported.Davide Italiano2017-12-071-51/+44
| | | | | | | | | | They're hidden, so all they cause is a linker warning. ld: warning: cannot export hidden symbol lldb::SBBreakpointNameImpl::operator==(lldb::SBBreakpointNameImpl const&) from tools/lldb/source/API/CMakeFiles/liblldb.dir/SBBreakpointName.cpp.o llvm-svn: 320066
* [Target] Remove commented out code. Found by inspection. NFCI.Davide Italiano2017-12-071-129/+0
| | | | llvm-svn: 320060
* Variable: Fix usage of uninitialised valuePavel Labath2017-12-071-7/+1
| | | | | | | | | | | | | | | | | | | | | Summary: Variable::GetValuesForVariableExpressionPath was passing an uninitialised value for the final_task_on_target argument. On my compiler/optimization level combo, the final_task_on_target happened to contain "dereference" in some circumstances, which produced hilarious results. The same is true for other arguments to the GetValueForExpressionPath call. The correct behavior here seems to be to just omit the arguments altogether and let the default behavior take place. Reviewers: jingham Subscribers: mehdi_amini, lldb-commits Differential Revision: https://reviews.llvm.org/D40557 llvm-svn: 320021
* [lldb] Use PRIVATE in target_link_librariesShoaib Meenai2017-12-061-1/+1
| | | | | | | | This is a follow-up to r319840. I guess none of the systems I'd tested on before had LLDB_SYSTEM_LIBS set, which is why I didn't see any local errors, but I'm surprised none of the bots caught it either. llvm-svn: 319953
* Fix the -Wunused-function warning properly (MachProcess.mm)Vedant Kumar2017-12-061-1/+1
| | | | | | | r319938 was not NFC, because it got the preprocessor guard wrong. Check WITH_FBS and WITH_BKS before defining SplitEventData. llvm-svn: 319943
* Fix const-correctness in RegisterContext methods, NFCVedant Kumar2017-12-063-10/+30
| | | | | | | | | | A few methods in RegisterContext classes accept const objects which are cast to a non-const thread_state_t. Drop const-ness more explicitly where we mean to do so. This fixes a slew of warnings. Differential Revision: https://reviews.llvm.org/D40821 llvm-svn: 319939
* Fix an -Wunused-function warning, NFCVedant Kumar2017-12-061-20/+22
| | | | llvm-svn: 319938
* Fix misc -Wcast-qual warnings, NFCVedant Kumar2017-12-067-22/+29
| | | | llvm-svn: 319937
* Remove no-op function pointer null checks, NFCVedant Kumar2017-12-064-50/+29
| | | | | | | | | | | | | | Null-checking functions which aren't marked weak_import is a no-op (the compiler rewrites the check to 'true'), regardless of whether a library providing its definition is weak-linked. If the deployment target is greater than the minimum requirement, the availability markup on APIs does not lower to weak_import. Remove no-op null checks to clean up the code and silence warnings. Differential Revision: https://reviews.llvm.org/D40812 llvm-svn: 319936
* Use a static_cast instead of a C cast, NFCVedant Kumar2017-12-061-1/+1
| | | | | | Pointed out by Davide Italiano in post-commit review. llvm-svn: 319935
OpenPOWER on IntegriCloud