summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* Get rid of Error::PutToLog().Zachary Turner2017-02-065-168/+57
| | | | | | | | | | | | | Instead just rely on LLDB_LOG(). This is part of an effort to sort out dependency hell in LLDB. Error is in Utility, but Log is in Core. Core can depend on Utility, but not vice versa. So this patch moves the knowledge about how to log Errors from the Error class to the Log file. Differential Revision: https://reviews.llvm.org/D29514 llvm-svn: 294210
* Fix Xcode project.Greg Clayton2017-02-061-38/+38
| | | | llvm-svn: 294206
* Switch std::call_once to llvm::call_onceKamil Rytarowski2017-02-0636-111/+157
| | | | | | | | | | | | | | | | | | | | | Summary: The std::call_once implementation in libstdc++ has problems on few systems: NetBSD, OpenBSD and Linux PPC. LLVM ships with a homegrown implementation llvm::call_once to help on these platforms. This change is required in the NetBSD LLDB port. std::call_once with libstdc++ results with crashing the debugger. Sponsored by <The NetBSD Foundation> Reviewers: labath, joerg, emaste, mehdi_amini, clayborg Reviewed By: labath, clayborg Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D29288 llvm-svn: 294202
* Synchronize PlatformNetBSD with LinuxKamil Rytarowski2017-02-052-310/+298
| | | | | | | | | | | | | | | | | | | | | Summary: Update the code to the new world code. These changes are needed for remote process plugin. Sponsored by <The NetBSD Foundation> Reviewers: emaste, clayborg, joerg, labath Reviewed By: clayborg, labath Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D29266 llvm-svn: 294145
* Clean up PlatformLinux codePavel Labath2017-02-052-70/+1
| | | | | | | | don't create a platform.linux setting category, as it contains no actual settings, and I don't forsee adding any soon. Also remove some unused includes while I'm in there. llvm-svn: 294114
* Remove LIBLLDB_LOG_VERBOSE categoryPavel Labath2017-02-0518-226/+142
| | | | | | | | | | | | | | | | | | | | | Summary: Per discussion in D28616, having two ways two request logging (log enable lldb XXX verbose && log enable -v lldb XXX) is confusing. This removes the first option and standardizes all code to use the second one. I've added a LLDB_LOGV macro as a shorthand for if(log && log->GetVerbose()) and switched most of the affected log statements to use that (I've only left a couple of cases that were doing complex computations in an if(log) block). Reviewers: jingham, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D29510 llvm-svn: 294113
* Install six.py conditionallyKamil Rytarowski2017-02-045-5/+20
| | | | | | | | | | | | | | | | | | | | | | | Summary: The current version of LLDB installs six.py into global python library directory. This approach produces conflicts downstream with distribution's py-six copy. Introduce new configure option LLDB_USE_SYSTEM_SIX (disabled by default). Once specified as TRUE, six.py won't be installed to Python's directory. Add new option in finishSwigWrapperClasses.py, namely --useSystemSix. Sponsored by <The NetBSD Foundation> Reviewers: mgorny, emaste, clayborg, joerg, labath Reviewed By: labath Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D29405 llvm-svn: 294071
* Add a missing break statementPavel Labath2017-02-031-0/+1
| | | | llvm-svn: 294036
* Fix incorrect logging in ThreadPlan::ShouldReportStopPavel Labath2017-02-031-5/+2
| | | | | | | it used printf with formatv style specifications. Also, switch to LLDB_LOG. llvm-svn: 294024
* Use LLDB_LOG in NativeRegisterContextLinux*** filesPavel Labath2017-02-034-182/+79
| | | | llvm-svn: 294023
* Push down more common code into PlatformPOSIXPavel Labath2017-02-0312-226/+51
| | | | | | | | | | | | | | | | | | | | Summary: - GetFileWithUUID: All platforms except PlatformDarwin had this. However, I see no reason why this code would not apply there as well. - GetProcessInfo, FindProcesses: The implementation was the same in all classes. - GetFullNameForDylib: This code should apply to all non-darwin platforms. I've kept the PlatformDarwin override as the situation is different there. Reviewers: clayborg, krytarowski, emaste Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D29496 llvm-svn: 294019
* Fix mac build breakage due to StringStream movePavel Labath2017-02-021-1/+1
| | | | llvm-svn: 293948
* Move classes from Core -> Utility.Zachary Turner2017-02-02512-691/+698
| | | | | | | | | | | | | | | | | | | | | | | This moves the following classes from Core -> Utility. ConstString Error RegularExpression Stream StreamString The goal here is to get lldbUtility into a state where it has no dependendencies except on itself and LLVM, so it can be the starting point at which to start untangling LLDB's dependencies. These are all low level and very widely used classes, and previously lldbUtility had dependencies up to lldbCore in order to use these classes. So moving then down to lldbUtility makes sense from both the short term and long term perspective in solving this problem. Differential Revision: https://reviews.llvm.org/D29427 llvm-svn: 293941
* Fix windows build after r293821Pavel Labath2017-02-021-1/+1
| | | | | | | | We started passing the list of libraries to link to the add_lldb_unittest macro, but that macro wasn't actually doing anything with them. Fix that. llvm-svn: 293913
* Unify PlatformPOSIX::ResolveExecutablePavel Labath2017-02-0212-563/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: various platforms very using nearly identical code for this method. As far as I can tell there was nothing platform-specific about the differences, but rather it looked like it was caused by tiny tweaks being made to individual copies without affecting the overall functionality. I have taken the superset of all these tweaks and put it into one method in the base class (incidentaly, nobody was using the base class implementation of the method, as all classes were overriding it). From the darwin class I took the slightly improved error reporting (checking whether the file is readable) and the ResolveExecutableInBundle call (which has no effect elsewhere as the function is already a no-op on non-darwin platforms). From the linux class I took the set-the-triple-vendor-to-host-if-unspecified tweak (present in PlatformKalimba as well). PlatformWindows has an identical copy as well. We could resolve that by pushing this code further down into Platform class, that that would require pushing the m_remote_platform_sp member as well, which seems like a bad design choice. Reviewers: clayborg, emaste, krytarowski Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D29406 llvm-svn: 293910
* Fix multi-process-driver.cpp build on NetBSDKamil Rytarowski2017-02-021-1/+1
| | | | | | | | | | | | | | | | | | | Summary: Include <string.h> for strcmp(3) and memset(3). Sponsored by <The NetBSD Foundation> Reviewers: joerg, clayborg, emaste, labath Reviewed By: clayborg Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D29403 llvm-svn: 293895
* Add logging to SBThread::GetInfoItemByPathAsString toJason Molenda2017-02-022-8/+10
| | | | | | | | | | | | print the path being requested. Change the GetInfoItemByPathAsString docuemtnation in the .i file to use docstring instead of autodoc so the function signature is included in the python help. <rdar://problem/29999567> llvm-svn: 293858
* Update xcodeproj to track ConvertEnum.cpp et al being removed.Jason Molenda2017-02-011-18/+0
| | | | llvm-svn: 293831
* [CMake] Update unit tests with accurate dependenciesChris Bieneman2017-02-0118-5/+125
| | | | | | This is extending the updates from r293696 to the LLDB unit tests. llvm-svn: 293821
* Break some dependencies in lldbUtility.Zachary Turner2017-02-0125-1423/+1031
| | | | | | Differential Revision: https://reviews.llvm.org/D29359 llvm-svn: 293806
* [cmake] Remove VERSION property from executable targetsPavel Labath2017-02-013-7/+0
| | | | | | | | | | | | | | | | Summary: Currently, in the default configuration, the "install" target will install all llvm executables unversioned, except for three lldb tools which will be installed versioned (with a non-versioned symlink). This rectifies that situation. Reviewers: beanz, sylvestre.ledru, mgorny Subscribers: ki.stfu, lldb-commits Differential Revision: https://reviews.llvm.org/D29126 llvm-svn: 293803
* Fix android build of the new process launcherPavel Labath2017-02-011-0/+1
| | | | | | | Android does not define the "cross-platform" symbol PT_TRACE_ME. Define it ourselves, so we can keep the rest of the code generic. llvm-svn: 293779
* Do not pass non-POD type variables through variadic functionKamil Rytarowski2017-02-015-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Cannot pass object of non-POD type 'const CMIUtilString' through variadic function. This behavior is undefined according to C++11 5.2.2/7: > Passing a potentially-evaluated argument of class type having a non-trivial copy constructor, a non-trivial move contructor, or a non-trivial destructor, with no corresponding parameter, is conditionally-supported with implementation-defined semantics. Replace SetErrorDescriptionn(errMsg); with SetErrorDescription(errMsg); Original patch by Tobias Nygren (NetBSD). Sponsored by <The NetBSD Foundation> Reviewers: clayborg, labath, emaste, joerg, ki.stfu Reviewed By: labath, ki.stfu Subscribers: tnn, ki.stfu, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D29256 llvm-svn: 293774
* Document that LaunchProcessPosixSpawn is used on NetBSDKamil Rytarowski2017-02-011-1/+1
| | | | | | | | No functional change. Sponsored by <The NetBSD Foundation> llvm-svn: 293770
* Transform ProcessLauncherLinux to ProcessLauncherPosixForkKamil Rytarowski2017-02-017-257/+263
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix missing include after r293660Ismail Donmez2017-02-011-0/+1
| | | | llvm-svn: 293767
* When I added the use of the new compression framework (present inJason Molenda2017-02-011-16/+8
| | | | | | | | | | | | | | | | | Mac OS X 10.11, El Capitan, released c. Oct 2015) I conditionalized the use of the framework on "if sdk == macosx 10.11". But since macOS 10.12 has shipped this year, the framework was no longer being built in. I can either start listing every OS 10.11 and newer, or remove the version check. This will break building lldb with xcodebuild / Xcode for people running Mac OS X 10.10 or older. If so, I'll back this change out. I'm not sure if we have many people working on macs running the older OSes on their build systems. <rdar://problem/30159130> llvm-svn: 293742
* Open ELF core dumps with more than 64K sectionsPavel Labath2017-01-318-8/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-3114-14/+111
| | | | | | | | | | | | | | | | | 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
* [CMake] Partial revert of r293686Chris Bieneman2017-01-311-12/+125
| | | | | | This change reverts the lldb-server part of r293686, which is having trouble on Linux bots. I'm not sure if I can make lldb-server work correctly until the full dependency graph is fixed. llvm-svn: 293690
* [CMake] Fix broken NetBSD botsChris Bieneman2017-01-311-4/+5
| | | | | | http://lab.llvm.org:8011/builders/lldb-amd64-ninja-netbsd7/builds/4558/steps/cmake%20local/logs/stdio llvm-svn: 293687
* [CMake] Add accurate dependency specificationsChris Bieneman2017-01-3117-177/+249
| | | | | | | | | | | | | | | | | Summary: This patch adds accurate dependency specifications to the mail LLDB libraries and tools. In all cases except lldb-server, these dependencies are added in addition to existing dependencies (making this low risk), and I performed some code cleanup along the way. For lldb-server I've cleaned up the LLVM dependencies down to just the minimum actually required. This is more than lldb-server actually directly references, and I've left a todo in the code to clean that up. Reviewers: labath, zturner Subscribers: lldb-commits, danalbert, srhines, ki.stfu, mgorny, jgosnell Differential Revision: https://reviews.llvm.org/D29333 llvm-svn: 293686
* Move the stop point to somewhere before the final use of theJim Ingham2017-01-311-1/+2
| | | | | | variable we are inspecting. llvm-svn: 293666
* Add a command to access and manipulate the Intel(R) MPX Boundary Tables.Valentina Giusti2017-01-317-0/+679
| | | | | | | | | | | | | | | | | | | | | | | | Summary: The Boundary Table Entries are stored in the application memory and allow to store boundary info for all the pointers of the program, also those that otherwise wouldn't fit in the 4 bound registers provided by the HW. Here is an example of how it works: * mpx-table show <pointer> lbound = 0x..., ubound = 0x..., (pointer value = 0x..., metadata = 0x...) * mpx-table set <pointer> Signed-off-by: Valentina Giusti <valentina.giusti@intel.com> Reviewers: labath, clayborg Reviewed By: clayborg Subscribers: lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D29078 llvm-svn: 293660
* [CMake] Add LINK_LIBS and LINK_COMPONENTS optionsChris Bieneman2017-01-311-17/+24
| | | | | | | | This patch adds CMake options to add_lldb_library and add_lldb_executable for specifying LLVM components and direct library links. This patch is NFC, but it is a small separable bit of a series of much larger patches that I'll be landing over the next day or two. llvm-svn: 293647
* NFC. Remove unused header include.Chris Bieneman2017-01-311-1/+0
| | | | llvm-svn: 293646
* Add NetBSD support in Host::GetCurrentThreadIDKamil Rytarowski2017-01-311-0/+6
| | | | | | | | | | | | | | | | | | | Summary: To retrieve the native thread ID there must be called _lwp_self(). Sponsored by <The NetBSD Foundation> Reviewers: joerg, clayborg, emaste, labath Reviewed By: joerg, clayborg, labath Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D29264 llvm-svn: 293625
* Switch HostInfoNetBSD::GetProgramFileSpec to sysctl(7)Kamil Rytarowski2017-01-281-9/+9
| | | | | | | | | | | | | | | | | | | | | | Summary: Remove dependency on the proc (/proc) filesystem, which is optional. KERN_PROC_PATHNAME is 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: emaste, joerg, labath, clayborg Reviewed By: clayborg Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D29089 llvm-svn: 293392
* 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
* One of the changes Jim made in r286288 (cleaning up the stop printJason Molenda2017-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | header line, backtrace output) was to remove the current pc value from frames where we have source level information. We've been discussing this for the past week and based on input from a group of low level users, I believe this is the wrong default behavior for the command line lldb tool. lldb's backtrace will include the pc value for all stack frames regardless of whether they have source level debug information or not. A related part of r286288 removes the byte offset printing for functions with source level information (e.g. "main + 22 sourcefile.c:10" is printed as "main sourcefile.c:10"). I don't see a compelling case for changing this part of 286288 so I'm leaving that as-is (in addition to the rest of 286288 which is clearly better than the previous output style). <rdar://problem/30083904> llvm-svn: 293366
* 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
* Address post-commit review remarksPavel Labath2017-01-272-2/+2
| | | | | | | Tamas pointed out that the macro name I used in r293282 was too vague. Rename it to better reflect what it is used for. llvm-svn: 293287
* Fix android-i386 build broken by previous commitPavel Labath2017-01-271-1/+2
| | | | | | | | | I foolishly thought I could simplify the condition to cover all android targets. I was wrong - i386 headers don't define __NR_accept. Revert back to enabling the workaround on arm an mips only. llvm-svn: 293282
* Refactor the android accept hackPavel Labath2017-01-273-13/+11
| | | | | | | | This moves the accept hack from the android toolchain file into LLDBConfig.cmake. This allows successful lldb android compilation without relying on our custom toolchain file. llvm-svn: 293281
* Unroll r292930 due to TestCallThatThrows test fail is not fixed in ↵Boris Ulasevich2017-01-279-254/+24
| | | | | | reasonable time. llvm-svn: 293269
* Removed an unneccesary #if now that debugserver-mini links Foundation.Sean Callanan2017-01-261-2/+0
| | | | llvm-svn: 293161
OpenPOWER on IntegriCloud