summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* [Testsuite] Remove leak tests, it's not useful anymore.Davide Italiano2018-02-093-141/+0
| | | | | | | | | This only worked on MacOS, which now ships a newer version of python without this bug. As such, we don't leak the fd, and this test is not needed anymore (as it also hardcoded the python version in the check). llvm-svn: 324743
* Fix some warnings in SymbolFilePDB.cppPavel Labath2018-02-091-7/+6
| | | | llvm-svn: 324730
* llgs-test: Parse and store register info recieved from lldb-serverPavel Labath2018-02-095-41/+130
| | | | | | | | | | | | | | | | | | | | Summary: Right now the test client is not parsing register values correctly, which is manifesting itself in one test failing on 32-bit architectures (pr36013). This parses the information from the qRegisterInfo packets and stores it in the client, which will enable fixing the parsing in a follow up commit. I am also adding a new templated SendMessage overload, which enables one to send a message get a parsed response in a single call. Reviewers: eugene, davide Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D43076 llvm-svn: 324722
* [SymbolFilePDB] Add support for function symbolsAaron Smith2018-02-097-21/+872
| | | | | | | | | | | | | | | | | | | | | | | Summary: This is combination of following changes, - Resolve function symbols in PDB symbol file. `lldb-test symbols` will display information about function symbols. - Implement SymbolFilePDB::FindFunctions methods. On lldb console, searching function symbol by name and by regular expression are both available. - Create lldb type for PDBSymbolFunc. - Add tests to check whether functions with the same name but from different sources can be resolved correctly. Reviewers: zturner, lldb-commits Reviewed By: zturner Subscribers: amccarth, labath, llvm-commits Differential Revision: https://reviews.llvm.org/D42443 llvm-svn: 324707
* Recognize MSVC style mangling in CPlusPlusLanguage::IsCPPMangledNameAaron Smith2018-02-081-7/+11
| | | | | | | | | | | | Reviewers: zturner, lldb-commits, labath Reviewed By: zturner Subscribers: jingham, labath, davide, llvm-commits Differential Revision: https://reviews.llvm.org/D43059 llvm-svn: 324672
* Only throw -fPIC when building a shared libraryAaron Smith2018-02-0819-36/+15
| | | | | | | | | | | | | | | | | | Summary: Update makefiles to specify -fPIC in Makefile.rules and only throw -fPIC when building a shared library. This change is necessary to allow building the lldb tests on Windows where -fPIC is not a valid option. Update a few places to Python 3.x syntax Reviewers: zturner, lldb-commits Reviewed By: zturner Subscribers: stella.stamenova, labath, llvm-commits Differential Revision: https://reviews.llvm.org/D42994 llvm-svn: 324671
* Rewrite testcase to not depend on Foundation implementation details.Adrian Prantl2018-02-087-31/+22
| | | | | | | | TODO: Add a separate testcase testing *only* Foundation implementation details! <rdar://problem/37252738> llvm-svn: 324655
* Rewrite the flaky test_restart_bug test in a more deterministic wayPavel Labath2018-02-083-88/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The test was trying to reproduce a bug in handling of two concurrent events, which was impossible to do reliably in a black-box style test. In practice, this meant the test was only ever failing on remote targets, as these were slow enough to trigger this. Fortunately, we now have the ability to mock the server side of the connection, which means we can simulate the failure deterministically, so I rewrite the test to use the new gdb-client framework. I've needed to add a couple of new packets to the mock server to be able to do this. Instead of trying to guess how a "typical" gdb-client test will want to handle this, I throw an exception in the implementation to force the user to override them (the packets are only sent if the test explicitly performs some action which will trigger them, so a basic test which e.g. does not need the "continue" functionality will not need to implement them). Reviewers: owenpshaw Subscribers: srhines, lldb-commits Differential Revision: https://reviews.llvm.org/D42959 llvm-svn: 324590
* [docs] Update docs for cmake options LLDB_TEST_C_COMPILER and ↵Aaron Smith2018-02-082-6/+6
| | | | | | | | | | | | | | | | LLDB_TEST_CXX_COMPILER Summary: LLDB_TEST_COMPILER is not a valid option for CMake for LLDB. There are instead two properties LLDB_TEST_C_COMPILER and LLDB_TEST_CXX_COMPILER. Update the documents accordingly to reflect the correct information. Reviewers: zturner, lldb-commits Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D43061 llvm-svn: 324564
* Deactivate TestTargetSymbolsBuildidCase if host is windowsEugene Zemtsov2018-02-082-1/+2
| | | | | | Makefile has unix magic and thus not working on windows. llvm-svn: 324558
* Add CMAKE_CFG_INTDIR as part of the include path for the default test compiler. Aaron Smith2018-02-081-2/+2
| | | | | | | | | | | | | | | | | Summary: This is a small change towards running the LLDB unit tests on Windows (still WIP). Builds that use make do not point to specific configurations. However, builds with multiple configurations such as Visual Studio on Windows need the configuration (release/debug/etc) as part of the path so the binaries produced by clang are placed in the correct directory for the configuration. Reviewers: zturner, lldb-commits, labath Reviewed By: labath Subscribers: labath, mgorny, hintonda, llvm-commits Differential Revision: https://reviews.llvm.org/D42990 llvm-svn: 324555
* Remove an errant ^S Jim Ingham2018-02-071-1/+1
| | | | | | (still can't get over those Emacs habits...) llvm-svn: 324509
* [test] Don't drop existing categories for methods.Jonas Devlieghere2018-02-071-7/+10
| | | | | | | | | The change in r324488 dropped the existing category attribute in for instance methods. This patch corrects that. Differential revision: https://reviews.llvm.org/D43024 llvm-svn: 324492
* [test] Enable setting category for inline tests.Jonas Devlieghere2018-02-071-2/+7
| | | | | | | | | Inlined tests have a test function that is actually an instance method, which requires a slightly different approach when it comes to setting the category attribute. The attribute must be set on the actual function, rather than on a particular instance. llvm-svn: 324488
* Remove function DW_DSC_value_to_namePavel Labath2018-02-072-12/+0
| | | | | | It is unused, and the underlying llvm function has been removed as well. llvm-svn: 324472
* lldb running on an ios device is using the _dyld_get_all_image_infos()Jason Molenda2018-02-071-0/+21
| | | | | | | | | SPI call to to find its own shared cache's UUID. On newer sytems we need to use the a new SPI which will return the UUID directly. <rdar://problem/36625871> llvm-svn: 324437
* Remove obsolete fileAdrian Prantl2018-02-062-208/+0
| | | | llvm-svn: 324400
* Pass --build-dir to dotest in the Xcode projectAdrian Prantl2018-02-061-1/+1
| | | | llvm-svn: 324396
* More correct handling of error cases C++ name parserEugene Zemtsov2018-02-062-2/+3
| | | | | | | | | | Now incorrect type argument that looks like T<A><B> doesn't cause an assert, but just a parsing error. Bug: 36224 Differential Revision: https://reviews.llvm.org/D42939 llvm-svn: 324380
* Build each testcase variant in its own subdirectory and remove the srcdir ↵Adrian Prantl2018-02-0613-148/+131
| | | | | | | | | | | | | | lock file This patch creates a <test>.dwarf, <test>.dwo, etc., build directory for each testcase variant. Most importantly, this eliminates the need for the per-test lock file in the source directory. Tests that are marked as NO_DEBUG_INFO_TESTCASE and build with buildDefault() are built in a <test>.default build directory. Differential Revision: https://reviews.llvm.org/D42763 llvm-svn: 324368
* [testsuite] Skip a flakey test.Davide Italiano2018-02-051-0/+1
| | | | llvm-svn: 324293
* Disable test_restart_bug failing on AndroidEugene Zemtsov2018-02-051-0/+1
| | | | llvm-svn: 324288
* Fix the cputype comparison in ↵Jason Molenda2018-02-051-1/+5
| | | | | | | | | GDBRemoteCommunicationServerCommon::Handle_qHostInfo to use Mach-O cpu types instead of the ArchSpec enum value, and handle the case of bridgeos. llvm-svn: 324287
* CMake: fix build directory name in clean ruleAdrian Prantl2018-02-051-1/+1
| | | | llvm-svn: 324281
* [lang/Objc] UNXFAIL a test. Nullability has been implemented in clang.Davide Italiano2018-02-051-1/+0
| | | | | | | | (a while ago). <rdar://problem/20416388> llvm-svn: 324280
* refactor: DWARFCompileUnit::Producer -> DWARFProducerJan Kratochvil2018-02-053-18/+14
| | | | | | Differential revision: https://reviews.llvm.org/D42891 llvm-svn: 324275
* Add a comment explaining how the input for ↵Pavel Labath2018-02-052-0/+25
| | | | | | | | | | | | | GetModuleSpecifications_EarlySectionHeaders was generated Davide pointed out this would be useful if the file ever needs to be regenerated (and I certainly agree). I also replace the test binary with a slightly smaller one -- I intended to do this in the original commit, but I forgot to add it to the patch as I was juggling several things at the same time. llvm-svn: 324256
* Fix parsing of object files with "early" section headersPavel Labath2018-02-054-46/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ObjectFileELF::GetModuleSpecifications contained a lot of tip-toing code which was trying to avoid loading the full object file into memory. It did this by trying to load data only up to the offset if was accessing. However, in practice this was useless, as 99% of object files we encounter have section headers at the end, so we would load the whole file as soon as we start parsing the section headers. In fact, this would break as soon as we encounter a file which does *not* have section headers at the end (yaml2obj produces these), as the access to .strtab (which we need to get the section names) was not guarded by this offset check. As this strategy was completely ineffective anyway, I do not attempt to proliferate it further by guarding the .strtab accesses. Instead I just lead the full file as soon as we are reasonably sure that we are indeed processing an elf file. If we really care about the load size here, we would need to reimplement this to just load the bits of the object file we need, instead of loading everything from the start of the object file to the given offset. However, given that the OS will do this for us for free when using mmap, I think think this is really necessary. For testing this I check a (tiny) SO file instead of yaml2obj-ing it because the fact that they come out first is an implementation detail of yaml2obj that can change in the future. llvm-svn: 324254
* Sync PlatformNetBSD.cpp with LinuxKamil Rytarowski2018-02-051-88/+26
| | | | | | | | | | | | | | | | | Summary: Various changes in logging from log->Printf() to generic LLDB_LOG(). Sponsored by <The NetBSD Foundation> Reviewers: labath, joerg Reviewed By: labath Subscribers: llvm-commits, lldb-commits Differential Revision: https://reviews.llvm.org/D42912 llvm-svn: 324251
* Skip TestTargetSymbolsSepDebugSymlink on remote targetsPavel Labath2018-02-051-0/+1
| | | | | | | Currently, our behavior when installing symlinks on the remote target is broken (pr36237). llvm-svn: 324236
* Fix a crash in *NetBSD::Factory::LaunchKamil Rytarowski2018-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: We cannot call process_up->SetState() inside the NativeProcessNetBSD::Factory::Launch function because it triggers a NULL pointer deference. The generic code for launching a process in: GDBRemoteCommunicationServerLLGS::LaunchProcess sets the m_debugged_process_up pointer after a successful call to m_process_factory.Launch(). If we attempt to call process_up->SetState() inside a platform specific Launch function we end up dereferencing a NULL pointer in NativeProcessProtocol::GetCurrentThreadID(). Use the proper call process_up->SetState(,false) that sets notify_delegates to false. Sponsored by <The NetBSD Foundation> Reviewers: labath, joerg Reviewed By: labath Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D42868 llvm-svn: 324234
* TestLinuxCore -- add a check for thread namePavel Labath2018-02-051-10/+19
| | | | | | | We've had a bug (fixed by https://reviews.llvm.org/D42828) where the thread name was being read incorrectly. Add a test for this behavior. llvm-svn: 324230
* [test] Un-XFAIL TestRaise.RaiseTestCase.test_restart_bugJonas Devlieghere2018-02-051-4/+0
| | | | | | | | This test was marked as an expected failure because of PR20231 but it seems to consistently result in an unexpected success across the bots. Let's try to re-enable this test again. llvm-svn: 324227
* [dotest] make debug info variant accessible in setUp()Pavel Labath2018-02-055-41/+29
| | | | | | | | | | | | | | | | | | | | | | | Summary: This changes the way we store the debug info variant to make it available earlier in the test bringup: instead of it being set by the test wrapper method, it is set as a *property* of the wrapper method. This way, we can inspect it as soon as self.testMethodName is initialized. The retrieval is implemented by a new function TestBase.getDebugInfo(), and all that's necessary to make it work is to change self.debug_info into self.getDebugInfo(). While searching for debug_info occurences i noticed that TestLogging is being replicated for no good reason, so I removed the replication there. Reviewers: aprantl, jingham Subscribers: eraman, JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D42836 llvm-svn: 324226
* Resolve binary symlinks before finding its separate .debug fileJan Kratochvil2018-02-054-2/+52
| | | | | | | | | | | | | | | | | | | | | | I have found LLDB cannot find separate debug info of Fedora /usr/bin/gdb. It is because: lrwxrwxrwx 1 root root 14 Jan 25 20:41 /usr/bin/gdb -> ../libexec/gdb* -rwxr-xr-x 1 root root 10180296 Jan 25 20:41 /usr/libexec/gdb* ls: cannot access '/usr/lib/debug/usr/bin/gdb-8.0.1-35.fc27.x86_64.debug': No such file or directory -r--r--r-- 1 root root 29200464 Jan 25 20:41 /usr/lib/debug/usr/libexec/gdb-8.0.1-35.fc27.x86_64.debug FYI that -8.0.1-35.fc27.x86_64.debug may look confusing, it was always just .debug before. Why is /usr/bin/gdb a symlink is offtopic for this bugreport, Fedora has it so for some reasons. It is always safest to look at the .debug file only after resolving all symlinks on the binary file. Differential revision: https://reviews.llvm.org/D42853 llvm-svn: 324224
* Fix upper->lower case for /usr/lib/debug/.build-id/**.debugJan Kratochvil2018-02-054-0/+46
| | | | | | | | | | | | | I have found the lookup by build-id (when lookup by /usr/lib/debug/path/name/exec.debug failed) does not work as LLDB tries the build-id hex string in uppercase but Fedora uses lowercase. xubuntu-16.10 also uses lowercase during my test: /usr/lib/debug/.build-id/6c/61f3566329f43d03f812ae7057e9e7391b5ff6.debug Differential revision: https://reviews.llvm.org/D42852 llvm-svn: 324222
* Turn off the deprecated ALWAYS_SEARCH_USER_PATHS featureJason Molenda2018-02-031-0/+7
| | | | | | | | in debugserver. This is already set this way in the lldb project files but not in debugserver. Updating for consistency. llvm-svn: 324158
* Fix a copy of a fixed length, possibly non-nul terminated, stringJason Molenda2018-02-021-1/+1
| | | | | | | | | | | | into a std::string so we don't run off the end of the array when there is no nul byte in ProcessElfCore::parseLinuxNotes. Found with ASAN testing. <rdar://problem/37134319> Differential revision: https://reviews.llvm.org/D42828 llvm-svn: 324156
* Add the ability to restrict the breakpoint to a moduleJim Ingham2018-02-021-4/+13
| | | | | | for run_to_{source,name}_breakpoint. llvm-svn: 324119
* Use an alternative approach to prevent Spotlight from indexing the build ↵Adrian Prantl2018-02-023-10/+7
| | | | | | directory. llvm-svn: 324115
* Create a marker for Spotlight to never index $BUILD_DIR.Adrian Prantl2018-02-011-2/+11
| | | | | | | | | | LLDB queries Spotlight to locate .dSYM bundles based on the UUID embedded in a binary, and because the UUID is a hash of filename and .text section, there *will* be conflicts inside $BUILD_DIR. This should fix the broken green dragon bots. llvm-svn: 324019
* Make use of physical footprint as memory measurement.Han Ming Ong2018-02-014-339/+19
| | | | | | | | | | | | Remove obsolete measurements. This check in requires at least 10.11 Reviewed: Jason Molenda, Jim Ingham <rdar://problem/37047106> Xcode Memory gauge should show the jetsam ledger footprint rather than anonymous llvm-svn: 324013
* Added lldbutil.run_to_name_breakpoint and use it in one test.Jim Ingham2018-02-012-52/+58
| | | | | | | | Using the "run_to_{source,name}_breakpoint will allow us to remove a lot of boiler-plate from the testsuite. We mostly use source breakpoints, but some tests use by name ones so this was needed. llvm-svn: 324010
* Remove unused Args variable, and #include of Args.h. NFC.Jim Ingham2018-02-011-2/+0
| | | | llvm-svn: 324008
* Extend windows->android XFAIL on TestLoadUnloadPavel Labath2018-02-011-2/+0
| | | | | | | This fails regardless of the android architecture or compiler used. The important bit is the mismatch in path separators. llvm-svn: 323974
* mock_gdb_server: rectify ack handling codePavel Labath2018-02-011-11/+3
| | | | | | | | | | | | | | | | | The mock server was sending acks back in response to spurious acks from the client, but the client was not prepared to handle these. Most of the time this would work because the only time the client was sending unsolicited acks is after the initial connection, and there reply-ack would get ignored in the "flush all packets from the server" loop which came after the ack. However, this loop had only a 10ms delay, and sometimes this was not enough to catch the reply (which meant the connection got out of sync, and test failed). Since this behavior not consistent with how lldb-server handles this situation (it just ignores the ack), I fix the mock server to do the same. llvm-svn: 323953
* replace os.mkdirs with lldbutil.mkdir_p (NFC)Adrian Prantl2018-01-312-4/+2
| | | | llvm-svn: 323917
* Fix TestMixedDwarfBinary.pyPavel Labath2018-01-311-1/+1
| | | | | | | As of yesterday, tests need to use self.getBuildArtifact() to get the built executable. llvm-svn: 323884
* [lldb] Enable debugging of binaries with mixed (splitted/regular) dwarfDavide Italiano2018-01-315-3/+74
| | | | | | | This recommits the patch, now that I verified that the bot instability is due to something else. Sorry for the noise. llvm-svn: 323879
* Fix TestTargetSymbolsAddCommand makefilePavel Labath2018-01-311-4/+5
| | | | | | | | | We started passing the "all" target to make, which rendered the "localall" trick in this Makefile inoperable. I implement the strip step differently, and also reformat the Makefile. llvm-svn: 323855
OpenPOWER on IntegriCloud