summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* Add a test case for open bug 35480Pavel Labath2017-11-305-0/+82
| | | | | | | The test is about failing to hit breakpoints in global constructors in shared libraries. llvm-svn: 319443
* Fix assertion in ClangASTContextPavel Labath2017-11-309-31/+36
| | | | | | | | | | | | | | | | | | | | | | Summary: llvm::APSInt(0) asserts because it creates an int with bit-width 0 and not (as I thought) a value 0. Theoretically it should be sufficient to change this to APSInt(1), as the intention there was that the value of the first argument should be ignored if the type is invalid, but that would look dodgy. Instead, I use llvm::Optional to denote an invalid value and use a special struct instead of a std::pair, to reduce typing and increase clarity. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D40615 llvm-svn: 319414
* refactor: Simplify loop with DWARFCompileUnit::ExtractJan Kratochvil2017-11-301-6/+2
| | | | | | | | Forgotten small simplification in D40212. Differential revision: https://reviews.llvm.org/D40635 llvm-svn: 319402
* Fix the gtest target for the move of ArchSpecTest.cpp from Core to Utility.Jim Ingham2017-11-301-1/+1
| | | | | | <rdar://problem/35562389> llvm-svn: 319389
* refactor: Unify+simplify DWARFCompileUnit ctor+Clear() into in-class ↵Jan Kratochvil2017-11-294-80/+47
| | | | | | | | | | | | | | initializers + Extract() It has no functionality effect. I was concerned about the worse performance of DWARFDebugInfo::Parse this way of allocating+destroying a CU for each iteration but I see it is now used only by DWARFDebugInfo::Dump so that is no longer a problem. Differential revision: https://reviews.llvm.org/D40212 llvm-svn: 319359
* Add elf-core/RegisterUtilities.{cpp,h} to the project file.Jim Ingham2017-11-281-0/+6
| | | | llvm-svn: 319226
* Update remote debugging page with many more details.Greg Clayton2017-11-281-8/+132
| | | | llvm-svn: 319213
* Simplify UUID constructorsStephane Sezer2017-11-281-3/+2
| | | | | | | | | | | | Summary: This remove a small amount of duplicated code. Reviewers: clayborg, zturner, davide Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D40536 llvm-svn: 319191
* elf-core: Convert remaining register context to use register set mapsPavel Labath2017-11-2823-195/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In https://reviews.llvm.org/D39681, we started using a map instead passing a long list of register sets to the ppc64le register context. However, existing register contexts were still using the old method. This converts the remaining register contexts to use this approach. While doing that, I've had to modify the approach a bit: - the general purpose register set is still kept as a separate field, because this one is always present, and it's parsing is somewhat different than that of other register sets. - since the same register sets have different IDs on different operating systems, but we use the same register context class to represent different register sets, I've needed to add a layer of indirection to translate os-specific constants (e.g. NETBSD::NT_AMD64_FPREGS) into more generic terms (e.g. floating point register set). While slightly more complicated, this setup allows for better separation of concerns. The parsing code in ProcessElfCore can focus on parsing OS-specific core file notes, and can completely ignore architecture-specific register sets (by just storing any unrecognised notes in a map). These notes will then be passed on to the architecture-specific register context, which can just deal with architecture specifics, because the OS-specific note types are hidden in a register set description map. This way, adding an register set, which is already supported on other OSes, to a new OS, should in most cases be as simple as adding a new entry into the register set description map. Differential Revision: https://reviews.llvm.org/D40133 llvm-svn: 319162
* Fix floating point register write on new x86 linux kernelsPavel Labath2017-11-285-12/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: New linux kernels (on systems that support the XSAVES instruction) will not update the inferior registers unless the corresponding flag in the XSAVE header is set. Normally this flag will be set in our image of the XSAVE area (since we obtained it from the kernel), but if the inferior has never used the corresponding register set, the respective flag can be clear. This fixes the issue by making sure we explicitly set the flags corresponding to the registers we modify. I don't try to precisely match the flags to set on each write, as the rules could get quite complicated -- I use a simpler over-approximation instead. This was already caught by test_fp_register_write, but that was only because the code that ran before main() did not use some of the register sets. Since nothing in this test relies on being stopped in main(), I modify the test to stop at the entry point instead, so we can be sure the inferior did not have a chance to access these registers. Reviewers: clayborg, valentinagiusti Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D40434 llvm-svn: 319161
* Remove some duplicated code in UUID.cppStephane Sezer2017-11-281-8/+1
| | | | | | | | | | | | | | Summary: Formatting needs to be done only once. Ran check-lldb and nothing changes. Reviewers: clayborg, davide Reviewed By: clayborg, davide Subscribers: zturner, davide, lldb-commits Differential Revision: https://reviews.llvm.org/D40519 llvm-svn: 319132
* Mark UUID::GetByteSize() constStephane Sezer2017-11-272-2/+2
| | | | | | | | | | | | | | | | Summary: This method doesn't modify anything in the object it's called on so we can mark it const to make it usable in a const context. Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D40517 llvm-svn: 319095
* Remove custom TimePoint-formatting codePavel Labath2017-11-271-20/+3
| | | | | | | | This was a temporary thing, until llvm has proper support for formatting time. That time has come, so we can remove the relevant code. There should be no change in the format of the time. llvm-svn: 319048
* dotest: Mark more android targets as chattyPavel Labath2017-11-271-1/+1
| | | | | | | | | | New android ndk linker started adding more flags to the produced binaries, which causes older dynamic linkers display warnings to stderr about unsupported flags. This interferes with our stderr tests. Extend the hasChattyStderr function to catch these targets as well. llvm-svn: 319028
* Due to changes for DWZ I would need to update those such as renaming it toJan Kratochvil2017-11-252-27/+0
| | | | | | | | SetFileOffset. Differential revision: https://reviews.llvm.org/D40458 llvm-svn: 318981
* elf-core: Split up parsing code into os-specific functionsPavel Labath2017-11-235-226/+311
| | | | | | | | | | | | | | | | | | Summary: We've had a single function responsible for splitting a core segment into notes, and parsing the notes themselves, bearing in mind variations between 4 supported OS types. This commit splits that code into 5 pieces: - (os-independent) code for splitting a segment into individual notes - per-os function for parsing the notes into thread information Reviewers: clayborg, krytarowski, emaste, alexandreyy, kettenis Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D40311 llvm-svn: 318903
* Run clang-format on source/Host/common/Symbols.cppStephane Sezer2017-11-221-21/+22
| | | | | | I saw a bunch of style errors so this fixes them. llvm-svn: 318886
* Remove extra minuses from command optionTatyana Krasnukha2017-11-221-1/+1
| | | | | | | | | | | | Reviewers: labath, abidh, clayborg, ki.stfu Reviewed By: labath, abidh, clayborg, ki.stfu Subscribers: clayborg, ki.stfu, lldb-commits Differential Revision: https://reviews.llvm.org/D40022 llvm-svn: 318846
* Remove unused variable.Tatyana Krasnukha2017-11-221-1/+1
| | | | llvm-svn: 318833
* Test commit. Fix typo in comment.Tatyana Krasnukha2017-11-221-1/+1
| | | | llvm-svn: 318832
* [Expression parser] Remove logging of field that is no longer in clang's ↵Craig Topper2017-11-201-1/+0
| | | | | | | | TargetOptions struct. The Reciprocals field was moved to CodeGenOptions. I don't think lldb was really using this field so I'm just removing the mention. llvm-svn: 318664
* Remove 2 unused methods DWARFDebugInfo::Find and their FindCallbackStringJan Kratochvil2017-11-192-81/+0
| | | | | | Differential revision: https://reviews.llvm.org/D40216 llvm-svn: 318631
* Add comments to DWARFCompileUnit length fields/methodsJan Kratochvil2017-11-191-9/+8
| | | | | | Differential revision: https://reviews.llvm.org/D40211 llvm-svn: 318626
* [ABI] Remove dead code that was copy-pasted all around. NFCI.Davide Italiano2017-11-182-82/+0
| | | | llvm-svn: 318580
* [Module] Throw away some more commented code. NFCI.Davide Italiano2017-11-181-37/+0
| | | | llvm-svn: 318579
* [ABI/SysV] Remove more dead code. NFCI.Davide Italiano2017-11-181-42/+0
| | | | llvm-svn: 318577
* [Core] Garbage collect dead code untouched in years. NFCI.Davide Italiano2017-11-181-31/+0
| | | | | | | This sketching can be resurrected if anybody needs it, although I doubt is relevant these days. llvm-svn: 318576
* [lldb] Ensure that dwo/dwp are not double-indexedAlexander Shaposhnikov2017-11-175-3/+42
| | | | | | | | | | | | | DWO/DWP should not be indexed directly. Instead, the corresponding base file should be used. This diff adds an assert to DWARFCompileUnit::Index and adjusts the methods SymbolFileDWARF::FindCompleteObjCDefinitionTypeForDIE, SymbolFileDWARF::GetObjCMethodDIEOffsets accordingly. Differential revision: https://reviews.llvm.org/D39825 llvm-svn: 318554
* Fix LLDB build.Eugene Zemtsov2017-11-171-0/+1
| | | | | | It was broken by r318489. llvm-svn: 318504
* Update xcode project file to build new ppc64le files.Jason Molenda2017-11-173-3/+27
| | | | llvm-svn: 318500
* Recognize another magic token sent in the LaunchInfo's EventData.Jim Ingham2017-11-171-29/+71
| | | | | | <rdar://problem/32505028> llvm-svn: 318496
* "source list -a" was calling DisplaySourceLinesWithNumbers incorrectly.Jim Ingham2017-11-171-4/+5
| | | | | | | | The parameters were just passed in the wrong order. <rdar://problem/35150446> llvm-svn: 318495
* Fixed up to use a class for the commands, renamed the commands and added a ↵Greg Clayton2017-11-161-68/+181
| | | | | | way to just dump the compile unit full paths and optionally their support files with the new "dump-files"command. llvm-svn: 318424
* Implement core dump debugging for PPC64lePavel Labath2017-11-1614-54/+597
| | | | | | | | | | | | | | | Summary: Implement core dump debugging for PPC64le. Reviewers: labath Reviewed By: labath Subscribers: JDevlieghere, krytarowski, clayborg, labath, lbianc, nemanjai, gut, anajuliapc, mgorny, kbarton, lldb-commits Differential Revision: https://reviews.llvm.org/D39681 Patch by Alexandre Yukio Yamashita <alexandre.yamashita@eldorado.org.br> llvm-svn: 318399
* Fix alignment of arm64 fpu register context structureJason Molenda2017-11-163-4/+4
| | | | | | | | | | so it has the same padding as the kernel's definition which is written in terms of uint128_t. Original patch by Ryan Mansfield. <rdar://problem/35468499> llvm-svn: 318357
* [POSIX] Replace assert with llvm_unreachable(). NFCI.Davide Italiano2017-11-151-1/+1
| | | | llvm-svn: 318348
* Roll back r318260 because it is causing the windows bot toJason Molenda2017-11-152-2/+2
| | | | | | | | | | break. The alignas(__uint128_t) is not recognized with MSVC it looks like. Zachary, is there a similar type on windows? I suppose I can go with alignas(16) here but I'd prefer to specify the type alignment that I want & let the ABI dictate how much padding is required. llvm-svn: 318262
* Two small fixes to handle arm64 fpu register contexts in Jason Molenda2017-11-152-2/+2
| | | | | | | | | a Mach-O file load command correctly, patch by Ryan Mansfield. <rdar://problem/35468499> llvm-svn: 318260
* Update xcode project file to track ArchSpec.cppJason Molenda2017-11-141-6/+12
| | | | | | move and LibCxxBitset.cpp addition. llvm-svn: 318218
* Add check for self-assignment. NFCDon Hinton2017-11-142-0/+6
| | | | | | Differential Revision: https://reviews.llvm.org/D39578 llvm-svn: 318164
* Add a data formatter for libc++ std::bitsetPavel Labath2017-11-147-0/+197
| | | | | | | | | | Reviewers: jingham, EricWF Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D39966 llvm-svn: 318145
* Reformat a comment. NFC.Stephane Sezer2017-11-131-2/+1
| | | | llvm-svn: 318079
* Fix netbsd, freebsd and osx builds for ArchSpec movePavel Labath2017-11-1314-19/+15
| | | | llvm-svn: 318052
* Move ArchSpec to the Utility modulePavel Labath2017-11-1393-204/+104
| | | | | | | | | | | | | The rationale here is that ArchSpec is used throughout the codebase, including in places which should not depend on the rest of the code in the Core module. This commit touches many files, but most of it is just renaming of #include lines. In a couple of cases, I removed the #include ArchSpec line altogether, as the file was not using it. In one or two places, this necessitated adding other #includes like lldb-private-defines.h. llvm-svn: 318048
* Remove last Host usage from ArchSpecPavel Labath2017-11-135-13/+23
| | | | | | | | | | | | | | | | | | | | | | | Summary: In D39387, I was quick to jump to conclusion that ArchSpec has no external dependencies. It turns there still was one call to HostInfo::GetArchitecture left -- for implementing the "systemArch32" architecture and friends. Since GetAugmentedArchSpec is the place we handle these "incomplete" triples that don't specify os or vendor and "systemArch" looks very much like an incomplete triple, I move its handling there. After this ArchSpec *really* does not have external dependencies, and I'll move it to the Utility module as a follow-up. Reviewers: zturner, clayborg, jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D39896 llvm-svn: 318046
* CompilerType: Add ability to retrieve an integral template argumentPavel Labath2017-11-1320-155/+211
| | | | | | | | | | | | | | | | | | | | | | Summary: Despite it's name, GetTemplateArgument was only really working for Type template arguments. This adds the ability to retrieve integral arguments as well (which I've needed for the std::bitset data formatter). I've done this by splitting the function into three pieces. The idea is that one first calls GetTemplateArgumentKind (first function) to determine the what kind of a parameter this is. Based on that, one can then use specialized functions to retrieve the correct value. Currently, I only implement two of these: GetTypeTemplateArgument and GetIntegralTemplateArgument. Reviewers: jingham, clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D39844 llvm-svn: 318040
* Revert "[lldb] Use OrcMCJITReplacement rather than MCJIT as the underlying ↵Pavel Labath2017-11-131-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JIT for LLDB" This commit really did not introduce any functional changes (for most people) but it turns out it's not for the reason we thought it was. The reason wasn't that Orc is a perfect drop-in replacement for MCJIT, but it was because we were never using Orc in the first place, as it was not initialized. Orc's initialization relies on a global constructor in the LLVMOrcJIT.a. Since this archive does not expose any symbols referenced from other object files, it does not get linked into liblldb when linking against llvm components statically. However, in an LLVM_LINK_LLVM_DYLIB=On build, LLVMOrcJit.a is linked into libLLVM.so using --whole-archive, so the global constructor does end up firing. The result of using Orc jit is pr34194, where lldb fails to evaluate even very simple expressions. This bug can be reproduced in non-LLVM_LINK_LLVM_DYLIB builds by making sure Orc jit is linked into liblldb, for example by #including llvm/ExecutionEngine/OrcMCJITReplacement.h in IRExecutionUnit.cpp (and adding OrcJIT as a dependency to the relevant CMakeLists.txt file). The bug reproduces (at least) on linux and osx. The root cause of the bug seems to be related to relocation processing. It seems Orc processes relocations earlier than the system it is replacing. This means the relocation processing happens before we have had a chance to remap section load addresses to reflect their address in the target process memory, so they end up pointing to locations in the lldb's address space instead. I am not sure whether this is a bug in Orc jit, or in how we are using it from lldb, but in any case it is preventing us from using Orc right now. Reverting this fixes LLVM_LINK_LLVM_DYLIB build, and makes it clear that we are in fact *not* using Orc, and we never really were. This reverts commit r279327. llvm-svn: 318039
* Added a way to dump the full paths to all source files in a module that has ↵Greg Clayton2017-11-101-0/+16
| | | | | | debug info. llvm-svn: 317945
* [lldb] Remove unused method declarationAlexander Shaposhnikov2017-11-101-4/+0
| | | | | | | | | | FindCompleteObjCDefinitionType is not used anywhere and there is no implementation of it, only a declaration. Test plan: make check-lldb Differential revision: https://reviews.llvm.org/D39884 llvm-svn: 317919
* Clean up NativeRegisterContextPavel Labath2017-11-1033-337/+215
| | | | | | | | | | | | | | | | | | | | | Summary: This commit removes the concrete_frame_idx member from NativeRegisterContext and related functions, which was always set to zero and never used. I also change the native thread class to store a NativeRegisterContext as a unique_ptr (documenting the ownership) and make sure it is always initialized (most of the code was already blindly dereferencing the register context pointer, assuming it would always be present -- this makes its treatment consistent). Reviewers: eugene, clayborg, krytarowski Subscribers: aemerson, sdardis, nemanjai, javed.absar, arichardson, kristof.beyls, kbarton, uweigand, alexandreyy, lldb-commits Differential Revision: https://reviews.llvm.org/D39837 llvm-svn: 317881
OpenPOWER on IntegriCloud