summaryrefslogtreecommitdiffstats
path: root/lldb/unittests/Host
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove obsolete commentsPavel Labath2016-04-131-2/+0
| | | | llvm-svn: 266196
* Make FileSpec handling platform-independentPavel Labath2016-04-041-14/+19
| | | | | | | | | | | | | | | | | Summary: Even though FileSpec attempted to handle both kinds of path syntaxes (posix and windows) on both platforms, it relied on the llvm path library to do its work, whose behavior differed on different platforms. This led to subtle differences in FileSpec behavior between platforms. This replaces the pieces of the llvm library with our own implementations. The functions are simply copied from llvm, with #ifdefs replaced by runtime checks for ePathSyntaxWindows. Reviewers: zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D18689 llvm-svn: 265299
* Fix SocketAddressTest (again)Pavel Labath2016-03-301-1/+2
| | | | | | | On some versions of Windows, the address is returned as "::1", while on others it's "0:0:...:0:1". Accept both versions, as they represent the same address. llvm-svn: 264850
* Fix a couple of cornercases in FileSpec + testsPavel Labath2016-03-112-0/+95
| | | | | | | | | | | | | | | | | | | Summary: This fixes a couple of corner cases in FileSpec, related to AppendPathComponent and handling of root directory (/) file spec. I add a bunch of unit tests for the new behavior. Summary of changes: FileSpec("/bar").GetCString(): before "//bar", after "/bar". FileSpec("/").CopyByAppendingPathComponent("bar").GetCString(): before "//bar", after "/bar". FileSpec("C:", ePathSyntaxWindows).CopyByAppendingPathComponent("bar").GetCString(): before "C:/bar", after "C:\bar". Reviewers: clayborg, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D18044 llvm-svn: 263207
* Fix SocketTest on Windows.Zachary Turner2016-02-181-4/+0
| | | | | | Differential Revision: http://reviews.llvm.org/D17106 llvm-svn: 261240
* Fix an off-by-one in SocketTest::DecodeHostAndPortPavel Labath2016-02-031-1/+11
| | | | | | | 65535 is still a valid port. This should fix the android failures we were getting when we chose to connect over 65535 to the remote lldb-server. llvm-svn: 259638
* Split Socket class into Tcp/Udp/DomainSocket subclasses.Oleksiy Vyalov2015-10-151-31/+84
| | | | | | http://reviews.llvm.org/D13754 llvm-svn: 250474
* Fix segmentation fault in lldb_private::Symbols::LocateExecutableSymbolFile()Bruce Mitchener2015-10-062-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When `module_spec.GetFileSpec().GetDirectory().AsCString()` returned a `nullptr` this line caused a segmentation fault: `std::string module_directory = module_spec.GetFileSpec().GetDirectory().AsCString()` Some context: I was remote debugging an executable built with Clang in an Ubuntu VM on my Windows machine using lldb-mi. I copied the executable and nothing else from the Ubuntu VM to the Windows machine. Then started lldb-server in the Ubuntu VM: ``` ./bin/lldb-server gdbserver *:8888 -- /home/enlight/Projects/dbgmits/build/Debug/data_tests_target ``` And ran `lldb-mi --interpreter` on Windows with the following commands: ``` -file-exec-and-symbols C:\Projects\data_tests_target -target-select remote 192.168.56.101:8888 -exec-continue ``` After which the segmentation fault occurred at the aforementioned line. Inside this method `module_spec.GetFileSpec()` returns an empty `FileSpec` (no dir, no filename), while `module_spec.GetSymbolFileSpec().GetFilename()` returns `"libc-2.19.so"`. Patch thanks to Vadim Macagon. Reviewers: brucem, zturner, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13201 llvm-svn: 249387
* Including <thread> with MSVC is buggy, use a workaround here.Zachary Turner2015-05-281-0/+6
| | | | llvm-svn: 238469
* Fix linking of unit tests via CMake on Windows.Zachary Turner2015-03-182-70/+0
| | | | | | | A previous attempt to make the unit tests link properly on Linux broke it for Windows. This patch fixes it for both platforms. llvm-svn: 232648
* Convert CRLF to LF.Zachary Turner2015-03-171-10/+10
| | | | | | | I accidentally let some Windows line endings slip in. This is a good reminder for me to use core.eol=lf. llvm-svn: 232560
* Fix the clang -Werror build & make the unit tests link under LinuxDavid Blaikie2015-03-171-0/+5
| | | | | | | | The order of libraries passed to the linker didn't work under linux (you need the llvm libraries first, then the lldb libraries). I modelled this after clang's setup here. Seemed simple enough to just be consistent. llvm-svn: 232461
* [CMake] Make the unittests link against everything...Zachary Turner2015-03-141-3/+0
| | | | | | | | | | | | | | | | Sigh. There's really not a good alternative until we decouple python from lldb better. The only way the build works right now is by having every executable link against every LLDB library. This causes implicit transitive link dependencies on the union of everything that LLDB brings in. Which means that if all we want is one header file from interpreter, we have to bring in everything, including everything that everything depends on, which means python. There's outstanding efforts to address this, but it's not yet complete. So until then, this is all we can do. llvm-svn: 232287
* [gtest] Fix gtest failures on Windows.Zachary Turner2015-03-141-56/+69
| | | | | | | | | | On Windows, you need to call WSAStartup() before making any socket calls, and WSACleanup() before you shutdown. This wasn't being done, so all of the socket tests were failing. This fixes that, which brings the unit test suite to a fully working state on Windows. llvm-svn: 232247
* Rework the gtest directory structure.Zachary Turner2015-03-134-0/+278
This makes the directory structure mirror the canonical LLVM directory structure for a gtest suite. Additionally, this patch deletes the xcode project. Nobody is currently depending on this, and it would be better to have gtest unit tests be hand-maintained in the Xcode workspace rather than using this python test runner. Patches to that effect will be submitted as followups. llvm-svn: 232211
OpenPOWER on IntegriCloud