summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
* Fix the 'tb' alias commandFrederic Riss2018-06-182-1/+26
| | | | | | | No idea when this broke or if it ever worked. Added a small test for one-shot breakpoints while I was there. llvm-svn: 334921
* Sort the files in the PBXBuildFile and PBXFileReference sectionsJason Molenda2018-06-151-152/+152
| | | | | | | | of debugserver's xcode project file to reduce automerger issues with the github swift repository of lldb where the order of these entries has drifted significantly over the years. llvm-svn: 334873
* Sort the files in the PBXBuildFile and PBXFileReferenceJason Molenda2018-06-151-2554/+2554
| | | | | | | | | sections of lldb's xcode project file to reduce automerger issues with the github swift repository of lldb where the order of these entries has drifted significantly over the years. llvm-svn: 334872
* Fix TestExec after r334783Frederic Riss2018-06-151-8/+1
| | | | | | | | | | | | The second makefile that was added has implicit rules which meant that secondprog.cpp would be built once into a secondprog binary, but it would also be compiled as a.out overwriting the main binary. This lead to spurious failures. This commit simplifies the Makefile to build only once with the correct executable name. llvm-svn: 334861
* Revert "[lldb-mi] Add overload method for setting an error"Alexander Polyakov2018-06-152-20/+0
| | | | | | | | | | | | | | | Summary: This reverts commit r334245 because it duplicates functionality of Status::AsCString used in SBError. Reviewers: aprantl, clayborg Reviewed By: clayborg Subscribers: lldb-commits, ki.stfu Differential Revision: https://reviews.llvm.org/D48212 llvm-svn: 334860
* Add support for PLATFORM_*SIMULATORFrederic Riss2018-06-151-0/+8
| | | | | | | | | | The toolchain in Xcode 10 uses a new LC_BUILD_VERSION entry to identify simulator binaries. Add support for reading those to debugserver. The exisitng test testing that code is currently failling when run with Xcode 10, no need for a new test. llvm-svn: 334784
* Change TestExec.py from creating an i386+x86_64 fat binaryJason Molenda2018-06-155-90/+87
| | | | | | | | | | on darwin systems and re-execing itself, to creating two separate test programs; lldb runs the first program and it exec's the second. Support for compiling for i386 is going away. llvm-svn: 334783
* Add an entitlement to debugserverFrederic Riss2018-06-144-5/+12
| | | | | | | | | On macOS 10.14, debugserver needs to have an entitlement do be allowed to debug processes. Adding this to both the Xcode and cmake build system. This shouldn't have any impact on previous OSs. llvm-svn: 334772
* One ShortFract ought to be enough for everyone.Benjamin Kramer2018-06-141-1/+0
| | | | llvm-svn: 334755
* Add remaining fixed-point types and saturated equivalents to fix -Wswitch of ↵Fangrui Song2018-06-141-0/+19
| | | | | | r334718 llvm-svn: 334745
* Add a script to setup codesigning on macOS.Frederic Riss2018-06-141-0/+57
| | | | | | | | I've been using this script on a couple machines and it seems to work so I'm putting it out there, maybe other people will find it useful. It is strongly inspired from a similar script in the delve project. llvm-svn: 334743
* DebugNamesDWARFIndex: fix handling of compressed sectionsPavel Labath2018-06-142-0/+15
| | | | | | | | | | | | | This fixes a silly bug where we were accidentally freeing the memory used to store the decompressed .debug_names data. I had actually considered this scenario when writing the class and put appropriate precautions in place -- I just failed to wire it all up correctly. This was only an issue for compressed sections because in case of uncompressed ones we would access the data straight out of the mmapped object file. llvm-svn: 334717
* Fix PathMappingListTest on windowsPavel Labath2018-06-141-3/+11
| | | | | | | | | | | | | r334615 changed the the value of FileSpec.IsRelative("/") for windows path syntax. We previously considered it absolute but now it is considered relative (I guess because it's interpretation depends on the current drive). This cause a failure in PathMappingList test, which assumed that "/" will not get remapped as it is an absolute path. As this is no longer true on windows, I replace "/" with a really absolute path. llvm-svn: 334702
* Fix includes in PlatformAppleSimulator.hPavel Labath2018-06-141-2/+2
| | | | | | | | This unbreaks the cmake build. Other plugins also use the include paths starting with Plugins/..., so I am hoping this will work for the xcode build too. llvm-svn: 334697
* fix cmake include path.Jason Molenda2018-06-141-1/+1
| | | | llvm-svn: 334680
* [FileSpec] Make style argument mandatory for SetFile. NFCJonas Devlieghere2018-06-132-2/+3
| | | | | | Update SetFile uses in the unittests. llvm-svn: 334668
* Move the header file to be in the same new place as the .mm file.Jason Molenda2018-06-132-2/+2
| | | | llvm-svn: 334667
* Fix group entry.Jason Molenda2018-06-131-1/+0
| | | | llvm-svn: 334666
* [FileSpec] Make style argument mandatory for SetFile. NFCJonas Devlieghere2018-06-1311-12/+17
| | | | | | Fix SetFile uses in hosts that I missed in r334663. llvm-svn: 334664
* [FileSpec] Make style argument mandatory for SetFile. NFCJonas Devlieghere2018-06-1350-109/+153
| | | | | | | | | | | | | | | | SetFile has an optional style argument which defaulted to the native style. This patch makes that argument mandatory so clients of the FileSpec class are forced to think about the correct syntax. At the same time this introduces a (protected) convenience method to update the file from within the FileSpec class that keeps the current style. These two changes together prevent a potential pitfall where the style might be forgotten, leading to the path being updated and the style unintentionally being changed to the host style. llvm-svn: 334663
* Fix macos xcode build.Jason Molenda2018-06-132-21/+38
| | | | llvm-svn: 334662
* [lit] Split test_set_working_dir TestProcessLaunch into two tests and fix it ↵Stella Stamenova2018-06-135-20/+60
| | | | | | | | | | | | | | | | | | | | | | on Windows Summary: test_set_working_dir was testing two scenario: failure to set the working dir because of a non existent directory and succeeding to set the working directory. Since the negative case fails on both Linux and Windows, the positive case was never tested. I split the test into two which allows us to always run both the negative and positive cases. The positive case now succeeds on Linux and the negative case still fails. During the investigation, it turned out that lldbtest.py will try to execute a process launch command up to 3 times if the command failed. This means that we could be covering up intermittent failures by running any test that does process launch multiple times without ever realizing it. I've changed the counter to 1 (though it can still be overwritten with the environment variable). This change also fixes both the positive and negative cases on Windows. There were a few issues: 1) In ProcessLauncherWindows::LaunchProcess, the error was not retrieved until CloseHandle was possibly called. Since CloseHandle is also a system API, its success would overwrite any existing error that could be retrieved using GetLastError. So by the time the error was retrieved, it was now a success. 2) In DebuggerThread::StopDebugging TerminateProcess was called on the process handle regardless of whether it was a valid handle. This was causing the process to crash when the handle was LLDB_INVALID_PROCESS (0xFFFFFFFF). 3) In ProcessWindows::DoLaunch we need to check that the working directory exists before launching the process to have the same behavior as other platforms which first check the directory and then launch process. This way we also control the exact error string. Reviewers: labath, zturner, asmith, jingham Reviewed By: labath Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D48050 llvm-svn: 334642
* [ObjC] Add dataformatter for NSDecimalNumberJonas Devlieghere2018-06-135-1/+72
| | | | | | | | | | This patch adds a data formatter for NSDecimalNumber. The latter is a Foundation object used for representing and performing arithmetic on base-10 numbers that bridges to Decimal. Differential revision: https://reviews.llvm.org/D48114 llvm-svn: 334638
* [ObjC] Use llvm::StringRef in summary providersJonas Devlieghere2018-06-131-20/+19
| | | | | | | Replace const char pointers with llvm::StringRef and use its equality operator for string comparisons. llvm-svn: 334631
* [FileSpec] Simplify getting extension and stem.Jonas Devlieghere2018-06-131-8/+3
| | | | | | | As noted by Pavel on lldb-commits, we don't need the temp path, we can just pass the filename directly into extension() and path(). llvm-svn: 334618
* [FileSpec] Delegate common operations to llvm::sys::pathJonas Devlieghere2018-06-139-79/+69
| | | | | | | | | | | | | | | With the recent changes in FileSpec to use LLVM's path style, it is possible to delegate a bunch of common path operations to LLVM's path helpers. This means we only have to maintain a single implementation and at the same time can benefit from the efforts made by the rest of the LLVM community. This is part one of a set of patches. There was no obvious way to split this so I just worked from top to bottom. Differential revision: https://reviews.llvm.org/D48084 llvm-svn: 334615
* Fix/unify the spelling of Objective-C.Adrian Prantl2018-06-1319-25/+25
| | | | llvm-svn: 334614
* Add modules support for lldb headers in include/Raphael Isemann2018-06-1310-7/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds a modulemap which allows compiling the lldb headers into C++ modules (for example in builds with LLVM_ENABLE_MODULES=On). Even though most of the affected code has been cleaned up to work with the more strict C++ module semantics, there are still some workarounds left in the current modulemap (the most obvious one is the big `lldb` wrapper module). It also moves the Obj-C++ files in lldb to their own subdirectories. This was necessary because we need to filter out the modules flags for this code. Note: With the latest clang and libstdc++ it seems necessary to have a STL C++ module to get a working LLVM_ENABLE_MODULES build for lldb. Otherwise clang will falsely detect ODR violations in the textually included STL code inside the lldb modules. Reviewers: aprantl, bruno Reviewed By: aprantl, bruno Subscribers: mgorny, yamaguchi, v.g.vassilev, lldb-commits Differential Revision: https://reviews.llvm.org/D47929 llvm-svn: 334611
* Disable warnings for the generated LLDB wrapper sourceRaphael Isemann2018-06-121-6/+5
| | | | | | | | | | | | | | | | | Summary: This source files emits all kind of compiler warnings on different platforms. As the source code in the file is generated and we therefore can't actually fix the warnings, we might as well disable them. Reviewers: aprantl, davide Reviewed By: davide Subscribers: davide, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D48096 llvm-svn: 334557
* Added modulemap for lldb-miRaphael Isemann2018-06-121-0/+79
| | | | | | | | | | | | | | Summary: This patch allows building a C++ module for the lldb-mi headers. Reviewers: bruno, aprantl Reviewed By: aprantl Subscribers: lldb-commits, ki.stfu Differential Revision: https://reviews.llvm.org/D47996 llvm-svn: 334549
* Refactor ExecuteAndWait to take StringRefs.Zachary Turner2018-06-122-4/+6
| | | | | | | | | | | | | | | | | | | This simplifies some code which had StringRefs to begin with, and makes other code more complicated which had const char* to begin with. In the end, I think this makes for a more idiomatic and platform agnostic API. Not all platforms launch process with null terminated c-string arrays for the environment pointer and argv, but the api was designed that way because it allowed easy pass-through for posix-based platforms. There's a little additional overhead now since on posix based platforms we'll be takign StringRefs which were constructed from null terminated strings and then copying them to null terminate them again, but from a readability and usability standpoint of the API user, I think this API signature is strictly better. llvm-svn: 334518
* DebugNamesDWARFIndex: Implement DWARFDeclContext variant of GetTypes methodPavel Labath2018-06-123-3/+28
| | | | | | | | | | | | This method is used to find complete definitions of a type when one parses a compile unit with only forward declaration available. Since it is only accessed from DWARFASTParserClang, it was not possible/easy to trigger this codepath from lldb-test. Therefore, I adapt add a debug-names variant to an existing dotest test to cover this scenario. llvm-svn: 334516
* Fix build error introduced in r334498Pavel Labath2018-06-121-2/+2
| | | | | | | | | | Some gcc versions (circa 4.9) do not accept initializing Expected objects containing a reference to a function from a function. Change the Expected object to contain function pointers to work around this. llvm-svn: 334501
* DWARFDebugNames: Implement last GetGlobalVariables overloadPavel Labath2018-06-123-3/+33
| | | | | | | This function implements the search for all global variables within a given compilation unit. llvm-svn: 334500
* lldb-test symbols: Add -file argument and the ability to dump global ↵Pavel Labath2018-06-124-73/+126
| | | | | | | | | | | | | | | variables in a file The motivation for this is to be able to Dwarf index ability to look up variables within a given compilation unit. It also fits in with the patch in progress at D47939, which will add the ability to look up funtions using file+line pairs. The verification of which lldb-test options can be used together was getting a bit unwieldy, so I moved the logic out into a separate function. llvm-svn: 334498
* lit/SymbolFile/DWARF: Simplify test RUN linesPavel Labath2018-06-128-22/+14
| | | | | | | Use -mllvm compiler argument to enable DWARF v5 accelerator tables instead of piping the IR through llc. llvm-svn: 334496
* Exempt some compilers from new static variable test.Jonas Devlieghere2018-06-121-8/+34
| | | | | | | | Apparently some compilers generate incomplete debug information which caused the updated test to fail. Therefore I've extracted the new check into a separate test case with the necessary decorators. llvm-svn: 334456
* [Test] Update static variable test.Jonas Devlieghere2018-06-111-4/+23
| | | | | | | | | | Before Pavel's change in r334181, we were printing too many global variables. This patch updates the test suite to ensure we don't regress again in the future. rdar://problem/29180927 llvm-svn: 334454
* Document how lldb uses the DBGSourcePathRemapping Jason Molenda2018-06-112-11/+14
| | | | | | | source path remapping src/dest path pairs with respect to the DBGVersion number in the plist. llvm-svn: 334442
* Add DebugNamesDWARFIndex.cpp.Jason Molenda2018-06-111-0/+6
| | | | llvm-svn: 334441
* Add a new SBTarget::LoadCore() overload which surfaces errors if the load failsLeonard Mosescu2018-06-114-67/+102
| | | | | | | | | | | | | There was no way to find out what's wrong if SBProcess SBTarget::LoadCore(const char *core_file) failed. Additionally, the implementation was unconditionally setting sb_process, so it wasn't even possible to check if the return SBProcess is valid. This change adds a new overload which surfaces the errors and also returns a valid SBProcess only if the core load succeeds: SBProcess SBTarget::LoadCore(const char *core_file, SBError &error); Differential Revision: https://reviews.llvm.org/D48049 llvm-svn: 334439
* Fix tuple getter in std unique pointer pretty-printerPavel Labath2018-06-113-0/+18
| | | | | | | | | | | | | Summary: Check case when _M_t child member is not present. Reviewers: labath, tberghammer Reviewed By: labath, tberghammer Differential Revision: https://reviews.llvm.org/D47932 Patch by Aleksandr Urakov <aleksandr.urakov@jetbrains.com>. llvm-svn: 334411
* DWARFDebugNames: Fix lookup in dwo filesPavel Labath2018-06-113-9/+56
| | | | | | | | | | | | The getDIESectionOffset function is not correct for split dwarf files (and will probably be removed in D48009). This patch implements correct section offset computation for split and non-split compile units -- we first need to check if the referenced unit is a skeleton unit, and if it is, we add the die offset to the full unit base offset (as the full unit is the one which contains the die). llvm-svn: 334402
* Move VersionTuple from clang/Basic to llvm/SupportPavel Labath2018-06-111-5/+4
| | | | | | | | | | | | | | | | | | | | | | | Summary: This kind of functionality is useful to other project apart from clang. LLDB works with version numbers a lot, but it does not have a convenient abstraction for this. Moving this class to a lower level library allows it to be freely used within LLDB. Since this class is used in a lot of places in clang, and it used to be in the clang namespace, it seemed appropriate to add it to the list of adopted classes in LLVM.h to avoid prefixing all uses with "llvm::". Also, I didn't find any tests specific for this class, so I wrote a couple of quick ones for the more interesting bits of functionality. Reviewers: zturner, erik.pilkington Subscribers: mgorny, cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D47887 llvm-svn: 334399
* Editline: make #include <codecvt> conditionalPavel Labath2018-06-111-0/+2
| | | | | | | | | My previous patch made this include unconditional. However, it seems it is not available everywhere. This patch makes us include it only in configurations we really need it, which should be enough to unblock the bots. llvm-svn: 334397
* [cmake] Detect presence of wide-char libedit at build timePavel Labath2018-06-114-14/+33
| | | | | | | | | | | | | | | | | Summary: Instead of hardcoding a list of platforms where libedit is known to have wide char support we detect this in cmake. The main motivation for this is attempting to improve compatibility with different versions of libedit, as the interface of non-wide-char functions varies slightly between versions. Reviewers: krytarowski, uweigand, jankratochvil, timshen, beanz Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D47625 llvm-svn: 334393
* [lldb-mi] Re-implement MI -exec-step command.Alexander Polyakov2018-06-104-25/+53
| | | | | | | | | | | | | | Summary: Now -exec-step uses SB API instead of HandleCommand hack. Reviewers: aprantl, clayborg, labath, stella.stamenova Reviewed By: aprantl Subscribers: ki.stfu, lldb-commits Differential Revision: https://reviews.llvm.org/D47838 llvm-svn: 334364
* [lldb, lldb-mi] Re-implement MI -exec-continue command.Alexander Polyakov2018-06-093-34/+30
| | | | | | | | | | | | | | Summary: Now -exec-continue command uses SB API to resume target's process. Reviewers: aprantl, clayborg, labath Reviewed By: clayborg Subscribers: apolyakov, labath, ki.stfu, llvm-commits, lldb-commits Differential Revision: https://reviews.llvm.org/D47415 llvm-svn: 334350
* Remove more dead code from NativeProcessLinuxAlex Langford2018-06-081-14/+0
| | | | | | This should have been removed in r334333. llvm-svn: 334336
* Delete dead code in NativeProcessLinuxAlex Langford2018-06-081-149/+0
| | | | | | | As far as I can tell, this code has always been guarded by `#if 0`. If this is useful code, it can be added back. llvm-svn: 334333
OpenPOWER on IntegriCloud