summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Fix remote test suite directory creationPavel Labath2017-03-202-27/+33
| | | | | | | | | | | | | | | r298203 make SBPlatform::MakeDirectory less recursive, which breaks the test suite creation of test directory hierarchy creation on the remote target. Since the function was never fully recursive, and the name does not imply recursiveness, I fix the problem by modifying the test runner to do the recursion manually. I also make the runner complain more loudly when it fails to create the directory -- previously it just printed the error to stdout and caused most of the tests to hang, which is not very helpful in diagnosing the problem. llvm-svn: 298261
* Fix syntax error when building with editline support.Zachary Turner2017-03-191-1/+1
| | | | llvm-svn: 298206
* Remove FileSystem::Get/SetFilePermissionsZachary Turner2017-03-195-62/+13
| | | | | | Differential Revision: https://reviews.llvm.org/D31089 llvm-svn: 298205
* Remove FileSystem::MakeDirectory.Zachary Turner2017-03-1910-70/+9
| | | | | | | | Have callers use llvm::sys::fs::create_directory() instead. Differential Revision: https://reviews.llvm.org/D31086 llvm-svn: 298203
* Fix unit test compilation failure.Zachary Turner2017-03-191-2/+4
| | | | llvm-svn: 298202
* Remove some dead code from DumpValueObjectOptions::PointerDepthTamas Berghammer2017-03-182-28/+3
| | | | llvm-svn: 298189
* allow for specification of compiler/lldb executables basenameTim Hammerquist2017-03-171-0/+4
| | | | llvm-svn: 298123
* executables should be validated before spawning subprocessesTim Hammerquist2017-03-171-2/+14
| | | | | | | | | | | | | | dotest.py script doesn't validate executables passed on the command line before spawning dozens of subprocesses, all of which fail silently, leaving an empty results file. We should validate the lldb and compiler executables on configuration, aborting when given invalid paths, to prevent numerous, cryptic, and spurious failures. <rdar://problem/31117272> llvm-svn: 298111
* CMake requires normalized paths when appending.Zachary Turner2017-03-171-0/+1
| | | | | | | Patch by Hugh Bellamy Differential Revision: https://reviews.llvm.org/D30927 llvm-svn: 298100
* Fix some signed/unsigned comparison warnings.Zachary Turner2017-03-171-4/+4
| | | | | | | Patch by Hugh Bellamy Differential Revision: https://reviews.llvm.org/D30926 llvm-svn: 298099
* Fix FreeBSD build broken by r298066Pavel Labath2017-03-171-2/+4
| | | | llvm-svn: 298069
* Move GetAuxvData from Host to relevant process pluginsPavel Labath2017-03-1713-97/+57
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: GetAuxvData was causing dependencies from host to target and linux process modules. It also does not fit netbsd use case, as there we can only read the auxiliary vector with ptrace, which is better done in the process plugin, with the other ptrace calls. I resolve these issues by moving the freebsd and linux versions into the relevant process plugins. In case of linux, this required adding an interface in NativeProcessProtocol. The empty definitions on other platforms can simply be removed. To get the code compiling I had to add ProcessGdbRemote -> ProcessLinux dependency, which was not caught before because we depended on it transitively. Reviewers: zturner, emaste Subscribers: srhines, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D31031 llvm-svn: 298066
* One more attempt to fix FreeBSDPavel Labath2017-03-171-0/+4
| | | | | | | | It seems sysctl.h is not self-contained, as I get missing symbols in the header itself now. I am going to include all files that the file I moved this from included, and hope that is enough. llvm-svn: 298063
* Speculative build fix for FreeBSDPavel Labath2017-03-171-1/+3
| | | | | | broken by r298058. llvm-svn: 298061
* Remove HostThreadLinux/Free/NetBSDPavel Labath2017-03-1714-265/+116
| | | | | | | | | | | | | | | | | | | | | | Summary: These classes existed only because of the GetName() static function, which can be moved to a more natural place anyway. I move the linux version to NativeProcessLinux (and get rid of ProcFileReader), the freebsd version to ProcessFreeBSD (and fix a bug where it was using the current process ID, instead of the inferior pid), and remove the NetBSD version (which was probably incorrect anyway, as it assumes the current process instead of the inferior. I also add an llgs test to that verifies thread names are read correctly. Reviewers: zturner, krytarowski, emaste Subscribers: lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D30981 llvm-svn: 298058
* Update for LLVM API removal of Function::getArgumentList()Reid Kleckner2017-03-162-7/+6
| | | | llvm-svn: 298011
* [Support] Support both Windows and Posix paths on both platforms.Zachary Turner2017-03-162-5/+5
| | | | | | | | | | | | | | | | | | Previously which path syntax we supported dependend on what platform we were compiling LLVM on. While this is normally desirable, there are situations where we need to be able to handle a path that we know was generated on a remote host. Remote debugging, for example, or parsing debug info. 99% of the code in LLVM for handling paths was platform agnostic and literally just a few branches were gated behind pre-processor checks, so this changes those sites to use runtime checks instead, and adds a flag to every path API that allows one to override the host native syntax. Differential Revision: https://reviews.llvm.org/D30858 llvm-svn: 298004
* [debugserver] NFC. One more small cleanup to DNBArchImplX86_64::SetFPUStateChris Bieneman2017-03-151-13/+9
| | | | | | This is another similar cleanup to other changes I've been making to simplify the AVX code in debugserver. llvm-svn: 297880
* Remove some ProcFileReader occurencesPavel Labath2017-03-157-228/+317
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: ProcFileReader is the cause of the dependency from Host to ProcessLinux module. Since it's interface is also obsolete (ReadIntoDataBuffer is trivially replaceable by llvm::MemoryBuffer functions and ProcessLineByLine is trivially implementable with StringRefs), instead of moving it around I'm planning to obliterate it. This is the first step, where I remove a couple of occurences in linux/Host.cpp, and modernize some code around that. I have introduced linux/Support.h, which holds two utility functions now, whose resposibility is to construct the appropriate proc file names -- the only useful feature of ProcFileReader. I add a couple of tests for these functions, and for Host::GetProcessInfo. It's worth noting that these are the first host-specific unit tests in lldb. Reviewers: zturner, eugene Subscribers: srhines, lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D30942 llvm-svn: 297843
* Fix TestMoveNearest for remote targetsPavel Labath2017-03-151-1/+2
| | | | | | | Launching a process with shared libraries on remote targets requires a special dance, which I forgot to do in r297830. llvm-svn: 297834
* Fix TestMoveNearest breakage on darwinPavel Labath2017-03-151-0/+4
| | | | | | | | | It seems that on darwin we are not able to resolve breakpoints in the test shared library until the process has started. That seems unfortunate, but it is not the purpose of this test, so work around that by starting the process before doing the rest of our checks. llvm-svn: 297830
* Fix windows&darwin builds broken by r297812Pavel Labath2017-03-153-2/+1
| | | | llvm-svn: 297819
* Delete empty file ProcessLauncherLinux.hPavel Labath2017-03-151-0/+0
| | | | llvm-svn: 297818
* BreakpointResolverFileLine: Restrict move-to-nearest-code from moving across ↵Pavel Labath2017-03-1511-50/+195
| | | | | | | | | | | | | | | | | | | | | | | | | function boundaries Summary: This fixes the case where a user tries to set a breakpoint on a source line outside of any function (e.g. because that code is #ifdefed out, or the compiler did not emit code for the function, etc.) and we would silently move the breakpoint to the next function. Now we check whether the line range of the resolved symbol context function matches the original line number. We reject any breakpoint locations that appear to move the breakpoint into a new function. This filtering only happens if we have full debug info available (e.g. in case of -gline-tables-only compilation, we still set the breakpoint on the nearest source line). Reviewers: jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D30817 llvm-svn: 297817
* Remove lldb streams from the Log class completelyPavel Labath2017-03-1514-113/+130
| | | | | | | | | | | | | | | | | | | | | Summary: previously we switched to llvm streams for log output, this completes the switch for the error streams. I also clean up the includes and remove the unused argument from DisableAllLogChannels(). This required adding a bit of boiler plate to convert the output in the command interpreter, but that should go away when we switch command results to use llvm streams as well. Reviewers: zturner, eugene Subscribers: lldb-commits, emaste Differential Revision: https://reviews.llvm.org/D30894 llvm-svn: 297812
* dotest.py: remove the ability to specify different architectures/compilers ↵Pavel Labath2017-03-157-154/+100
| | | | | | | | | | | | | | | | | | | | | | | | | in a single invocation Summary: This has been broken at least since the new test result framework was added, which was over a year ago. It looks like nobody has missed it since. Removing this makes the gmodules handling code saner, as it already did not know how to handle the multiple-compilers case. My motivation for this is libc++ data formatters support on android -- I am trying make a central way of determining whether libc++ tests can be run, and without this, I would have to resort to similar hacks as the gmodules code. Reviewers: jingham, zturner Subscribers: danalbert, tfiala, lldb-commits Differential Revision: https://reviews.llvm.org/D30779 llvm-svn: 297811
* [debugserver] NFC. Cleanup Get/Set Register Value/ContextChris Bieneman2017-03-142-978/+535
| | | | | | This patch modifies the Get/Set Register Value/Context functions for Intel to not duplicate code for reading non-AVX registers. This is similar to other transformations I've been making to the AVX register handling code. llvm-svn: 297787
* [CMake] Override debugserver to use the build tree on DarwinChris Bieneman2017-03-143-0/+16
| | | | | | This patch adds support to the test suite for overriding the path to debugserver, and uses the override to point to the build tree's debugserver on Darwin. llvm-svn: 297776
* [debugserver] Fixing a small logic error from r297685Chris Bieneman2017-03-141-1/+1
| | | | | | I had mixed up the logic during patch review. This resolves the test failure reading YMM registers on Darwin. llvm-svn: 297774
OpenPOWER on IntegriCloud