summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* Minidump/Windows: Fix module lookupPavel Labath2019-08-094-0/+69
| | | | | | | | | | | | | | | | | | | | Summary: When opening a minidump, we were failing to find an executable because we were searching for i386-unknown-windows, whereas we recognize the pe/coff files as i386-pc-windows. This fixes the triple computation code in the minidump parser to match pe/coff, and adds an appropriate test. NB: I'm not sure setting the vendor to "pc" is really correct for arm(64) windows, but right now that seems to match what we do in the pe/coff case (ArchSpec.cpp:935). Reviewers: clayborg, amccarth Subscribers: javed.absar, kristof.beyls, rnk, markmentovai, lldb-commits Differential Revision: https://reviews.llvm.org/D65955 llvm-svn: 368416
* [lldb][NFC] Clean up logging in IRForTargetRaphael Isemann2019-08-091-167/+100
| | | | llvm-svn: 368415
* [lldb][NFC] Remove last C string uses from IRForTargetRaphael Isemann2019-08-091-10/+8
| | | | llvm-svn: 368406
* [lldb][NFC] Use range-based for-loops in IRForTargetRaphael Isemann2019-08-091-108/+40
| | | | llvm-svn: 368405
* [lldb][NFC] Modernize IRForTarget::CreateResultVariableRaphael Isemann2019-08-081-21/+20
| | | | llvm-svn: 368359
* [lldb][NFC] Move to StringRef in some places in IRForTargetRaphael Isemann2019-08-081-37/+32
| | | | llvm-svn: 368353
* [lldb] Fix HAVE_LIBCOMPRESSIONHaibo Huang2019-08-082-4/+2
| | | | | | | | | | | | | | | | Summary: This test doesn't make sense. Change to be consistent with what we did in GDBRemoteCommunication.cpp. Reviewers: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D65965 llvm-svn: 368352
* [lldb][NFC] Directly use StringRef instead of temporary std::stringRaphael Isemann2019-08-081-13/+12
| | | | llvm-svn: 368346
* SymbolFileDWARF: Unconditionally scan through clang modules. NFCishAdrian Prantl2019-08-081-3/+7
| | | | | | | | | | | | | When looking up a type by name, also scan through any referenced Clang modules regardsless of whether a type with this name has been found. This is NFCish (= a potential performance regression) for Clang projects, but necessary in mixed Swift and Objective-C projects (and tested in swift-lldb). This only affects projects compiled with -gmodules that were not run through dsymutil. llvm-svn: 368345
* Fix a comment which was incorrect.Jim Ingham2019-08-081-1/+1
| | | | llvm-svn: 368340
* Remove unused and undocumented data_offset parameter (NFC)Adrian Prantl2019-08-0811-21/+19
| | | | | | | | | Value::GetValueAsData() takes an undocumented parameter called data_offset that is always 0. Differential Revision: https://reviews.llvm.org/D65910 llvm-svn: 368330
* [lldb][NFC] Simplify return in MaybeHandleVariableRaphael Isemann2019-08-081-9/+4
| | | | | | This function anyway returns true, no need to do this extra work. llvm-svn: 368309
* [lldb][CMake] Disable modules in Xcode projectsStefan Granitz2019-08-081-0/+3
| | | | | | | | | | | | | | | | Summary: Apparently, module-enabled builds clash with Xcode's analysis. Reviewers: aprantl, jingham, davide, teemperor Reviewed By: davide Subscribers: mgorny, lldb-commits, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D65874 llvm-svn: 368294
* ObjectFileELF: Convert a unit test to a lit testPavel Labath2019-08-084-242/+93
| | | | | | It is much easier to test this functionality via lldb-test. llvm-svn: 368289
* Fix LLDB_CONFIGURATION_DEBUG builds for the GetSymbolVendor removalPavel Labath2019-08-081-6/+2
| | | | | | fix one usage that is ifdefed-out in non-debug builds. llvm-svn: 368279
* Add a missing include to SymbolFilePDBTests.cppPavel Labath2019-08-081-0/+1
| | | | | | This should _really_ fix the pdb unit tests. llvm-svn: 368271
* Remove xcode-specific Config.hPavel Labath2019-08-082-40/+1
| | | | | | | | | | | | | | | | | | Summary: Now that the xcode project is removed, we no longer need/use the hand-maintained Config.h file, as everything is configured through cmake. This patch deletes that file and reverts some of the changes from r300372, which were made to support this use case. Reviewers: sgraenitz, beanz Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D65862 llvm-svn: 368266
* Fix PDB unit tests for the GetSymbolVendor deletionPavel Labath2019-08-081-36/+15
| | | | llvm-svn: 368265
* Remove Module::GetSymbolVendorPavel Labath2019-08-083-63/+42
| | | | | | | | | | | | | | | | | | | | Summary: This patch removes the GetSymbolVendor function, and the various mentions of the SymbolVendor in the Module class. The implementation of GetSymbolVendor is "inlined" into the GetSymbolFile class which I created earlier. After this patch, the SymbolVendor class still exists inside the Module object, but only as an implementation detail -- a fancy holder for the SymbolFile. That will be removed in the next patch. Reviewers: clayborg, JDevlieghere, jingham, jdoerfert Subscribers: jfb, lldb-commits Differential Revision: https://reviews.llvm.org/D65864 llvm-svn: 368263
* [Materializer] Remove wrong SetSizeAndAlignmentFromType().Davide Italiano2019-08-082-16/+0
| | | | | | | | | | | | This function is unused. It's also wrong, because it computes the size and the alignment of the type without asking the runtime, so it doesn't work for any language that has one (e.g. swift). One could consider re-implementing this passing an execution scope context, and modifying GetTypeBitAlign() to do the right thing, but given there are no uses, it's not really useful. llvm-svn: 368249
* [Utility] Remove unused function 'GetMatchSpanningIndices'Jonas Devlieghere2019-08-082-21/+0
| | | | llvm-svn: 368243
* [Docs] Fix (incorrect) code highlightingJonas Devlieghere2019-08-071-25/+25
| | | | llvm-svn: 368233
* Adjust a ValueObjectChild's offset when the child is a bitfieldAdrian Prantl2019-08-073-0/+35
| | | | | | | | | | | | | | | | | | If a bitfield doesn't fit into the child_byte_size'd window at child_byte_offset, move the window forward until it fits. The problem here is that Value has no notion of bitfields and thus the Value's DataExtractor is sized like the bitfields CompilerType; a sequence of bitfields, however, can be larger than their underlying type. This was not in the big-endian-derived DWARF 2 bitfield attributes because their offsets were counted from the end of the window, so they always fit. rdar://problem/53132189 Differential Revision: https://reviews.llvm.org/D65492 llvm-svn: 368226
* [CommandObject] Remove unused functionJonas Devlieghere2019-08-071-2/+0
| | | | llvm-svn: 368208
* [Symbol] Remove commented out code from CompileUnitAlex Langford2019-08-071-43/+0
| | | | llvm-svn: 368205
* Add support for deterministically linked binaries on macOS to lldb.Nico Weber2019-08-072-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When ld64 links a binary deterministically using the flag ZERO_AR_DATE, it sets a timestamp of 0 for N_OSO members in the symtab section, rather than the usual last modified date of the object file. Prior to this patch, lldb would compare the timestamp from the N_OSO member against the last modified date of the object file, and skip loading the object file if there was a mismatch. This patch updates the logic to ignore the timestamp check if the N_OSO member has timestamp 0. The original logic was added in https://reviews.llvm.org/rL181631 as a safety check to avoid problems when debugging if the object file was out of date. This was prior to the introduction of deterministic build in ld64. lld still doesn't support deterministic build. Other code in llvm already relies on and uses the assumption that a timestamp of 0 means deterministic build. For example, commit 9ccfddc39d4d27f9b16fcc72ab30d483151d6d08 adds similar timestamp checking logic to dsymutil, but special cases timestamp 0. Likewise, commit 0d1bb79a0413f221432a7b1d0d2d10c84c4bbb99 adds a long comment describing deterministic archive, which mostly uses timestamp 0 for determinism. Patch from Erik Chen <erikchen@chromium.org>! Differential Revision: https://reviews.llvm.org/D65826 llvm-svn: 368199
* [Driver] Expand the executable path in the target create outputJonas Devlieghere2019-08-072-1/+9
| | | | | | | | | | | | | | | | | | Resolve the path in the target create output. This is nice when passing relative paths to the lldb command line driver. $ lldb ./binary (lldb) target create "./binary" Current executable set to '/absolute/path/to/binary' (x86_64). This change only affects the target create output and does not change the debugger's behavior. It doesn't resolve symbolic links so it won't cause confusing when debugging something like clang++ that's symlinked to clang. Differential revision: https://reviews.llvm.org/D65611 llvm-svn: 368182
* [ExecutionContext] Return the target/process byte order.Jonas Devlieghere2019-08-073-4/+126
| | | | | | | | | | | | | Currently ExecutionContext::GetByteOrder() always returns the host byte order. This seems like a simple mistake: the return keyword appears to have been omitted by accident. This patch fixes that and adds a unit test. Bugreport: https://llvm.org/PR37950 Differential revision: https://reviews.llvm.org/D48704 llvm-svn: 368181
* ProcessElfCore: Remove linux and freebsd NT_*** constantsPavel Labath2019-08-072-46/+21
| | | | | | | These are already defined in llvm/BinaryFormat/ELF.h. Leaving the NetBSD and OpenBSD constants as-is, as they have no llvm counterparts. llvm-svn: 368168
* ObjectFileELF: Remove NT_*** constantsPavel Labath2019-08-071-36/+1
| | | | | | | llvm now has definitions of those in BinaryFormat/ELF.h. Use those instead. llvm-svn: 368159
* A more robust way of testing debug_line parser near the end of modulePavel Labath2019-08-072-3/+28
| | | | | | | | | | | | | | | | | | Summary: While removing -z separate-code makes lld produce place the code at the end of a segment right now, it's possible that future changes to the linker will change that, thereby removing the coverage for the changes in r367983. This patch adds a linker script to one of the line table tests, which ensures that the code (and its line table) will be placed at the very end of a module. Reviewers: MaskRay Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D65789 llvm-svn: 368154
* [lldb][CMake] Workaround debugserver code-signing issue in generated Xcode ↵Stefan Granitz2019-08-071-0/+28
| | | | | | | | | | | | | | | | | | | | | project Summary: Explicitly code-sign the LLDB.framework copy of debugserver in the build-tree. This is necessary, because the Xcode-specific logic in `llvm_codesign` [1] has the side-effect that Xcode code-signs after post-build steps (here: after copying debugserver over into the framework). The special case for Xcode was necessary to avoid double-signing errors in the past (see D55116 and D55816). [1] https://github.com/llvm/llvm-project/blob/36fb93982f0e/llvm/cmake/modules/AddLLVM.cmake#L1676 Reviewers: jingham, davide, JDevlieghere, teemperor Reviewed By: JDevlieghere Subscribers: beanz, mgorny, lldb-commits, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D65566 llvm-svn: 368151
* [lldb][NFC] Remove commented out code in ↵Raphael Isemann2019-08-071-18/+0
| | | | | | ClangASTContext::AddMethodToCXXRecordType llvm-svn: 368150
* [lldb][CMake] Fix one more detail in r368066Stefan Granitz2019-08-071-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D65797 llvm-svn: 368148
* [lldb][NFC] Fix typo in 368066Stefan Granitz2019-08-071-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D65797 llvm-svn: 368143
* Detect HAVE_SYS_TYPES_H in lldbHaibo Huang2019-08-078-2/+16
| | | | | | | | | | | | | | | | Summary: After rL368069 I noticed that HAVE_SYS_TYPES_H is not defined in Platform.h, or anywhere else in lldb. This change fixes that. Reviewers: labath Subscribers: mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D65822 llvm-svn: 368125
* Upstream a few small Apple changes to debugserver - arm64_32, CatalystJason Molenda2019-08-0710-30/+171
| | | | | | | | | Adrian's changes to support Catalyst processes and my changes to support debugserver running on an arm64_32 device (Apple Watch Series 4, which uses an IPL32 model on arm64 cpus). llvm-svn: 368118
* [Gardening] Remove more dead code from IOHandlerJonas Devlieghere2019-08-071-29/+6
| | | | | | Remove more dead code and reformat the file. llvm-svn: 368116
* [lldb][NFC] Minor refactorings to (Clang)ExpressionSourceCodeRaphael Isemann2019-08-062-11/+18
| | | | llvm-svn: 368082
* [SymbolFile] Remove commented out methodAlex Langford2019-08-062-204/+0
| | | | llvm-svn: 368075
* Various build fixes for lldb on MinGWHaibo Huang2019-08-066-0/+22
| | | | | | | | | | Subscribers: mstorsjo, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D65691 llvm-svn: 368069
* [lldb][CMake] Generating Xcode projectsStefan Granitz2019-08-063-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Print a warning if the wrong cache script is used when generating a Xcode project, because it's too easy to confuse with Apple-lldb-macOS.cmake ``` When building with Xcode, we recommend using the corresponding cache script. If this was a mistake, clean your build directory and re-run CMake with: -C /path/to/llvm-project/lldb/cmake/caches/Apple-lldb-Xcode.cmake See: https://lldb.llvm.org/resources/build.html#cmakegeneratedxcodeproject ``` Also set the generator inside the cache script. Reviewers: JDevlieghere, jingham, clayborg Reviewed By: JDevlieghere Subscribers: mgorny, lldb-commits, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D65797 llvm-svn: 368066
* Update LLDB to follow changes in llvm::DWARFDebugNames::NameIndex (4/5)Igor Kudrin2019-08-061-3/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D65640 llvm-svn: 368033
* ObjectFileELF: permit thread-local sections with overlapping file addressesPavel Labath2019-08-064-17/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In an attempt to make file-address-based lookups more predictable, in D55998 we started ignoring sections which would result in file address overlaps. It turns out this was too aggressive because thread-local sections typically will have file addresses which apear to overlap regular data/code. This does not cause a problem at runtime because thread-local sections are loaded into memory using special logic, but it can cause problems for lldb when trying to lookup objects by their file address. This patch changes ObjectFileELF to permit thread-local sections to overlap regular ones by essentially giving them a separate address space. It also makes them more symmetrical to regular sections by creating container sections from PT_TLS segments. Simultaneously, the patch changes the regular file address lookup logic to ignore sections with the thread-specific bit set. I believe this is what the users looking up file addresses would typically expect, as looking up thread-local data generally requires more complex logic (e.g. DWARF has a special opcode for that). Reviewers: clayborg, jingham, MaskRay Subscribers: emaste, aprantl, arichardson, lldb-commits Differential Revision: https://reviews.llvm.org/D65282 llvm-svn: 368010
* SymbolVendor: Remove passthrough methodsPavel Labath2019-08-0615-409/+90
| | | | | | | | | | After the recent refactorings the SymbolVendor passthrough no longer serve any purpose. This patch removes those methods, and updates all callsites to go to the symbol file directly -- in most cases that just means calling GetSymbolFile()->foo() instead of GetSymbolVendor()->foo(). llvm-svn: 368001
* SymbolVendorELF: Perform build-id lookup even without a debug linkPavel Labath2019-08-064-85/+121
| | | | | | | | | | | | | | | | | | | | | | Summary: The debug link and build-id lookups are two independent ways one can search for a separate symbol file. However, our implementation in SymbolVendorELF was tying the two together and refusing to look up the symbol file based on a build id if the file did not contain a debug link. This patch makes it possible to search for the symbol file with just one of the two methods available. To demonstrate, I split the build-id-case test into two, so that we test the search using both methods. Reviewers: jankratochvil, mgorny, clayborg, espindola, alexshap Subscribers: emaste, arichardson, MaskRay, lldb-commits Differential Revision: https://reviews.llvm.org/D65561 llvm-svn: 367994
* [lldb][NFC] Remove unnecessary cast in ClangUserExpressionRaphael Isemann2019-08-061-5/+3
| | | | llvm-svn: 367989
* Fix line table resolution near the end of a sectionPavel Labath2019-08-066-32/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: lld r367537 changed the way the linker organizes sections and segments. This exposed an lldb bug and caused some tests to fail. In all of the failing tests the root cause was the same -- when we were trying to resolve the last address in the line_table section, we failed because it pointed past the end of the section. This patch changes the line table address resolution code to back up the address by one for end-of-sequence entries. This ensures the address still points inside a section/module even if the line table sequence ends at the very end of a section. It also reverts the linker flags which were added to the failing tests to restore previous behavior. Reviewers: clayborg, jingham Subscribers: mgorny, MaskRay, lldb-commits Differential Revision: https://reviews.llvm.org/D65647 llvm-svn: 367983
* [Gardening] Remove dead code from ASTDumper (NFC)Jonas Devlieghere2019-08-061-4/+0
| | | | | | These functions are not referenced. llvm-svn: 367978
* [Gardening] Remove dead code from ScriptInterpreterPython (NFC)Jonas Devlieghere2019-08-062-24/+3
| | | | | | The terminal state is never saved or restored. llvm-svn: 367977
OpenPOWER on IntegriCloud