summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* [dotest] Use subprocess.call to forward arguments in wrapperJonas Devlieghere2018-03-212-14/+11
| | | | | | | | | | | As suggested by Pavel on lldb-commits. Originally I picked os.system because it was so much more simple than the subprocess module, but that no longer holds true after yesterday's hack in r328020. This is what it should've been in the first place. Differential revision: https://reviews.llvm.org/D44728 llvm-svn: 328089
* Fix crash exposed by r328025Pavel Labath2018-03-211-2/+3
| | | | | | | | | | | | | | | | The issue was that the ASTDumper was being passed a null pointer (because we did not create any declaration for the operator==). The crash was in logging code, so it only manifested it self if you ran the tests with logging enabled (like our bots do). Given that this is logging code and the rest of the debugger is fine with the declaration being null, I just make sure the logging code can handle it as well. Right now I just do the null check in ClangExpressionDeclMap, but if the ASTDumper class is meant to be a debugging/logging aid, then it might be a good idea move the check inside the class itself. llvm-svn: 328088
* Fix TestOperatorOverload for 32-bit buildsPavel Labath2018-03-212-14/+4
| | | | | | | | | | | | - use more goodies from Makefile.rules to correctly build a 32-bit binary. - avoid hardcoding typeof(nil) in the test. This should partially fix the linux bot. There is still one assertion failure remaining, which I'll have to investigate separately, as I am not experiencing it locally. llvm-svn: 328083
* [Testsuite] Modernize this test to be run out-of-tree.Davide Italiano2018-03-201-5/+3
| | | | | | | | New tests should run the make syntax voodoo $@ and $< instead of hardcoding the names. We should also document how to write one, it's on my list. llvm-svn: 328062
* [ExpressionParser] Re-implement r327356 in a less disruptive way.Davide Italiano2018-03-2010-29/+78
| | | | | | | | | | | | Instead of applying the sledgehammer of refusing to insert any C++ symbol in the ASTContext, try to validate the decl if what we have is an operator. There was other code in lldb which was responsible for this, just not really exposed (or used) in this codepath. Also, add a better/more comprehensive test. <rdar://problem/35645893> llvm-svn: 328025
* [lldb-dotest] Wrap arguments in single quotesJonas Devlieghere2018-03-201-2/+6
| | | | | | | | If we don't wrap arguments to the wrapper in single quotes, combined arguments, for example for -E, don't reach dotest.py as a unit but as separate arguments, causing the latter to fail. llvm-svn: 328020
* [TestExpr] Fix a typo in a test, unbreaking the lldb Mac OS X bot.Davide Italiano2018-03-201-1/+1
| | | | llvm-svn: 328013
* Move StringExtractorGDBRemote.h to the include folderPavel Labath2018-03-2012-14/+14
| | | | | | | | While trying to use this header I noticed that it is not in the include folder. Move it to there and update all #includes to reference that file correctly. llvm-svn: 327996
* [LLDB] Fix TestTargetXMLArch's expected archPavel Labath2018-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Summary: When running on an architecture other than x86_64, the target.ConnectRemote() part of the test may add platform information to the target triple. It was observed that this happens at Process::CompleteAttach() method, after the platform_sp->IsCompatibleArchitecture() check fails. This method then calls platform_sp->GetPlatformForArchitecture(), that on a Linux machine ends up returning a generic Linux platform, that then ends up getting added to the original target architecture. Reviewers: clayborg, labath, jasonmolenda Reviewed By: labath Subscribers: alexandreyy, lbianc Differential Revision: https://reviews.llvm.org/D44022 Patch by Leandro Lupori <leandro.lupori@gmail.com>. llvm-svn: 327981
* Fix some tests for PPC64le architecturePavel Labath2018-03-204-15/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Fix test jump for powerpc64le Jumping directly to the return line on power architecture dos not means returning the value that is seen on the code. The last test fails, because it needs the execution of some assembly in the beginning of the function. Avoiding this test for this architecture. - Avoid evaluate environ variable name on Linux On Linux the Symbol environ conflicts with another variable, then in order to avoid it, this test was moved into a specific test, which is not supported if the OS is Linux. - Added PPC64le as MIPS behavior Checking the disassembler output, on PPC64le machines behaves as MPIS. Added method to identify PPC64le architecture and checking it when disassembling instructions in the test case. Reviewers: labath Reviewed By: labath Subscribers: clayborg, labath, luporl, alexandreyy, sdardis, ki.stfu, arichardson Differential Revision: https://reviews.llvm.org/D44101 Patch by Leonardo Bianconi <leonardo.bianconi@eldorado.org.br>. llvm-svn: 327977
* Re-land: [lldb] Use vFlash commands when writing to target's flash memory ↵Pavel Labath2018-03-2018-62/+534
| | | | | | | | | | | | | | | | | | | | | | | | | | | | regions The difference between this and the previous patch is that now we use ELF physical addresses only for loading objects into the target (and the rest of the module load address logic still uses virtual addresses). Summary: When writing an object file over gdb-remote, use the vFlashErase, vFlashWrite, and vFlashDone commands if the write address is in a flash memory region. A bare metal target may have this kind of setup. - Update ObjectFileELF to set load addresses using physical addresses. A typical case may be a data section with a physical address in ROM and a virtual address in RAM, which should be loaded to the ROM address. - Add support for querying the target's qXfer:memory-map, which contains information about flash memory regions, leveraging MemoryRegionInfo data structures with minor modifications - Update ProcessGDBRemote to use vFlash commands in DoWriteMemory when the target address is in a flash region Original discussion at http://lists.llvm.org/pipermail/lldb-dev/2018-January/013093.html Reviewers: clayborg, labath Reviewed By: labath Subscribers: llvm-commits, arichardson, emaste, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D42145 Patch by Owen Shaw <llvm@owenpshaw.net>. llvm-svn: 327970
* Add a suggestion to convert dotest tests to use run_to_source_breakpoint.Jim Ingham2018-03-201-0/+14
| | | | llvm-svn: 327941
* [SymbolFilePDB] Simplify code with newer methodsAaron Smith2018-03-202-16/+4
| | | | llvm-svn: 327927
* [SymbolFilePDB] Simplify getting the source file pathAaron Smith2018-03-202-66/+2
| | | | | | | | | | | | Summary: Replace SymbolFilePDB::GetSourceFileNameForPDBCompiland() with PDBSymbolCompiland::getSourceFileFullPath(). Reviewers: zturner, rnk, lldb-commits Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44456 llvm-svn: 327925
* Modernize a test.Jim Ingham2018-03-191-29/+2
| | | | llvm-svn: 327924
* Rename remotectl_com.apple.internal.xpc.remote.debugserver.plistJason Molenda2018-03-193-8/+8
| | | | | | | | | to com.apple.internal.xpc.remote.debugserver.plist, not sure where that remotectl_ prefix came from. <rdar://problem/36751222> llvm-svn: 327922
* I didn't see that SocketAddress.cpp was already being pulledJason Molenda2018-03-191-6/+2
| | | | | | | | in to debugserver; my re-addition resulted in duplicated symbols. Remove my added SocketAddress.cpp, and change the original one to also be included for the debugserver-mini target. llvm-svn: 327918
* Add the ios-mini target to the top-level xcodeproj, which buildsJason Molenda2018-03-193-0/+124
| | | | | | | | the debugserver-mini target in debugserver. Add a new plist which needs to be installed for debugserver-mini. <rdar://problem/36751222> llvm-svn: 327915
* Add DWARFUnit.cpp to the correct target.Jason Molenda2018-03-191-6/+4
| | | | llvm-svn: 327913
* [SymbolFilePDB] Remove a few null pointer checks by passing refAaron Smith2018-03-193-63/+46
| | | | | | | | | | | | Reviewers: zturner, rnk, lldb-commits Reviewed By: zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44455 llvm-svn: 327908
* [test] Skip flaky tests in TestMiSyntax on DarwinVedant Kumar2018-03-191-0/+3
| | | | | | These tests tend to time out locally and on our bots. llvm-svn: 327906
* [test] Skip flaky TestThreadStates tests on DarwinVedant Kumar2018-03-191-3/+3
| | | | | | | | These tests do not pass/fail consistently, so just skip them. This is llvm.org/pr15824 & rdar://problem/28557237. llvm-svn: 327905
* [ClangASTContext] Remove dead code. NFCI.Davide Italiano2018-03-191-45/+0
| | | | llvm-svn: 327893
* Xcode: Include DWARFUnit.{h,cpp} in the buildVedant Kumar2018-03-191-0/+8
| | | | | | This should address a bot failure due to r327809. llvm-svn: 327865
* Move the codebase to use: DWARFCompileUnit -> DWARFUnitJan Kratochvil2018-03-1827-222/+222
| | | | | | | | | | | | Now the codebase can use the DWARFUnit superclass. It will make it later seamlessly work also with DWARFPartialUnit for DWZ. This patch is only a search-and-replace easily undone, nothing interesting in it. Differential revision: https://reviews.llvm.org/D42892 llvm-svn: 327810
* DWARFUnit split out of DWARFCompileUnitJan Kratochvil2018-03-185-561/+796
| | | | | | | | | DW_TAG_partial_unit for DWZ can be then presented by DWARFPartialUnit also inherited from DWARFUnit. Differential revision: https://reviews.llvm.org/D40466 llvm-svn: 327809
* Fix the Windows build after r327750Frederic Riss2018-03-161-1/+1
| | | | llvm-svn: 327753
* [DWARFASTParserClang] Complete external record types before using them as a ↵Frederic Riss2018-03-164-0/+68
| | | | | | | | | | | | | | | | | | decl context. Summary: When in a gmodules-like debugging scenario, you can have a parent decl context that gets imported from an external AST. When this happens, we must be careful to complete this type before adding children to it, otherwise it sometimes results in a crash. Reviewers: clayborg, jingham Subscribers: aprantl, JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D43592 llvm-svn: 327750
* Skip TestThreadSpecificBpPlusCondition on Darwin due to timeoutsVedant Kumar2018-03-161-0/+1
| | | | | | Bot failure: https://ci.swift.org/job/oss-lldb-incremental-osx/1104/ llvm-svn: 327731
* Remove -gmodules restriction from testAdrian Prantl2018-03-161-1/+0
| | | | llvm-svn: 327729
* [dotest] Clean up test folder clean-upPavel Labath2018-03-1617-73/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch implements a unified way of cleaning the build folder of each test. This is done by completely removing the build folder before each test, in the respective setUp() method. Previously, we were using a combination of several methods, each with it's own drawbacks: - nuking the entire build tree before running dotest: the issue here is that this did not take place if you ran dotest manually - running "make clean" before the main "make" target: this relied on the clean command being correctly implemented. This was usually true, but not always. - for files which were not produced by make, each python file was responsible for ensuring their deleting, using a variety of methods. With this approach, the previous methods become redundant. I remove the first two, since they are centralized. For the other various bits of clean-up code in python files, I indend to delete it when I come across it. Reviewers: aprantl Subscribers: emaste, ki.stfu, mgorny, eraman, lldb-commits Differential Revision: https://reviews.llvm.org/D44526 llvm-svn: 327703
* Skip more lldb-mi tests which time out on DarwinVedant Kumar2018-03-161-0/+3
| | | | | | Bot failure: https://ci.swift.org/job/oss-lldb-incremental-osx/1097/testReport/junit/TestMiTarget/MiTargetTestCase/test_lldbmi_target_attach_wait_for/ llvm-svn: 327692
* [cmake] Copy system debugserver from the right place when only CommandLineToolsVedant Kumar2018-03-161-2/+9
| | | | | | | | | | | | | | | | | | | are installed Instead of building debugserver when building lldb, I'd rather pass LLDB_CODESIGN_IDENTITY="" to cmake and use the one already on my system. However, on one of my machines I only have the CommandLineTools installed, and so the hardcoded path to the system debugserver does not work for me. Additionally, we should verify the LLDB framework exists on the machine before trying to set the path to debugserver. This allows us to warn the user at configure time that a system debugserver can't be found if they choose not to build it themselves. Patch by Alex Langford! Differential Revision: https://reviews.llvm.org/D44507 llvm-svn: 327691
* Split skipIf decorator, the condition is supposed to be ORAdrian Prantl2018-03-151-1/+2
| | | | llvm-svn: 327644
* [dotest] remove confirm_directory_exclusivity remnantsPavel Labath2018-03-151-13/+0
| | | | llvm-svn: 327643
* Fix TestProcessLaunch breakage on MacOSPavel Labath2018-03-151-1/+1
| | | | | | | | | | | | | This test started failing after r327625. The cause seems difference in the treatment of relative --stdin paths between MacOS (debugserver?) and linux (lldb-server?). Linux treats this as relative to the debuggers PWD, while MacOS as relative to (I think) the future PWD of the launched process. This fixes the issue by using absolute paths, which should work everywhere, but we should probably unify this path handling as well. I'll ask around about what is the expected behavior here. llvm-svn: 327633
* Next batch of test-tree-cleaning changesPavel Labath2018-03-159-171/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The changes here fall into several categories. - some tests were redirecting inferior stdout/err to a file. For these I make sure we use an absolute path for the file. I also create a lldbutil.read_file_on_target helper function to encapsulate the differences between reading a file locally and remotely. - some tests were redirecting the pexpect I/O into a file. For these I use a python StringIO object to avoid creating a file altogether. - the TestSettings inferior was creating a file. Here, I make sure the inferior is launched with pwd=build-dir so that the files end up created there. - lldb-mi --log (used by some tests) creates a log file in PWD without the ability say differently. To make this work I make sure to run lldb-mi with PWD=build_dir. This in turn necessitated a couple of changes in other lldb-mi tests, which were using relative paths to access the source tree. Reviewers: aprantl Subscribers: ki.stfu, mehdi_amini, lldb-commits Differential Revision: https://reviews.llvm.org/D44159 llvm-svn: 327625
* @skipUnlessDarwin TestTargetSourceMapPavel Labath2018-03-151-0/+1
| | | | | | Our MachO parser works only on darwin. llvm-svn: 327611
* Fix a bug in "target.source-map" where we would resolve unmapped paths ↵Greg Clayton2018-03-153-1/+438
| | | | | | | | | | | | | | | | | | incorrectly When using: (lldb) settings set target.source-map ./ /path/to/source LLDB would fail to set a source file and line breakpoint with: (lldb) breakpoint set --file /path/to/source/main.c --line 2 Because code in the target was undoing the remapping of "/path/to/source/main.c" to "./main.c" and then it would resolve this path, which would append the current working directory to the path. We don't want to resolve paths that we unmap. Test case added. Differential Revision: https://reviews.llvm.org/D44502 llvm-svn: 327600
* [test] cmake: Ensure liblldb builds before tests runVedant Kumar2018-03-151-0/+4
| | | | | | | Without liblldb as a test dependency, tests which link it in from an lldb framework (via Base.buildDriver()) won't work. llvm-svn: 327595
* [Dictionary] Rewrite the test added in r327587 as an inline test.Davide Italiano2018-03-156-20/+13
| | | | | | | | | | | | | | | Until we have a better story for putting commands and check lines in the same file (they're currently ignored), it seems that inline tests are actually more concise and easier to understand. Too bad we have still some python boilerplate, but that's not really substantial so we can live with it. Thanks to Fred for pointing out and Jim for explaining me how to use the inline test format. <rdar://problem/34806516> llvm-svn: 327592
* [DataFormatters] Implement summary for __NSDictionary0.Davide Italiano2018-03-145-0/+24
| | | | | | | | | | | | | | | | | | | Before the patch: (lldb) frame var emptyDictionary (__NSDictionary0 *) emptyDictionary = 0x0000000100304420 After: (lldb) frame var emptyDictionary (__NSDictionary0 *) emptyDictionary = 0x0000000100304420 0 key/value pairs There's nothing much else we can do, as this is always empty by definition. <rdar://problem/34806516> llvm-svn: 327587
* [test] Skip more lldb-mi tests which occasionally time out on DarwinVedant Kumar2018-03-141-1/+6
| | | | llvm-svn: 327586
* [test] Skip some lldb-mi tests which time out on DarwinVedant Kumar2018-03-142-0/+11
| | | | | | These don't always timeout, but it's inconvenient when they do. llvm-svn: 327568
* [test] Delete some xfailed lldb-mi testsVedant Kumar2018-03-147-638/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a first pass at removing some lldb-mi tests which have been xfailed and unmaintained for a while. We have open PRs for most of these tests already. I've opened up the following additional PRs: llvm.org/PR36739 - lldb-mi driver exits properly llvm.org/PR36740 - lldb-mi -gdb-set and -gdb-show llvm.org/PR36741 - lldb-mi -symbol-xxx The motivation here is to address timeout and pexpect-related issues in the test suite. This was discussed on lldb-dev in the thread: "increase timeout for tests?". After this change, the lldb-mi tests seem to be in better health (on Darwin at least). I consistently get: $ ./bin/llvm-dotest -p TestMi =================== Test Result Summary =================== Test Methods: 101 Reruns: 0 Success: 88 Expected Failure: 0 Failure: 0 Error: 0 Exceptional Exit: 0 Unexpected Success: 0 Skip: 13 Timeout: 0 Expected Timeout: 0 llvm-svn: 327552
* Use GetItemAtIndexAsString overload for ConstString and move set rather than ↵Tatyana Krasnukha2018-03-141-6/+3
| | | | | | copy. llvm-svn: 327549
* Reuse IsEmpty for ConstString::operator bool().Tatyana Krasnukha2018-03-141-1/+1
| | | | llvm-svn: 327548
* [dotest] Rename llvm-dotest -> lldb-dotest and make it a custom targetJonas Devlieghere2018-03-142-4/+7
| | | | | | | | | | This renames llvm-dotest to lldb-dotest and makes it a custom target so you can run `ninja lldb-dotest` to rebuild whatever is necessary before rerunning the tests. Differential revision: https://reviews.llvm.org/D44473 llvm-svn: 327519
* [test] Disable TestMachCore everywhere except on DarwinJonas Devlieghere2018-03-141-0/+1
| | | | | | | | | | Apparently the parser is wrapped inside ifdef's so the logic isn't available on non-Darwin platforms. Should fix build bot failure: http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/20463 llvm-svn: 327512
* Update selected thread after loading mach coreJonas Devlieghere2018-03-144-3/+969
| | | | | | | | | | | The OS plugins might have updated the thread list after a core file has been loaded. The physical thread in the core file may no longer be the one that should be selected. Hence we should run the thread selection logic after loading the core. Differential revision: https://reviews.llvm.org/D44139 llvm-svn: 327501
OpenPOWER on IntegriCloud