summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
* Add a symbols subcommand to lldb-test.Zachary Turner2017-12-022-1/+36
| | | | | | Differential Revision: https://reviews.llvm.org/D40745 llvm-svn: 319599
* Don't use llvm::EnablePrettyStackTrace on macOS.Jim Ingham2017-12-021-0/+2
| | | | | | | | | | | | | | | | | LLDB.framework gets loaded into Xcode and other frameworks, and this is inserting a signal handler into the process even when lldb isn't used. I have a bunch of reports of this SignalHandler blowing out the stack, which renders crash reports for the crash useless. And in any case libraries really shouldn't be installing signal handlers. I only turned this off for APPLE platforms, I'll let the maintainers of other platforms decide what policy they want to have w.r.t. this. llvm-svn: 319598
* Fix warning in DynamicLoaderDarwinKernel.cpp, NFCVedant Kumar2017-12-011-1/+1
| | | | llvm-svn: 319597
* Fix warnings in JSON.cpp, NFCVedant Kumar2017-12-011-3/+0
| | | | | | These asserts are no-ops, and are supplanted by -Wcovered-switch. llvm-svn: 319596
* Fix warnings in DNBDataRef.cpp, NFCVedant Kumar2017-12-011-6/+6
| | | | llvm-svn: 319595
* Prevent vain lldb::user_id_t 0xffffffff lookupsJan Kratochvil2017-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | I have found LLDB commonly looks up lldb::user_id_t 0xffffffff failing to find its DIE. One would rather expect LLDB_INVALID_UID == 0xffffffffffffffff in such case. DWARFASTParserClang.cpp:495 492 type_sp.reset( 493 new Type(die.GetID(), dwarf, type_name_const_str, byte_size, NULL, 494 DIERef(encoding_uid).GetUID(dwarf), encoding_data_type, 495 &decl, clang_type, resolve_state)); encoding_uid = (DWARFFormValue) {m_cu = 0x0, m_form = 0, m_value = {value = {uval = 0, sval = 0, cstr = 0x0}, data = 0x0}} -> DIERef::DIERef(const DWARFFormValue &form_value = {m_cu = 0x0, m_form = 0, m_value = {value = {uval = 0, sval = 0, cstr = 0x0}, data = 0x0}}) -> (DIERef) {cu_offset = 0xffffffff, die_offset = 0xffffffff} -> lldb::user_id_t DIERef::GetUID(SymbolFileDWARF *dwarf = 0x61d00000b480) const -> Type::Type(lldb::user_id_t encoding_uid = 0xffffffff) But 0xffffffff != #define LLDB_INVALID_UID UINT64_MAX Differential revision: https://reviews.llvm.org/D37492 llvm-svn: 319580
* Kill struct IOVECPavel Labath2017-12-019-24/+10
| | | | | | | | | | | struct iovec is used as an interface to system (posix) api's. As such, we shouldn't be using it in os-independent code, and we shouldn't be defining our own iovec replacements. Fortunately, its usage was not very widespread, so the removal was very easy -- I simply moved a couple declarations into os-specific code. llvm-svn: 319536
* ClangASTContext::ParseClassTemplateDecl doesn't always succeed.Jim Ingham2017-12-011-1/+11
| | | | | | | | | When it does, it returns a NULL ClassTemplateDecl. Don't use it if it is NULL... <rdar://problem/35672107> llvm-svn: 319516
* Add lldb-test.Zachary Turner2017-12-017-0/+650
| | | | | | | | | | | | | | | | | | | | | This is basically a proof-of-concept and starting point for having a testing-centric tool in LLDB. I'm sure this leaves a lot of room to be desired, but this at least allows us to have something to build on. Right now there is only one command, the `module-sections` command, and I created this command not because it was particularly special, but because it addressed an immediate use case and was extremely simple. Run the tool as `lldb-test module-sections <path-to-object>`. Feel free to add testing related stuff to your heart's content after this goes in. Implementing the commands themselves takes some work, but once they're there they can be reused without writing any code and result in very easy to use and maintain tests. Differential Revision: https://reviews.llvm.org/D40636 llvm-svn: 319504
* We had a situation where a kext was inlined into the kernel,Jason Molenda2017-11-301-0/+10
| | | | | | | | | | | | but still listed in the kernel's kext table with the kernel binary UUID. This resulted in the kernel text section being loaded at the kext address and problems ensuing. Instead, if there is a kext with the same UUID as the kernel, lldb should skip over it. <rdar://problem/35757689> llvm-svn: 319500
* [lldb] A few minor fixes in TaskPoolAlexander Shaposhnikov2017-11-303-6/+25
| | | | | | | | | | | | | 1. Move TaskPool into the namespace lldb_private. 2. Add missing std::move in TaskPoolImpl::Worker. 3. std::thread::hardware_concurrency may return 0, handle this case correctly. Differential revision: https://reviews.llvm.org/D40587 Test plan: make check-all llvm-svn: 319492
* Fix this test so that the breakpoints you set areJim Ingham2017-11-302-2/+6
| | | | | | | | unambiguously on one bit of code. On macOS these lines mapped to two distinct locations, and that was artificially throwing off the test. llvm-svn: 319472
* Remove a long out-of-date comment.Jim Ingham2017-11-301-1/+0
| | | | llvm-svn: 319454
* 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
OpenPOWER on IntegriCloud