summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* Move the definition of SBListener::GetSP() to SBListener.cpp.Sean Callanan2017-03-292-1/+3
| | | | | | | This is the requirement for all functions in the public API, to eliminate weak symbol definitions. llvm-svn: 299020
* Remove dead include <sys/user.h> from the NetBSD code.Kamil Rytarowski2017-03-291-3/+1
| | | | llvm-svn: 298970
* Print the error if dsymForUUID sometimes produces bad plists.Jim Ingham2017-03-281-1/+5
| | | | | | | Not much we can do about it but at least we can print the bad plist and the error. llvm-svn: 298958
* Add support for tracing hello-world application on NetBSDKamil Rytarowski2017-03-289-5/+1803
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch is a stripped down from features a NetBSD process code (patch is kept under 2k LOC). This code has assumption that there is only one thread within a debugged process. The only debugger trap supported is software breakpoint (TRAP_BRKPT). The generic platform code requires to add dummy function for watchpoints etc. These functions are currently empty. This code is not the final platform support as is and it's treated as a base to extend, refactor and address issues afterwards. Supported features: - handle software breakpoints, - correctly attach to a tracee, - support NetBSD specific ptrace(2), - monitor process termination, - monitor SIGTRAP events, - monitor SIGSTOP events, - monitor other signals events, - resume the whole process, - get memory region info perms, - read memory from tracee, - write memory to tracee, - read ELF AUXV, - x86_64 GPR read and write code For the generic framework include: - halt, - detach, - signal, - kill, - allocatememory, - deallocatememory, - update threads, - getarchitecture, - getfileloadaddress, - and others. This code has preliminary AddThread code. Out of interest in this patch: - exec() traps, - hardware debug register traps, - single step trap, - thread creation/termination trap, - process fork(2), vfork(2) and vfork(2) done traps, - syscall entry and exit trap, - threads, - FPR registers, - retrieving tracee's thread name, - non x86_64 support. This code can be used to start a hello world application and trace it. This code can be used by other BSD systems as a starting point to get similar capabilities. Sponsored by <The NetBSD Foundation> Reviewers: emaste, joerg, kettenis, labath Subscribers: mgorny, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D31374 llvm-svn: 298953
* In FileSpec::Equal, short-cut GetNormalizedPath.Jim Ingham2017-03-272-1/+28
| | | | | | | | | | | | GetNormalizedPath seems to be slow, so it's worth shortcutting it if possible. This change does so when the filenames and not equal and we can tell GetNormalizedPath would not make them equal. Also added a test for "." final component since that was missing. llvm-svn: 298876
* Fix the Xcode project for OpenBSD additions.Jim Ingham2017-03-271-0/+26
| | | | llvm-svn: 298874
* [LLDB] OpenBSD supportKamil Rytarowski2017-03-2625-9/+990
| | | | | | | | | | | | | | | | | | | | Summary: Add basic OpenBSD support. This is enough to be able to analyze core dumps for OpenBSD/amd64, OpenBSD/arm, OpenBSD/arm64 and OpenBSD/i386. Note that part of the changes to source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp fix a bug that probably affects other platforms as well. The GetProgramHeaderByIndex() interface use 1-based indices, but in some case when looping over the headers the, the loop starts at 0 and misses the last header. This caused problems on OpenBSD since OpenBSD core dumps have the PT_NOTE segment as the last program header. Reviewers: joerg, labath, krytarowski Reviewed By: krytarowski Subscribers: aemerson, emaste, rengolin, srhines, krytarowski, mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D31131 llvm-svn: 298810
* PluginUnwindAssemblyX86: add missing linkage to MCDisasmMichal Gorny2017-03-251-0/+1
| | | | | | | | | | | | | | Add missing linkage of the lldbPluginUnwindAssemblyX86 to LLVMMCDisasm library. This fixes the following build failure when linking against shared libraries: lib64/liblldbPluginUnwindAssemblyX86.a(x86AssemblyInspectionEngine.cpp.o):x86AssemblyInspectionEngine.cpp:function lldb_private::x86AssemblyInspectionEngine::instruction_length(unsigned char*, int&): error: undefined reference to 'LLVMDisasmInstruction' lib64/liblldbPluginUnwindAssemblyX86.a(x86AssemblyInspectionEngine.cpp.o):x86AssemblyInspectionEngine.cpp:function lldb_private::x86AssemblyInspectionEngine::~x86AssemblyInspectionEngine(): error: undefined reference to 'LLVMDisasmDispose' lib64/liblldbPluginUnwindAssemblyX86.a(x86AssemblyInspectionEngine.cpp.o):x86AssemblyInspectionEngine.cpp:function lldb_private::x86AssemblyInspectionEngine::x86AssemblyInspectionEngine(lldb_private::ArchSpec const&): error: undefined reference to 'LLVMCreateDisasm' Differential Revision: https://reviews.llvm.org/D31369 llvm-svn: 298777
* Expression: add missing linkage to RuntimeDyld componentMichal Gorny2017-03-251-0/+1
| | | | | | | | | | | Add missing linkage from lldbExpression library to LLVMRuntimeDyld. Otherwise the build against shared LLVM libraries fails with: lib64/liblldbExpression.a(IRExecutionUnit.cpp.o):IRExecutionUnit.cpp:function llvm::RTDyldMemoryManager::deregisterEHFrames(unsigned char*, unsigned long, unsigned long): error: undefined reference to 'llvm::RTDyldMemoryManager::deregisterEHFramesInProcess(unsigned char*, unsigned long)' Differential Revision: https://reviews.llvm.org/D31367 llvm-svn: 298776
* The expression text in AppleObjCRuntimeV1::CreateObjectCheckerJason Molenda2017-03-241-2/+3
| | | | | | | | | | | was formatted into a string inside an assert() expression. Which is elided when lldb is built with asserts disabled; the result is that all expressions will fail when debugging programs using the objective-c v1 runtime. <rdar://problem/30353271> llvm-svn: 298694
* Fix warnings from clang build on macOS.Bruce Mitchener2017-03-235-2/+5
| | | | | | | | | | Reviewers: lldb-commits Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D31279 llvm-svn: 298585
* Delete some more dead includes.Zachary Turner2017-03-2255-33/+44
| | | | | | | This breaks the cycle between Target and PluginLanguageC++, reducing the overall cycle count from 43 to 42. llvm-svn: 298561
* Merge r298536 changes to XcodeTim Hammerquist2017-03-221-4/+4
| | | | | | rdar://problem/31202813 llvm-svn: 298547
* Remove dead include from GoASTContext.cpp.Zachary Turner2017-03-222-2/+0
| | | | | | | | | | This #include was the cause of a dependency from Symbol -> DataFormatters. However, nothing from the header was being used anyway, so we can just remove it with no adverse effects. This reduces the overall cycle count from 44 to 43. llvm-svn: 298541
* Move FileSpec from Host -> Utility.Zachary Turner2017-03-22108-115/+115
| | | | llvm-svn: 298536
* [analyze deps] Show incoming and outgoing counts on island members.Zachary Turner2017-03-221-2/+13
| | | | llvm-svn: 298535
* [analyze deps] Also show cycle islands.Zachary Turner2017-03-221-0/+14
| | | | | | | | | | | | | | | | | | | We currently display a list of all minimal cycles, but it's useful to be able to see the big picture impact of these cycles by merging them all together into groups of interconnected components. Because the cycle discovery algorithm only considers "minimal" cycles, it discards all information for dependencies which are not considered part of the minimal cycle. So all we know is that the components of each island definitely all depend on each other but it's still possible that there are hidden dependencies due to transitive includes. The cycle list should still be the authoritative reference for deciding where the easiest places to break cycles are, though. llvm-svn: 298530
* Resubmit "Delete the remainder of platform specific code in FileSpec."Zachary Turner2017-03-2219-210/+210
| | | | | | | | | | | | | | This was causing a test failure in one of LLDB's tests which specifically dealt with a limitation in LLVM's implementation of home_directory() that LLDB's own implementation had worked around. This limitation has been addressed in r298513 on the LLVM side, so the failing test (which is now unnecessary as the limitation no longer exists) was removed in r298519, allowing this patch to be re-submitted without modification. llvm-svn: 298526
* Reuse appropriate Launch and Attach on NetBSDKamil Rytarowski2017-03-222-1/+5
| | | | | | | | | | | | | | | | | | | | | | Summary: NetBSD ships with NativeProcessNetBSD inherited from NativeProcessProtocol. Link Plugins/Process/gdb-remote with lldbPluginProcessNetBSD in order to resolve correctly the linking to Launch and Attach from the NetBSD plugin. Sponsored by <The NetBSD Foundation> Reviewers: kettenis, labath, emaste, joerg Reviewed By: labath, emaste Subscribers: mgorny, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D31231 llvm-svn: 298524
* Delete TestLLVM.pyZachary Turner2017-03-221-67/+0
| | | | | | | | | | | | | This was added to workaround a limitation in LLVM's implementation of getting the current user's home directory, since it would only look at the value of $HOME, but we did not want to rely on that being set so we would also look in the password database. Adding the ability to look in the password database to LLVM was a straightforward patch that was submitted in r298513, so since that is done this test is no longer needed. llvm-svn: 298519
* Merge changes from r298466 into Xcode projectTim Hammerquist2017-03-221-4/+4
| | | | | | rdar://problem/31197116 llvm-svn: 298517
* Revert "Delete the remainder of platform specific code in FileSpec."Pavel Labath2017-03-2219-210/+210
| | | | | | | This reverts commit r298465 as it breaks TestLLVM.TestHomeDirectory.test_tilde_home_directory. llvm-svn: 298509
* Break the cycle between Host and PluginProcessUtility.Zachary Turner2017-03-226-10/+9
| | | | | | | | | | | There are only two users of NativeRegisterContextRegisterInfo, and both are in process plugins. Moving this code from Host to Plugins/Process/Utility thus makes sense, and as it is the only dependency from Host -> PluginProcessUtility, it also breaks this cycle, reducing LLDB's overall cycle count from 45 to 44. llvm-svn: 298466
* Delete the remainder of platform specific code in FileSpec.Zachary Turner2017-03-2219-210/+210
| | | | | | Differential Revision: https://reviews.llvm.org/D31129 llvm-svn: 298465
* [deps script] Sort cycles by the difficulty of breaking.Zachary Turner2017-03-211-7/+30
| | | | | | | | | When passing --discover-cycles and --show-counts, it displays the number of dependencies between each hop of the cycle, and sorts by the sum. Dependencies at the top of the list should be the easiest to break. llvm-svn: 298455
* Mirror CMake changes from r298412 to Xcode projectTim Hammerquist2017-03-211-4/+4
| | | | | | | <rdar://problem/31181635> M lldb.xcodeproj/project.pbxproj llvm-svn: 298451
* Fix build broken by StringList move.Zachary Turner2017-03-212-0/+2
| | | | llvm-svn: 298419
* Move StringList from Core -> Utility.Zachary Turner2017-03-2134-38/+34
| | | | llvm-svn: 298412
* Create instance of DynamicLoaderPOSIXDYLD on NetBSDKamil Rytarowski2017-03-211-2/+3
| | | | | | | | | | | | | | | | | | | | | Summary: NetBSD is a modern ELF UNIX-like system. There is requires DynamicLoaderPOSIXDYLD e.g. for ELF AUXV reading from the client. Sponsored by <The NetBSD Foundation> Reviewers: labath, joerg, kettenis Reviewed By: labath Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D31192 llvm-svn: 298409
* Add stub for PluginProcessNetBSDKamil Rytarowski2017-03-219-0/+234
| | | | | | | | | | | | | | | | | | | | | Summary: This is the base for introduction of further features to support Process Tracing on NetBSD, in local and remote setup. This code is also a starting point to synchronize the development with other BSDs. Currently NetBSD is ahead and other systems can catch up. Sponsored by <The NetBSD Foundation> Reviewers: emaste, joerg, kettenis, labath Reviewed By: labath Subscribers: mgorny, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D31138 llvm-svn: 298408
* Enable AUXV and QPassSignals in gdb-remote for NetBSDKamil Rytarowski2017-03-212-2/+2
| | | | | | | | | | | | | | | | | | | | | Summary: NetBSD is an ELF platform and it uses Elf Auxiliary Vector like Linux and other modern BSDs. While there enable QPassSignals for the NetBSD port as well. Sponsored by <The NetBSD Foundation> Reviewers: labath, kettenis, joerg, emaste Reviewed By: labath Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D31146 llvm-svn: 298407
* Enable ProcessPOSIXLog on NetBSDKamil Rytarowski2017-03-211-2/+2
| | | | | | | | | | | | | | | | | | | | Summary: NetBSD can share the same logging functionality with Linux and FreeBSD. Sponsored by <The NetBSD Foundation> Reviewers: labath, emaste, joerg, kettenis Reviewed By: labath, emaste Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D31191 llvm-svn: 298406
* Add NetBSD case in Entry::Type::ThreadIDKamil Rytarowski2017-03-211-1/+2
| | | | | | | | | | | | | | | | | | | | | Summary: NetBSD native threads are printed as 64-bit unsigned integers. The underlying system type of a thread identity is lwpid_t of type int32_t. For consistency with Linux and FreeBSD share the 64-bit unsigned integer type. Sponsored by <The NetBSD Foundation> Reviewers: labath, kettenis, joerg, emaste Reviewed By: labath, emaste Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D31132 llvm-svn: 298405
* Remove stray paren that got in while attempting to fix the build for ↵Reid Kleckner2017-03-211-1/+1
| | | | | | AttributeList llvm-svn: 298402
* Update for LLVM API rename of AttributeSet -> AttributeListReid Kleckner2017-03-211-5/+2
| | | | llvm-svn: 298399
* Replace std::ofstream with llvm::raw_fd_ostreamPavel Labath2017-03-213-14/+22
| | | | | | | | | | | | | | Summary: ofstream does not handle paths with non-ascii characters correctly on windows, so I am switching these to llvm streams to fix that. Reviewers: zturner, eugene Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D31079 llvm-svn: 298375
* Remove ProcFileReaderPavel Labath2017-03-214-167/+25
| | | | | | | This removes the last usage of ProcFileReader from NativeProcessLinux and then deletes the class itself. llvm-svn: 298374
* Resubmit r298334 after fixing OSX build errors.Zachary Turner2017-03-2112-224/+39
| | | | | | | Hopefully this works, I can't test since I don't have Mac hardware, however. llvm-svn: 298340
* Revert r298334 until Zachary has a chance to fix the buildbot failureJason Molenda2017-03-2112-39/+224
| | | | | | on macosx. llvm-svn: 298338
* Fix two places where an arm instruction emulation methodJason Molenda2017-03-211-3/+6
| | | | | | | can dereference misaligned memory. <rdar://problem/31106315>, <rdar://problem/31106337> llvm-svn: 298337
* Delete some dead code in HostInfo.Zachary Turner2017-03-2110-78/+0
| | | | llvm-svn: 298335
* Delete various lldb FileSystem functions.Zachary Turner2017-03-2112-224/+39
| | | | | | | | Use LLVM's equivalent versions instead. Differential Revision: https://reviews.llvm.org/D31111 llvm-svn: 298334
* Initialize m_allow_cxx, m_allow_objc. These ivars in the base class are not Jason Molenda2017-03-211-0/+2
| | | | | | | | | initialized in the ctor and they're only initialized to 'true' in ClangUserExpression.cpp when specific languages are detected so we can use uninitialized values. This bug has been present since the ivars were added in r144042. <rdar://problem/31105864> llvm-svn: 298333
* FindTypes should find "struct TypeName" as well as "TypeName".Jim Ingham2017-03-214-1/+96
| | | | | | | | | | This fixes a bug introduced by r291559. The Module's FindType was passing the original name not the basename in the case where it didn't find any separators. I also added a testcase for this. <rdar://problem/31159173> llvm-svn: 298331
* [Support] Fill the file_status struct with link count.Zachary Turner2017-03-201-0/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D31110 llvm-svn: 298326
* Delete LLDB's MD5 code. Use LLVM instead.Zachary Turner2017-03-205-97/+20
| | | | | | Differential Revision: https://reviews.llvm.org/D31108 llvm-svn: 298325
* [analyze-project-deps.py] Add the ability to list all cycles.Zachary Turner2017-03-201-1/+77
| | | | | | | | | | | | | | This analyzes the dependency graph and computes all minimal cycles. Equivalent cycles that differ only by rotation are excluded, as are cycles that are "super-cycles" of other smaller cycles. For example, if we discover the cycle A -> C -> A, and then later A -> B -> C -> D -> A, this latter cycle is not considered. Thus, it is possible that after eliminating some cycles, new ones will appear. However, this is the only way to make the algorithm terminate in a reasonable amount of time. llvm-svn: 298324
* Add a function to MD5 a file's contents.Zachary Turner2017-03-202-5/+3
| | | | | | | | | | | | | | | In doing so, clean up the MD5 interface a little. Most existing users only care about the lower 8 bytes of an MD5, but for some users that care about the upper and lower, there wasn't a good interface. Furthermore, consumers of the MD5 checksum were required to handle endianness details on their own, so it seems reasonable to abstract this into a nicer interface that just gives you the right value. Differential Revision: https://reviews.llvm.org/D31105 llvm-svn: 298322
* Get ObjectFileMachO to handle @executable_pathJim Ingham2017-03-206-2/+89
| | | | | | | | | Only do this when we are debugging an executable, since we don't have a good way to trace from an ObjectFile back to its containing executable. Detecting pre-run libs before running is "best effort" in lldb, but this one is pretty easy. llvm-svn: 298290
* Fix a problem with line tables & .o files that start with code with no line ↵Jim Ingham2017-03-201-0/+8
| | | | | | | | | | | table entries. If you have code before the first line table entry when debugging with .o files on macOS, the LineTable entry search code was assigning all that code to the first line table entry. Don't do that. <rdar://problem/31095765> llvm-svn: 298289
OpenPOWER on IntegriCloud