summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove the expectedFlakeyDsym decorator. It's not useful anymore.Adrian Prantl2018-11-142-7/+0
| | | | llvm-svn: 346906
* update xcode project file for reproducers.Jason Molenda2018-11-141-4/+26
| | | | llvm-svn: 346900
* Fix some compilation failures introduced in recent patches.Zachary Turner2018-11-142-4/+5
| | | | | | | | | | This fixes two compilation failures: 1) Designated initializers are C++20. We can't use them in LLVM. 2) thread_result_t is not a pointer type on all platforms, so returning nullptr is an error. llvm-svn: 346873
* Move DataExtractorTest to unittests/UtilityPavel Labath2018-11-143-1/+1
| | | | | | | | The DataExtractor class itself was moved to Utility some time ago, but it seems this was not reflected in the location of the test code. Fix that. llvm-svn: 346867
* [LLDB] - Recommit r346848 "[LLDB] - Support the single file split DWARF.".George Rimar2018-11-1411-17/+255
| | | | | | | | | | | | | | | | | | | | | | | | | Test cases were updated to not use the local compilation dir which is different between development pc and build bots. Original commit message: [LLDB] - Support the single file split DWARF. DWARF5 spec describes a single file split dwarf case (when .dwo sections are in the .o files). Problem is that LLDB does not work correctly in that case. The issue is that, for example, both .debug_info and .debug_info.dwo has the same type: eSectionTypeDWARFDebugInfo. And when code searches section by type it might find the regular debug section and not the .dwo one. The patch fixes that. With it, LLDB is able to work with output compiled with -gsplit-dwarf=single flag correctly. Differential revision: https://reviews.llvm.org/D52403 llvm-svn: 346855
* Revert r346848 "[LLDB] - Support the single file split DWARF."George Rimar2018-11-1411-249/+17
| | | | | | | It broke BB: http://green.lab.llvm.org/green/job/lldb-cmake/12522/testReport/junit/LLDB/Breakpoint/single_file_split_dwarf_test/ llvm-svn: 346853
* Fix a crash when parsing incorrect DWARFPavel Labath2018-11-142-3/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: While parsing a childless compile unit DIE we could crash if the DIE was followed by any extra data (such as a superfluous end-of-children marker). This happened because the break-on-depth=0 check was performed only when parsing the null DIE, which was not correct because with a childless root DIE, we could reach the end of the unit without ever encountering the null DIE. If the compile unit contribution ended directly after the CU DIE, everything would be fine as we would terminate parsing due to reaching EOF. However, if the contribution contained extra data (perhaps a superfluous end-of-children marker), we would crash because we would treat that data as the begging of another compile unit. This fixes the crash by moving the depth=0 check to a more generic place, and also adds a regression test. Reviewers: clayborg, jankratochvil, JDevlieghere Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D54417 llvm-svn: 346849
* [LLDB] - Support the single file split DWARF.George Rimar2018-11-1411-17/+249
| | | | | | | | | | | | | | | | | | DWARF5 spec describes a single file split dwarf case (when .dwo sections are in the .o files). Problem is that LLDB does not work correctly in that case. The issue is that, for example, both .debug_info and .debug_info.dwo has the same type: eSectionTypeDWARFDebugInfo. And when code searches section by type it might find the regular debug section and not the .dwo one. The patch fixes that. With it, LLDB is able to work with output compiled with -gsplit-dwarf=single flag correctly. Differential revision: https://reviews.llvm.org/D52296 llvm-svn: 346848
* Suppress a "-Wliteral-conversion" compiler warning.Haojian Wu2018-11-141-1/+1
| | | | | error: implicit conversion from 'double' to 'uint64_t' (aka 'unsigned long') changes value from -0 to 0 [-Werror,-Wliteral-conversion] llvm-svn: 346841
* Fix the "make_unique is ambiguous" compiler error.Haojian Wu2018-11-142-4/+4
| | | | llvm-svn: 346839
* Fix a bug in the parsing of the LC_BUILD_VERSION Mach-O load command.Adrian Prantl2018-11-133-17/+228
| | | | | | | | | LC_BUILD_VERSION records are of variable length. The original code would use uninitialized memory when the size of a record was exactly 24. rdar://problem/46032185 llvm-svn: 346812
* [NativePDB] Add support for S_CONSTANT records.Zachary Turner2018-11-136-8/+1249
| | | | | | | | | | | | | | | | | clang-cl does not emit these, but MSVC does, so we need to be able to handle them. Because clang-cl does not generate them, it was a bit hard to write a test. So what I had to do was get an PDB file with some S_CONSTANT records in using cl and link, dump it using llvm-pdbutil dump -globals -sym-data to get the bytes of the records, generate the same object file using clang-cl but with -S to emit an assembly file, and replace all the S_LDATA32 records with the bytes of the S_CONSTANT records. This way, we can compile the file using llvm-mc and link it with lld-link. Differential Revision: https://reviews.llvm.org/D54452 llvm-svn: 346787
* [NativePDB] Improved support for nested type reconstruction.Zachary Turner2018-11-133-4/+224
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a previous patch, we pre-processed the TPI stream in order to build the reverse mapping from nested type -> parent type so that we could accurately reconstruct a DeclContext hierarchy. However, there were some issues. An LF_NESTTYPE record is really just a typedef, so although it happens to be used to indicate the name of the nested type and referring to the global record which defines the type, it is also used for every other kind of nested typedef. When we rebuild the DeclContext hierarchy, we want it to be as accurate as possible, which means that if we have something like: struct A { struct B {}; using C = B; }; We don't want to create two CXXRecordDecls in the AST each with the exact same definition. We just want to create one for B and then define C as an alias to B. Previously, however, it would not be able to distinguish between the two cases and it would treat A::B and A::C as being two classes each with separate definitions. We address the first half of improving the pre-processing logic so that only actual definitions are treated this way. Later, in a followup patch, we can handle the case of nested typedefs since we're already going to be enumerating the field list anyway and this patch introduces the general framework for distinguishing between the two cases. Differential Revision: https://reviews.llvm.org/D54357 llvm-svn: 346786
* [Cocoa] Implement formatter for the new NSDate representation.Davide Italiano2018-11-131-1/+63
| | | | | | <rdar://problem/46002786> llvm-svn: 346783
* Add GDB remote packet reproducer.Jonas Devlieghere2018-11-1332-260/+1599
| | | | llvm-svn: 346780
* Since ABI's now hold a process WP, they should be handedJim Ingham2018-11-1312-48/+12
| | | | | | | | out one per process rather than keeping a single global instance. Differential Revision: https://reviews.llvm.org/D54460 llvm-svn: 346775
* [lldb] Add synthetic frontend for _NSCallStackArrayKuba Mracek2018-11-123-3/+45
| | | | | | | | An Obj-C array type _NSCallStackArray is used in NSException backtraces. This patch adds a synthetic frontend for _NSCallStackArray, which now correctly returns frame PCs. Differential Revision: https://reviews.llvm.org/D44081 llvm-svn: 346708
* Re-land "Extract construction of DataBufferLLVM into FileSystem"Jonas Devlieghere2018-11-1218-73/+94
| | | | | | This fixes some UB in isLocal detected by the sanitized bot. llvm-svn: 346707
* [lldb] Extract more fields from NSException valuesKuba Mracek2018-11-124-8/+172
| | | | | | | | This patch teaches LLDB about more fields on NSException Obj-C objects, specifically we can now retrieve the "name" and "reason" of an NSException. The goal is to eventually be able to have SB API that can provide details about the currently thrown/caught/processed exception. Differential Revision: https://reviews.llvm.org/D43884 llvm-svn: 346695
* Revert "Extract construction of DataBufferLLVM into FileSystem"Davide Italiano2018-11-1218-94/+73
| | | | | | It broke the lldb sanitizer bots. llvm-svn: 346694
* Remove the last CURRENT_ARCH reference in Xcode's build scripts.Frederic Riss2018-11-121-1/+1
| | | | | | In the same spirit as r346443. llvm-svn: 346684
* [lldb] Refactor ObjC/NSException.cpp (cleanup, avoid code duplication). NFC.Kuba Mracek2018-11-121-75/+47
| | | | | | | | | | - Refactor reading of NSException fields into ExtractFields method to avoid code duplication. - Remove "m_child_ptr" field, as it's not used anywhere. - Clang-format. Differential Revision: https://reviews.llvm.org/D44073 llvm-svn: 346679
* [lldb] Fix "code requires global destructor" warning in g_architecture_mutexKuba Mracek2018-11-121-4/+7
| | | | | | Differential Revision: https://reviews.llvm.org/D44060 llvm-svn: 346673
* [PDB] Fix `vbases.test` requirementAleksandr Urakov2018-11-121-1/+1
| | | | | | Differential revision: https://reviews.llvm.org/D53506 llvm-svn: 346672
* [ClangASTContext] Extract VTable pointers from C++ objectsAleksandr Urakov2018-11-126-102/+160
| | | | | | | | | | | | | | | | | | This patch processes the case of retrieving a virtual base when the object is already read from the debuggee memory. To achieve that ValueObject::GetCPPVTableAddress was removed and was reimplemented in ClangASTContext (because access to the process is needed to retrieve the VTable pointer in general, and because this is the only place that used old version of ValueObject::GetCPPVTableAddress). This patch allows to use real object's VTable instead of searching virtual bases by offsets restored by MicrosoftRecordLayoutBuilder. PDB has no enough info to restore VBase offsets properly, so we have to read real VTable instead. Differential revision: https://reviews.llvm.org/D53506 llvm-svn: 346669
* [CMake] Allow version overrides with -DLLDB_VERSION_MAJOR/MINOR/PATCH/SUFFIXStefan Granitz2018-11-122-4/+15
| | | | | | | | | | | | | | Summary: This follows the approach in Clang. If no overrides are given, LLDB_VERSION_* is inferred from LLVM_VERSION_*. This mimics the current behaviour (PACKAGE_VERSION itself is generated from LLVM_VERSION_*). For in-tree builds LLVM_VERSION_* will be defined at this point already. For standalone builds, LLDBConfig.cmake is included after LLDBStandalone.cmake which includes LLVMConfig.cmake. Reviewers: labath, xiaobai Subscribers: mgorny, friss, aprantl, lldb-commits Differential Revision: https://reviews.llvm.org/D54333 llvm-svn: 346668
* [CMake] Fix: add_host_subdirectory source/Host/macosxStefan Granitz2018-11-121-1/+1
| | | | | | | | | | | | Summary: Typo introduced with https://reviews.llvm.org/D47929 Reviewers: teemperor Subscribers: mgorny, friss, lldb-commits Differential Revision: https://reviews.llvm.org/D54335 llvm-svn: 346667
* Fix an unused variable warning. NFCAlexander Kornienko2018-11-121-0/+2
| | | | llvm-svn: 346651
* Remove header grouping comments.Jonas Devlieghere2018-11-11733-2684/+26
| | | | | | | | This patch removes the comments grouping header includes. They were added after running IWYU over the LLDB codebase. However they add little value, are often outdates and burdensome to maintain. llvm-svn: 346626
* Remove comments after header includes.Jonas Devlieghere2018-11-11168-936/+932
| | | | | | | | | | This patch removes the comments following the header includes. They were added after running IWYU over the LLDB codebase. However they add little value, are often outdates and burdensome to maintain. Differential revision: https://reviews.llvm.org/D54385 llvm-svn: 346625
* Add missing includeJonas Devlieghere2018-11-101-0/+1
| | | | llvm-svn: 346599
* Extract construction of DataBufferLLVM into FileSystemJonas Devlieghere2018-11-1018-73/+94
| | | | | | | | | | This moves construction of data buffers into the FileSystem class. Like some of the previous refactorings we don't translate the path yet because the functionality hasn't been landed in LLVM yet. Differential revision: https://reviews.llvm.org/D54272 llvm-svn: 346598
* Unbreak the linux bot from the previous commit. Fred needed to useJason Molenda2018-11-101-0/+6
| | | | | | | | | some of the macros from mach/exc_resource.h to decode EXC_RESOURCE, but that header doesn't exist on non-apple platforms and StopInfoMachException.cpp needs to build on those systems. EXC_RESOURCE won't be decoded when lldb is built on non-darwin systems. llvm-svn: 346573
* Add extra diagnostics to testAdrian Prantl2018-11-101-0/+4
| | | | llvm-svn: 346572
* Enable listening for EXC_RESOURCE events, and format machJason Molenda2018-11-102-19/+81
| | | | | | | | | | | | | | | | | | | | event as a thread stop reason if we receive one, using some macros to decode the payload. Patch originally written by Fred Riss, with a few small changes by myself. Writing a test for this is a little tricky because the mach exception data interpretation relies on header macros or function calls - it may change over time and writing a gdb_remote_client test for this would break as older encoding interpretation is changed. I'll tak with Fred about this more, but neither of us has been thrilled with the kind of tests we could write for it. <rdar://problem/13097323>, <rdar://problem/40144456> llvm-svn: 346571
* Work with a gdb-remote target that doesn't handle theJason Molenda2018-11-093-2/+77
| | | | | | | | | | | | | | | | | | | | | | | | | qWatchpointSupportInfo packet correctly. In GDBRemoteCommunicationClient::GetWatchpointSupportInfo, if the response to qWatchpointSupportInfo does not include the 'num' field, then we did not get an answer we understood, mark this target as not supporting that packet. In Target.cpp, rename the very confusingly named CheckIfWatchpointsExhausted to CheckIfWatchpointsSupported, and check the error status returned by Process::GetWatchpointSupportInfo. If we cannot determine what the number of supported watchpoints are, assume that they will work. We'll handle the failure later when we try to create/enable the watchpoint if the Z2 packet isn't supported. Add a gdb_remote_client test case. <rdar://problem/42621432> llvm-svn: 346561
* Remove llvm include from debugserver, change Jason Molenda2018-11-092-5/+3
| | | | | | | | LLVM_FALLTHROUGH's to [[clang::fallthrough]] - debugserver is only ever compiled on darwin systems with clang. llvm-svn: 346553
* Add missing includeAdrian Prantl2018-11-091-0/+1
| | | | llvm-svn: 346527
* Add missing includeAdrian Prantl2018-11-091-0/+1
| | | | llvm-svn: 346525
* Annotate switch with LLVM_FALLTHROUGHAdrian Prantl2018-11-092-2/+3
| | | | llvm-svn: 346519
* [NativePDB] Fix completion of enum types.Zachary Turner2018-11-092-1/+3
| | | | | | | | | | | | | This was originally submitted in a patch which fixed two unrelated bugs at the same time. This portion of the fix was reverted because it broke several other things. However, the fix employed originally was totally wrong, and attempted to change something in the ValueObject printer when actually the bug was in the NativePDB plugin. We need to mark forward enum decls as having external storage, otherwise we won't be asked to complete them when the time comes. This patch implements the proper fix, and updates tests accordingly. llvm-svn: 346517
* [NativePDB] Add support for bitfield records.Zachary Turner2018-11-093-4/+86
| | | | | | | | | Bitfields are represented as LF_MEMBER records whose TypeIndex points to an LF_BITFIELD record that describes the bit width, bit offset, and underlying type of the bitfield. All we need to do is resolve these when resolving record types. llvm-svn: 346511
* Resubmit "Fix bug in PE/COFF plugin."Zachary Turner2018-11-094-7/+49
| | | | | | | | | | The original commit was actually 2 unrelated bug fixes, but it turns out the second bug fix wasn't quite correct, so the entire patch was reverted. Resubmitting this half of the patch by itself, then will follow up with a new patch which fixes the rest of the issue in a more appropriate way. llvm-svn: 346505
* revert rL346478Kadir Cetinkaya2018-11-091-2/+2
| | | | | | | | | | Summary: Reviewers: Subscribers: llvm-svn: 346502
* [lldb] Fix signature in test to match rL346453Kadir Cetinkaya2018-11-091-2/+2
| | | | llvm-svn: 346478
* Revert "[FileSystem] Make use of FS in TildeExpressionResolver"Jonas Devlieghere2018-11-0911-43/+21
| | | | | | | | The whole point of this change was making it possible to resolve paths without depending on the FileSystem, which is not what I did here. Not sure what I was thinking... llvm-svn: 346466
* Fix a test whose output changed.Zachary Turner2018-11-091-2/+2
| | | | | | | | | A previous commit fixed an issue with our AST generation where we were outputting enum decls incorrectly. But we forgot to update the test output. This patch updates the test output accordingly. llvm-svn: 346459
* [FileSystem] Make use of FS in TildeExpressionResolverJonas Devlieghere2018-11-0911-21/+43
| | | | | | | | In order to call real_path from the TildeExpressionResolver we need access to the FileSystem. Since the resolver lives under utility we have to pass in the FS. llvm-svn: 346457
* Fix CMake build when building with -fmodules-local-submodule-visibility.Adrian Prantl2018-11-091-0/+2
| | | | llvm-svn: 346456
* Update FileSpec constructor signatureJonas Devlieghere2018-11-081-2/+5
| | | | llvm-svn: 346449
OpenPOWER on IntegriCloud