summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/windows
Commit message (Collapse)AuthorAgeFilesLines
...
* iwyu fixes for lldbCore.Zachary Turner2017-04-061-0/+1
| | | | | | | | | | | | | | This adjusts header file includes for headers and source files in Core. In doing so, one dependency cycle is eliminated because all the includes from Core to that project were dead includes anyway. In places where some files in other projects were only compiling due to a transitive include from another header, fixups have been made so that those files also include the header they need. Tested on Windows and Linux, and plan to address failures on OSX and FreeBSD after watching the bots. llvm-svn: 299714
* Move FileSpec from Host -> Utility.Zachary Turner2017-03-221-1/+1
| | | | llvm-svn: 298536
* Resubmit "Delete the remainder of platform specific code in FileSpec."Zachary Turner2017-03-222-0/+2
| | | | | | | | | | | | | | 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
* Revert "Delete the remainder of platform specific code in FileSpec."Pavel Labath2017-03-222-2/+0
| | | | | | | This reverts commit r298465 as it breaks TestLLVM.TestHomeDirectory.test_tilde_home_directory. llvm-svn: 298509
* Delete the remainder of platform specific code in FileSpec.Zachary Turner2017-03-222-0/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D31129 llvm-svn: 298465
* Resubmit r298334 after fixing OSX build errors.Zachary Turner2017-03-211-87/+0
| | | | | | | 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-211-0/+87
| | | | | | on macosx. llvm-svn: 298338
* Delete various lldb FileSystem functions.Zachary Turner2017-03-211-87/+0
| | | | | | | | Use LLVM's equivalent versions instead. Differential Revision: https://reviews.llvm.org/D31111 llvm-svn: 298334
* Remove FileSystem::Get/SetFilePermissionsZachary Turner2017-03-191-28/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D31089 llvm-svn: 298205
* Remove FileSystem::MakeDirectory.Zachary Turner2017-03-191-15/+0
| | | | | | | | Have callers use llvm::sys::fs::create_directory() instead. Differential Revision: https://reviews.llvm.org/D31086 llvm-svn: 298203
* Move GetAuxvData from Host to relevant process pluginsPavel Labath2017-03-171-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Remove LLDB's recursive directory deletion function.Zachary Turner2017-03-091-34/+0
| | | | | | LLVM now has such a function, so we use that instead. llvm-svn: 297360
* Delete LLDB's code for getting / setting thread name.Zachary Turner2017-03-042-67/+0
| | | | | | | This is now functionality in LLVM, and all callers have already been updated to use the LLVM functions. llvm-svn: 296946
* Move DataBuffer / DataExtractor and friends from Core -> Utility.Zachary Turner2017-03-041-2/+2
| | | | llvm-svn: 296943
* Move Log from Core -> Utility.Zachary Turner2017-03-032-2/+2
| | | | | | | | | All references to Host and Core have been removed, so this class can now safely be lowered into Utility. Differential Revision: https://reviews.llvm.org/D30559 llvm-svn: 296909
* Switch std::call_once to llvm::call_onceKamil Rytarowski2017-02-061-2/+3
| | | | | | | | | | | | | | | | | | | | | 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
* Move classes from Core -> Utility.Zachary Turner2017-02-024-4/+4
| | | | | | | | | | | | | | | | | | | | | | | 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
* Replace chdir() usage with the llvm equivalent.Pavel Labath2017-01-251-9/+0
| | | | | | | 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
* Replace getcwd with the llvm equivalentPavel Labath2017-01-231-25/+2
| | | | | | | | | | | | | | | | | | | | | 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
* Attempt to fix windows build for r291198Pavel Labath2017-01-061-0/+1
| | | | llvm-svn: 291233
* Make lldb -Werror clean for -Wstring-conversionDavid Blaikie2017-01-061-8/+6
| | | | | | | | | 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 build for mingw.Hafiz Abid Qadeer2016-12-153-12/+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
* [lldb] Fix typos in file headersAlexander Shaposhnikov2016-11-261-0/+9
| | | | | | | | | | | | | This diff fixes typos in file headers (incorrect file names). Test plan: Under llvm/tools/lldb/source: find ./* -type f | grep -e '\(cpp\|h\)$' | while read F; do B=$(basename $F); echo $F head -n 1 $F | grep -v $B | wc -l ; done Differential revision: https://reviews.llvm.org/D27115 llvm-svn: 287966
* Fix builds Windows and OSX builds after Connection refactor in r287922Pavel Labath2016-11-251-2/+6
| | | | | | | | | Switch various bits of platform-specific code to chrono that I did not notice when doing a linux build. This exposed a bug that ConnectionGenericFileWindows did not handle the magic UINT32_MAX timeout value (instead it waited for about an hour, which is close enough I guess). Fix that as well. llvm-svn: 287927
* Convert Platform, Process, and Connection functions to StringRef.Zachary Turner2016-11-171-11/+8
| | | | | | All tests pass on Linux and Windows. llvm-svn: 287259
* Don't allow direct access to StreamString's internal buffer.Zachary Turner2016-11-161-2/+3
| | | | | | | | | | | | | | | This is a large API change that removes the two functions from StreamString that return a std::string& and a const std::string&, and instead provide one function which returns a StringRef. Direct access to the underlying buffer violates the concept of a "stream" which is intended to provide forward only access, and makes porting to llvm::raw_ostream more difficult in the future. Differential Revision: https://reviews.llvm.org/D26698 llvm-svn: 287152
* Revert unwanted changes in lldb when updating llvm::Error()Mehdi Amini2016-11-112-6/+6
| | | | | | | | My script updated lldb::Errors, and I failed to fix it entirely before pushing. This restore everything in lldb as it was before r286561. llvm-svn: 286565
* Make the Error class constructor protectedMehdi Amini2016-11-112-6/+6
| | | | | | | | | This is forcing to use Error::success(), which is in a wide majority of cases a lot more readable. Differential Revision: https://reviews.llvm.org/D26481 llvm-svn: 286561
* Remove TimeValue usage from lldb/HostPavel Labath2016-11-091-4/+1
| | | | llvm-svn: 286371
* Convert some Args index-based iteration to range-style iteration.Zachary Turner2016-10-051-2/+2
| | | | | | | | | | | | | | This is better for a number of reasons. Mostly style, but also: 1) Signed-unsigned comparison warnings disappear since there is no loop index. 2) Iterating with the range-for style gives you back an entry that has more than just a const char*, so it's more efficient and more useful. 3) Makes code safter since the type system enforces that it's impossible to index out of bounds. llvm-svn: 283413
* Make lldb -Werror clean on Windows.Zachary Turner2016-10-058-23/+17
| | | | | | Differential Revision: https://reviews.llvm.org/D25247 llvm-svn: 283344
* Again fixing windows build breakage like in rL282862Dimitar Vlahovski2016-09-301-2/+2
| | | | llvm-svn: 282866
* Fixing windows build breakage caused by rL282822Dimitar Vlahovski2016-09-301-10/+10
| | | | | | | The breakage was because of the moving of the UTF functions to the llvm namespace llvm-svn: 282862
* Change FileAction::GetPath() to return a StringRef.Zachary Turner2016-09-231-1/+1
| | | | llvm-svn: 282306
* Fix more functions in Args to use StringRef.Zachary Turner2016-09-191-1/+1
| | | | | | | | | | | | | | | This patch also marks the const char* versions as =delete to prevent their use. This has the potential to cause build breakages on some platforms which I can't compile. I have tested on Windows, Linux, and OSX. Best practices for fixing broken callsites are outlined in Args.h in a comment above the deleted function declarations. Eventually we can remove these =delete declarations, but for now they are important to make sure that all implicit conversions from const char * are manually audited to make sure that they do not invoke a conversion from nullptr. llvm-svn: 281919
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-0613-2132/+1784
| | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
* Delete Host/windows/win32.hZachary Turner2016-08-092-2/+2
| | | | | | | | | | | | | | | | | | | It's always hard to remember when to include this file, and when you do include it it's hard to remember what preprocessor check it needs to be behind, and then you further have to remember whether it's windows.h or win32.h which you need to include. This patch changes the name to PosixApi.h, which is more appropriately named, and makes it independent of any preprocessor setting. There's still the issue of people not knowing when to include this, because there's not a well-defined set of things it exposes other than "whatever is missing on Windows", but at least this should make it less painful to fix when problems arise. This patch depends on LLVM revision r278170. llvm-svn: 278177
* Clean up vestigial remnants of locking primitivesSaleem Abdulrasool2016-07-282-207/+0
| | | | | | | | | | | | | | | | This finally removes the use of the Mutex and Condition classes. This is an intricate patch as the Mutex and Condition classes were tied together. Furthermore, many places had slightly differing uses of time values. Convert timeout values to relative everywhere to permit the use of std::chrono::duration, which is required for the use of std::condition_variable's timeout. Adjust all Condition and related Mutex classes over to std::{,recursive_}mutex and std::condition_variable. This change primarily comes at the cost of breaking the TracingMutex which was based around the Mutex class. It would be possible to write a wrapper to provide similar functionality, but that is beyond the scope of this change. llvm-svn: 277011
* Generalize child process monitoring functionsPavel Labath2016-05-112-6/+5
| | | | | | | | | | | | | | | | | | | | | | Summary: This replaces the C-style "void *" baton of the child process monitoring functions with a more C++-like API taking a std::function. The motivation for this was that it was very difficult to handle the ownership of the object passed into the callback function -- each caller ended up implementing his own way of doing it, some doing it better than others. With the new API, one can just pass a smart pointer into the callback and all of the lifetime management will be handled automatically. This has enabled me to simplify the rather complicated handshake in Host::RunShellCommand. I have left handling of MonitorDebugServerProcess (my original motivation for this change) to a separate commit to reduce the scope of this change. Reviewers: clayborg, zturner, emaste, krytarowski Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D20106 llvm-svn: 269205
* Fix Windows build.Chaoren Lin2016-04-191-0/+1
| | | | llvm-svn: 266702
* Unicode support on Win32.Zachary Turner2016-03-228-125/+306
| | | | | | | | | | | | | Win32 API calls that are Unicode aware require wide character strings, but LLDB uses UTF8 everywhere. This patch does conversions wherever necessary when passing strings into and out of Win32 API calls. Patch by Cameron Differential Revision: http://reviews.llvm.org/D17107 Reviewed By: zturner, amccarth llvm-svn: 264074
* Add support for reading line tables from PDB files.Zachary Turner2016-03-021-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | PDB is Microsoft's debug information format, and although we cannot yet generate it, we still must be able to consume it. Reason for this is that debug information for system libraries (e.g. kernel32, C Runtime Library, etc) only have debug info in PDB format, so in order to be able to support debugging of system code, we must support it. Currently this code should compile on every platform, but on non-Windows platforms the PDB plugin will return 0 capabilities, meaning that for now PDB is only supported on Windows. This may change in the future, but the API is designed in such a way that this will require few (if any) changes on the LLDB side. In the future we can just flip a switch and everything will work. This patch only adds support for line tables. It does not return information about functions, types, global variables, or anything else. This functionality will be added in a followup patch. Differential Revision: http://reviews.llvm.org/D17363 Reviewed by: Greg Clayton llvm-svn: 262528
* Fix TestProcessLaunch for Python 3.Zachary Turner2016-01-131-2/+33
| | | | | | | | | | | | | | | | | | There were a number of problems preventing this from working: 1. The SWIG typemaps for converting Python lists to and from C++ arrays were not updated for Python 3. So they were doing things like PyString_Check instead of using the PythonString from PythonDataObjects. 2. ProcessLauncherWindows was ignoring the environment completely. So any test that involved launching an inferior with any kind of environment variable would have failed. 3. The test itself was using process.GetSTDOUT(), which isn't implemented on Windows. So this was changed to save the value of the environment variable in a local variable and have the debugger look at the value of the variable. llvm-svn: 257669
* Fix an issue where LLDB would not launch argdumper correctly if there were ↵Enrico Granata2015-11-191-1/+1
| | | | | | spaces in the path to it llvm-svn: 253599
* Rename argdumper to lldb-argdumperTodd Fiala2015-10-291-4/+4
| | | | | | http://reviews.llvm.org/D14169 llvm-svn: 251616
* Make uses of /dev/null portable across OSes.Zachary Turner2015-10-141-0/+3
| | | | | | | | | Most platforms have "/dev/null". Windows has "nul". Instead of hardcoding the string /dev/null at various places, make a constant that contains the correct value depending on the platform, and use that everywhere instead. llvm-svn: 250331
* Moved ResolveSymbolicLink() to the FileSystem where it belongs, thanksSean Callanan2015-09-181-0/+6
| | | | | | | | zturner! http://reviews.llvm.org/D12984 llvm-svn: 248055
* Remove unused modules from module cache.Oleksiy Vyalov2015-09-181-0/+23
| | | | | | http://reviews.llvm.org/D12971 llvm-svn: 248017
* Move GetOptInc to the common namespacePavel Labath2015-09-041-470/+0
| | | | | | | | | | | | | | | | | | | Summary: GetOptInc provides getopt(), getopt_long() and getopt_long_only(). Windows (for defined(_MSC_VER)) doesn't ship with all of the getopt(3) family members and needs all of them. NetBSD requires only getopt_long_only(3). While there fix the code for clang diagnostics. Author: Kamil Rytarowski Reviewers: joerg Subscribers: labath, zturner, lldb-commits Differential Revision: http://reviews.llvm.org/D12582 llvm-svn: 246843
* When redirecting stdio, use FILE_SHARE_DELETE.Zachary Turner2015-09-021-1/+1
| | | | | | | | | | Some tests were failing because the test would try to delete the file before inferior had exited, but on Windows this will fail by default unless you specify FILE_SHARE_DELETE when opening the file. Can't think of a good reason not to do this, so here it is. llvm-svn: 246682
OpenPOWER on IntegriCloud