summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins
Commit message (Collapse)AuthorAgeFilesLines
* Break some dependencies in lldbUtility.Zachary Turner2017-02-012-1/+909
| | | | | | Differential Revision: https://reviews.llvm.org/D29359 llvm-svn: 293806
* Transform ProcessLauncherLinux to ProcessLauncherPosixForkKamil Rytarowski2017-02-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Use ProcessLauncherPosixFork in Linux and NetBSD. Changes to ProcessLauncherLinux: - Limit personality.h and ASLR code to Linux. - Reuse portable ptrace(2) PT_TRACE_ME operation available on Linux and BSDs. - Limit ETXTBSY error path from execve(2) to Linux. - In LaunchProcess declaration change virtual to override. This code should be readily available for FreeBSD. Sponsored by <The NetBSD Foundation> Reviewers: joerg, clayborg, labath, emaste Reviewed By: labath Subscribers: danalbert, srhines, mgorny, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D29347 llvm-svn: 293768
* Open ELF core dumps with more than 64K sectionsPavel Labath2017-01-314-8/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Problem: There are three filelds in the ELF header - e_phnum, e_shnum, and e_shstrndx - that could be bigger than 64K and therefore do not fit in 16 bits reserved for them in the header. If this happens, pretty often there is a special section at index 0 which contains their real values for these fields in the section header in the fields sh_info, sh_size, and sh_link respectively. Fix: - Rename original fields in the header declaration. We want to have them around just in case. - Reintroduce these fields as 32-bit members at the end of the header. By default they are initialized from the header in Parse() method. - In Parse(), detect the situation when the header might have been extended into section info #0 and try to read it from the same data source. - ObjectFileELF::GetModuleSpecifications accesses some of these fields but the original parse uses too small data source. Re-parse the header if necessary using bigger data source. - ProcessElfCore::CreateInstance uses header with potentially sentinel values, but it does not access these fields, so a comment here is enough. Reviewers: labath Reviewed By: labath Subscribers: davidb, lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D29095 Author: Eugene Birukov <eugenebi@hotmail.com> llvm-svn: 293714
* [CMake] [4/4] Update a batch of pluginsChris Bieneman2017-01-3111-16/+93
| | | | | | This is extending the updates from r293696 to more LLDB plugins. llvm-svn: 293701
* [CMake] [3/4] Update a batch of pluginsChris Bieneman2017-01-3121-21/+210
| | | | | | This is extending the updates from r293696 to more LLDB plugins. llvm-svn: 293700
* [CMake] [2/4] Update a batch of pluginsChris Bieneman2017-01-3118-18/+174
| | | | | | This is extending the updates from r293696 to more LLDB plugins. llvm-svn: 293699
* [CMake] [1/4] Update a batch of pluginsChris Bieneman2017-01-3116-16/+175
| | | | | | This is extending the updates from r293696 to more LLDB plugins. llvm-svn: 293698
* [CMake] Add explicit dependencies to pluginsChris Bieneman2017-01-3113-13/+106
| | | | | | | | | | | | | | | | | Summary: This patch does two things. First it updates all the ABI plugins with accurate dependencies, and second it adds a tracking mechanism for add_lldb_library to denote plugin libraries, allowing us to build up a list of all the configured plugins. This list of generated plugins will be used during generating liblldb so that we can link all the plugins into the library. If this patch looks good I will update all the other plugins in subsequent patches. Reviewers: labath, zturner Subscribers: nemanjai, mgorny, lldb-commits, jgosnell Differential Revision: https://reviews.llvm.org/D29348 llvm-svn: 293696
* NFC. Remove unused header include.Chris Bieneman2017-01-311-1/+0
| | | | llvm-svn: 293646
* Recognize Real-Time Signals on NetBSDKamil Rytarowski2017-01-281-3/+31
| | | | | | | | | | | | | | | | | | | | Summary: Real-Time Signals are available in NetBSD-current and will land NetBSD 8.0. Older stable versions of NetBSD will not be supported. Sponsored by <The NetBSD Foundation> Reviewers: labath, joerg, clayborg, emaste Reviewed By: labath, clayborg, emaste Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D29091 llvm-svn: 293391
* NFC: Improve comments in SymbolFilePDB.cppAdrian McCarthy2017-01-271-72/+46
| | | | | | | Mostly this just fixes bad wrapping caused by the reformat, with tiny changes sprinkled here and there. llvm-svn: 293336
* include Host/Time.h in Cocoa.cppPavel Labath2017-01-251-0/+1
| | | | | | | Time.h contains the necessary magic to enable timegm on all android targets. llvm-svn: 293047
* NPL: Compartmentalize arm64 single step workaround betterPavel Labath2017-01-254-133/+106
| | | | | | | | | | | The main motivation for me doing this is being able to build an arm android lldb-server against api level 9 headers, but it seems like a good cleanup nonetheless. The entirety of the cpu_set_t dance now resides in SingleStepCheck.cpp, which is only built on arm64. llvm-svn: 293046
* Replace chdir() usage with the llvm equivalent.Pavel Labath2017-01-251-6/+2
| | | | | | | This removes a hack in PosixApi.h, which tends to produce strange compile errors when it's included in the wrong order. llvm-svn: 293045
* Fix a bug where lldb does not respect the packet size.Hafiz Abid Qadeer2017-01-241-5/+25
| | | | | | | | | | | | | | Summary: LLDB was using packet size advertised by the target as the max memory size to write in one go. It is wrong because packets have other overhead apart from memory payload. Also memory transferred through 'm' and 'M' packets needs 2 bytes in packet to transfer 1 of memory. Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D28808 llvm-svn: 292987
* FreeBSD ARM support for software single stepEd Maste2017-01-244-7/+237
| | | | | | | | | | | Implementation of software single step for FreeBSD on ARM. The code is largely based on the Linux implementation of the same functionality. Patch by Dmitry Mikulin! Differential Revision: https://reviews.llvm.org/D25756 llvm-svn: 292937
* android-mips: define PTRACE_GETREGSET in headers don't do itPavel Labath2017-01-241-0/+3
| | | | | | | PTRACE_GETREGSET is only defined on mips only since api level 21. Define it ourselves, so we can compile with older platform headers. llvm-svn: 292936
* Add format_provider for lldb::StateTypePavel Labath2017-01-241-5/+5
| | | | | | | | | | Reviewers: clayborg Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D29036 llvm-svn: 292920
* Prefer lzfse if it is an available compression method (this wasJason Molenda2017-01-241-3/+3
| | | | | | | defaulting to zlib previously). <rdar://problem/30159130> llvm-svn: 292884
* Replace getcwd with the llvm equivalentPavel Labath2017-01-231-4/+4
| | | | | | | | | | | | | | | | | | | | | Summary: getcwd() is not available (well.. um.. deprecated?) on windows, and the way PosixApi.h is providing it causes strange compile errors when it's included in the wrong order. The best way to avoid that is to just not use chdir. This replaces all uses of getcwd in generic code. There are still a couple of more uses, but these are in platform-specific code. chdir() is causing a similar problem, but for that there is no llvm equivalent for that (yet). Reviewers: zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D28858 llvm-svn: 292795
* Add a catch-all line for detecting dyld in the inferior processJason Molenda2017-01-212-0/+5
| | | | | | | shlibs so we don't miss dyld. <rdar://problem/30128580> llvm-svn: 292696
* Prevent client from querying each thread's PC at each stop.Pavel Labath2017-01-203-33/+71
| | | | | | | | | | | | | | | | | | Summary: The server was no longer sending the thread PCs the way the client expected them. I changed the server to send them back as a threadstop info field, similar to the Apple version of the server. I also changed the client to look for them there, before querying the server. I added a test to ensure the server doesn't stop sending them. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D28880 Author: Jason Majors llvm-svn: 292611
* Fix more unused variable warnings when asserts are disabled.Hafiz Abid Qadeer2017-01-203-0/+4
| | | | llvm-svn: 292598
* Refactor logging in NativeProcessLinuxPavel Labath2017-01-191-637/+323
| | | | | | | | | | Use the LLDB_LOG macro instead of the more verbose if(log) ... syntax. I have also consolidated the log channels (everything now goes to the posix channel, instead of a mixture of posix and lldb), and cleaned up some of the more convoluted log statements. llvm-svn: 292489
* Avoid unused variable warning when assert is disabled.Hafiz Abid Qadeer2017-01-191-2/+2
| | | | llvm-svn: 292488
* Fix a problem with the new dyld interface code -- when a new processJason Molenda2017-01-191-0/+5
| | | | | | | | | | starts up, we need to clear the target's image list and only add the binaries into the target that are actually present in this process run. <rdar://problem/29857613> llvm-svn: 292454
* Add a more succinct logging syntaxPavel Labath2017-01-181-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds the LLDB_LOG macro, which enables one to write more succinct log statements. if (log) log->Printf("log something: %d", var); becomes LLDB_LOG(log, "log something: {0}, var); The macro still internally does the "if(log)" dance, so the arguments are only evaluated if logging is enabled, meaning it has the same overhead as the previous syntax. Additionally, the log statements will be automatically prefixed with the file and function generating the log (if the corresponding new argument to the "log enable" command is enabled), so one does not need to manually specify this in the log statement. It also uses the new llvm formatv syntax, which means we don't have to worry about PRIx64 macros and similar, and we can log complex object (llvm::StringRef, lldb_private::Error, ...) more easily. Differential Revision: https://reviews.llvm.org/D27459 llvm-svn: 292360
* [cmake] Make lldb build with the android ndk toolchain filePavel Labath2017-01-171-1/+1
| | | | | | | | | | | | | | | | | Summary: The NDK cmake toolchain file defines CMAKE_SYSTEM_NAME=Android, so switch the build to use that. I have also updated the in-tree toolchain file to do that (instead of defining __ANDROID_NDK__), so it can still be used to build. After migrating the last bits of non-toolchainy bits out of the in-tree toolchain, I intend to delete it. Reviewers: tberghammer, danalbert Subscribers: srhines, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D28775 llvm-svn: 292212
* Remove a couple of Stream flagsPavel Labath2017-01-135-75/+2
| | | | | | | | | | | | | | | | | | | | | | | | Summary: I came across this while trying to understand what Log::Debug does. It turns out it does not do anything, as there is no instance of someone setting a debug flag on a stream. The same is true for the Verbose and AddPrefix flags. Removing these will enable some cleanups in the Logging class, and it brings us closer towards the long term goal of standardizing on llvm stream classes. I have removed these flags and all code the code which tested for their presence -- there wasn't much of it, mostly in SymbolFileDWARF, which is probably going away at some point anyway. The eBinary flag still has some users, so I am letting it life for the time being. Reviewers: clayborg, zturner Subscribers: aprantl, beanz, lldb-commits Differential Revision: https://reviews.llvm.org/D28616 llvm-svn: 291895
* Fix log typo in ABISysV_arm64.cppOmair Javaid2017-01-131-1/+1
| | | | | | | This commit fixes a typo in ABISysV_arm64.cpp. Log was reporting a call to ABISysV_x86_64::PrepareTrivialCall. llvm-svn: 291889
* Update to match clang r291737.Richard Smith2017-01-121-3/+2
| | | | llvm-svn: 291738
* Stop limiting the number of TSan backtrace size to 8Kuba Mracek2017-01-101-1/+2
| | | | | | | | We currently limit the length of TSan returned backtraces to 8, which is not necessary (and a bug, most likely). Let's remove this. Differential Revision: https://reviews.llvm.org/D28035 llvm-svn: 291522
* Remove an incorrect byte size calculation in DWARFASTParserClangTamas Berghammer2017-01-071-1/+1
| | | | llvm-svn: 291349
* Reapply "Fixes for Clang API changes to use std::shared_ptr"David Blaikie2017-01-061-16/+17
| | | | | | | | | Aleksey Shlyapnikov found the memory leak I introduced, recommitted the Clang change with a fix for this. This reapplies r291200 reverted in r291250 llvm-svn: 291271
* Revert "Fixes for Clang API changes to use std::shared_ptr"David Blaikie2017-01-061-17/+16
| | | | | | | | | The original Clang change caused a memory leak detected by asan. Reverting while I investigate. This reverts commit r291200. llvm-svn: 291250
* Fix clang build for r291198Pavel Labath2017-01-061-1/+1
| | | | | | | | | Older clangs (<=3.6) complain about a redefinition when we try to specialize a templace function declared with = delete. Instead, I just don't define the function body, which will trigger a linker error if someone tries to use an unknown function. llvm-svn: 291226
* Fixes for Clang API changes to use std::shared_ptrDavid Blaikie2017-01-061-16/+17
| | | | llvm-svn: 291200
* Fix -Wunused-function warning by preprocessor conditionalizing the function ↵David Blaikie2017-01-061-0/+2
| | | | | | the same way as the caller llvm-svn: 291199
* Make lldb -Werror clean for -Wstring-conversionDavid Blaikie2017-01-0612-44/+25
| | | | | | | | | Also found/fixed one bug identified by this warning in RenderScriptx86ABIFixups.cpp where a string literal was being used in an effort to provide a name for an instruction/register, but was instead being passed as the bool 'isVolatile' parameter. llvm-svn: 291198
* Fix jModulesInfo handling for cross-path syntax debuggingPavel Labath2017-01-051-1/+1
| | | | | | | We were sending paths with the host path separator, which meant the remote target did not understand our packets correctly. llvm-svn: 291103
* Silence some -Wstring-conversion warningsPavel Labath2017-01-051-1/+1
| | | | | | | | lldbassert(!"foo") -> lldbassert(0 && "foo") In one case, this actually detected a logic error in the assertion (missing !). llvm-svn: 291102
* Add a debuginfo version check for RenderScript modulesLuke Drummond2017-01-042-1/+53
| | | | | | | | | | Added an extra field parser to the `RSModuleDescriptor` class enabling us to check whether the versions of LLVM used to generated the debug symbols match across the RenderScript compiler frontend (llvm-rs-cc) and backend (bcc); if they do not, we warn the user that the debugging experience may be suboptimal as LLVM IR debug information has no compatibility guarantees. llvm-svn: 290957
* Improve the performance of jModulesInfo in lldb-serverTamas Berghammer2017-01-032-105/+92
| | | | | | | | | | | | Previously it parsed /proc/<pid>/maps for every module separately resulting in a very slow response time. This CL add some caching and optimizes the implementation to improve the code from O(n*m) to O(n+m) where n is the number of modules requested and m is the number of files mapped into memory. Differential revision: https://reviews.llvm.org/D28233 llvm-svn: 290895
* Simplify reading of Linux notes to correctly handle endianess.Howard Hellyer2017-01-031-100/+57
| | | | | | | | | | | | | | | Summary: This patch changes and simplifies the way notes are read from Linux Elf cores. The current implementation copies the bytes from the notes directly over the lldb structure for 64 bit cores and reads field by field for 32 bit cores. Reading the bytes directly only works if the endianess of the core dump and the platform that lldb are running on matches. The case statements for s390x and x86_64 would would only work on big endian systems and little endian systems respectively. That meant that x86_64 generally worked but s390x didn't unless you were on s390x or another big endian platform. This patch just reads field by field on all platform and updates the field by field version to allow for those fields which are word size instead of fixed size. It should also slightly simplify adding support for a new Linux platform. This patch also re-enables the s390x test case in TestLinuxCore.py on all non-s390x platforms as it now passes. Reviewers: uweigand, clayborg Differential Revision: https://reviews.llvm.org/D27571 llvm-svn: 290874
* Fix a couple of incorrect format string warningsLuke Drummond2016-12-221-2/+2
| | | | | | | | | | | This patch fixes use of incorrect `%zi` to format a plain `int`, and using `%llu` to format a `uint64_t`. The fix is to use the new typesafe `llvm::Formatv` based API. Differential Revision: https://reviews.llvm.org/D28028 Subscribers: lldb-commits llvm-svn: 290359
* Expression evaluation for overloaded C functions (redux)Luke Drummond2016-12-193-8/+115
| | | | | | | | | | | | | | | | | | | This is a redux of [Ewan's patch](https://reviews.llvm.org/D17957) , refactored to properly substitute primitive types using a hook in the itanium demangler, and updated after the previous patch went stale The new `SubsPrimitiveParmItanium` function takes a symbol name and replacement primitive type parameter as before but parses it using the FastDemangler, which has been modified to be able to notify clients of parse events (primitive types at this point). Additionally, we now use a `set` of `ConstStrings` instead of a `vector` so that we don't try and resolve the same invalid candidate multiple times. Differential Revision: https://reviews.llvm.org/D27223 Subscribers: lldb-commits llvm-svn: 290117
* Fix a bug when using a StructuredData darwin-log pluginJason Molenda2016-12-162-1/+20
| | | | | | | | | | | where we would insert a breakpoint into a system library but never remove it, so the second time we ran the binary there would be two breakpoints and the debugger would stop there. <rdar://problem/29654974> llvm-svn: 289913
* Fix build for mingw.Hafiz Abid Qadeer2016-12-152-2/+2
| | | | | | | | | | | | Summary: I was building lldb using cross mingw-w64 toolchain on Linux and observed some issues. This is first patch in the series to fix that build. It mostly corrects the case of include files and adjusts some #ifdefs from _MSC_VER to _WIN32 and vice versa. I built lldb on windows with VS after applying this patch to make sure it does not break the build there. Reviewers: zturner, labath, abidh Subscribers: ki.stfu, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D27759 llvm-svn: 289821
* Remove linux/personality.h wrapperPavel Labath2016-12-151-1/+0
| | | | | | | | | This code is currently unused. Removing it should make porting of the linux plugin to NetBSD easier, and we can always add it later if needed. llvm-svn: 289801
* Fix incorrectly named variables.Jim Ingham2016-12-151-1/+1
| | | | llvm-svn: 289746
OpenPOWER on IntegriCloud