summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* refactor testsuite spawnLldbMi args->exe+argsJan Kratochvil2018-12-194-12/+15
| | | | | | | | | | | | | | | | | Currently spawnLldbMi accepts both lldb-mi options and executable to debug as a single parameter. Split them. As in D55859 we will need to execute one lldb-mi command before loading the exe. Therefore we can no longer use the exe as lldb-mi command-line parameter as then there is no way to execute a command before loading exe specified as lldb-mi command-line parameter. LocateExecutableSymbolFileDsym should be static, that is also a little refactorization. Differential Revision: https://reviews.llvm.org/D55858 llvm-svn: 349607
* Don't forget to free the libcompression scratch buffer in the dtor.Jason Molenda2018-12-181-0/+3
| | | | llvm-svn: 349580
* [lit] Rather than including stdio.h, forward-declare printf in ↵Stella Stamenova2018-12-181-1/+1
| | | | | | TestConvenienceVariables.test llvm-svn: 349573
* Remove the zlib CFLAGS and LDFLAGS settings from the xcode project file.Jason Molenda2018-12-181-48/+0
| | | | | | | | | We're linking against libcompression all the time now, we don't need to fall back to zlib. zlib support will still be used when lldb is built on linux et al systems, so I'm not removing any of the source support, but when built on darwin with xcode, we'll be using libcompression. llvm-svn: 349572
* [NativePDB] Correctly reconstruct DeclContext for nested enums.Zachary Turner2018-12-183-4/+19
| | | | | | | | | | | | We reconstruct the AST hierarchy by trying to hack up a mangled name for the parent type using the child type's mangled name. This was failing for enums because their tag type is represented with two letters ("W4") instead of one letter ("T", "U", etc) as it is with classes, structs, and unions. After accounting for this we can now correctly determine when an enum is nested inside of a namespace or a class. llvm-svn: 349565
* Force libcompression calls to be enabled when building on DarwinJason Molenda2018-12-184-74/+53
| | | | | | | | | | | | | | | | systems. It has been available in the OS over over three years now. If lldb doesn't link against -lcompression, it should be an error. Allocate a scratch buffer for libcompression to use when decoding packets, instead of it having to allocate & free one on every call. Fix a typeo with the size of the buffer that compression_decode_buffer() is expanding into. <rdar://problem/41601084> llvm-svn: 349563
* [lit] Use the new build.py script in the lldb-mi testsStella Stamenova2018-12-1813-46/+15
| | | | | | This allows the tests to pass on Windows as well llvm-svn: 349562
* Un-conditionalize use of libcompression. debugserver only buildsJason Molenda2018-12-182-151/+54
| | | | | | | | | | | | | | | | | | | | on Darwin systems and libcompression has been in the OS for over three years. Remove use of / linking to zlib. We'll always have libcompression available now. Create a scratch buffer via compression_encode_scratch_buffer_size() and use it in calls to compression_encode_buffer() to avoid compression_encode_buffer having to malloc & free a scratch buffer on each call. Tested by forcing compression to be enabled on macos native (normally only enabled on iOS et al devices), running the testsuite. <rdar://problem/41601084> llvm-svn: 349553
* TestHelloWorld: Use a file on the target platform for synchronisation.Adrian Prantl2018-12-182-19/+29
| | | | | | Thanks to Pavel Labath for the idea! llvm-svn: 349550
* [CMake] Don't require libcxxabi on darwinJonas Devlieghere2018-12-181-1/+0
| | | | | | Just libcxx should suffice. llvm-svn: 349546
* [cmake] Make libcxx(abi) a dependency when building in-tree clang for macOSJonas Devlieghere2018-12-181-0/+4
| | | | | | | | | | | | | As discussed on IRC this morning, when building an in-tree clang for testing we have to have libcxx and libcxxabi checked out. This is a common pitfall. Not only are the resulting failures non-obvious, they only manifest when running the test suite, *after* building lldb and clang. By making them a hard dependency (on macOS) we fail earlier with a more useful error message. Differential revision: https://reviews.llvm.org/D55837 llvm-svn: 349539
* Reenable FindLibXml2 on Windows and confirm its at least 2.8 or newerNathan Lanza2018-12-181-11/+5
| | | | | | | | | | | | | | | | | | | | | Summary: GnuWin32 installs libxml2 2.4. This isn't recent enough for lldb's usage and thus the build fails. Searching for libxml2 was disabled due to this build failure. However, the gdb-remote plugin requires libxml2 to parse various gdb-remote protocol packets. Thus check and confirm that the libxml2 version is at least 2.8 and disable it if not. Reviewers: compnerd, zturner Reviewed By: compnerd Subscribers: mgorny Differential Revision: https://reviews.llvm.org/D55583 llvm-svn: 349538
* Fix REQUIRES lineAdrian Prantl2018-12-181-1/+1
| | | | llvm-svn: 349533
* ELF: Don't create sections for section header index 0Pavel Labath2018-12-185-24/+24
| | | | | | | | | | | | | | | | | | | Summary: The first section header does not define a real section. Instead it is used for various elf extensions. This patch skips creation of a section for index 0. This has one furtunate side-effect, in that it allows us to use the section header index as the Section ID (where 0 is also invalid). This way, we can get rid of a lot of spurious +1s in the ObjectFileELF code. Reviewers: clayborg, krytarowski, joerg, espindola Subscribers: emaste, lldb-commits, arichardson Differential Revision: https://reviews.llvm.org/D55757 llvm-svn: 349498
* Fix the "dangerous use of tempnam" warning in Host/SocketTest.cppPavel Labath2018-12-181-9/+10
| | | | | | | instead, create a unique temporary directory, and place the socket file there. llvm-svn: 349495
* de-flake TestThreadStates.test_process_interruptPavel Labath2018-12-181-1/+5
| | | | | | | | | | | | | | | | the "self.assertEqual(thread.GetStopReason(), lldb.eStopReasonSignal)" was occasionally failing because the stop reason would come out as "trace" this happened if we issued the interrupt just as the processed stopped due to single-stepping over the breakpoint (i.e., the it was not necessary to send any signal). Fix this by removing the breakpoint before resuming the process. This ensures the process can run unobstructed. After this, the test passed 200 consecutive runs successfully for me, even while the system was under heavy load. llvm-svn: 349491
* Skip TestMultithreaded.test_sb_api_listener_resume on linuxPavel Labath2018-12-181-1/+1
| | | | | | | The test still fails occasionally (1/100 runs). Upgrade the xfail to skip. llvm-svn: 349487
* Un-XFail TestYMMRegister on linuxPavel Labath2018-12-181-1/+0
| | | | | | | | | | This test was disabled in r326756 as a part of "upstreaming debugserver support for AVX-512 (zmm register set)". This looks like an error because both register set and remote stubs are different. In any case, the test passes now. llvm-svn: 349485
* Un-XFail TestThreadStates.test_process_interruptPavel Labath2018-12-181-12/+7
| | | | | | | | | | This test is passing now on linux. The same test is claimed to be flaky on darwin, so it's possible that's true on linux too. If that's the case we'll have to skip it here too (or fix it). I mark the test as not-debug-info-dependent as a drive-by. llvm-svn: 349482
* Un-XFAIL TestExitDuringBreak.py for linuxPavel Labath2018-12-181-3/+0
| | | | | | | This test is passing now on linux, and probably has been passing since r282993. llvm-svn: 349479
* Un-XFAIL TestNamespaceLookup for linuxPavel Labath2018-12-181-12/+3
| | | | | | | | These tests are now passing on linux, at least with top-of-tree clang, clang-6 and gcc-7.3. It's possible it may still be failing with some older compilers, but I don't have those around to test. llvm-svn: 349478
* Fix typo in r349473Luke Cheeseman2018-12-181-1/+1
| | | | llvm-svn: 349474
* Update CallFrameString API to account for r349472Luke Cheeseman2018-12-182-3/+3
| | | | | | | - CallFrameString now takes an Arch parameter to account for multiplexing overlapping CFI directives llvm-svn: 349473
* build.py: inherit environment in the gcc builderPavel Labath2018-12-181-2/+5
| | | | | | | | | | | | | | Summary: This should enable the compiler to find the system linker for the link step. Reviewers: stella.stamenova, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D55736 llvm-svn: 349461
* Call DeleteCurrentProcess before we replace the old process.Jim Ingham2018-12-181-13/+6
| | | | | | | | | | | | | We need to ensure that Finalize gets called before we start to destroy the old Process or the weak_ptr->shared_ptr link from Threads to Target gets broken before the threads are destroyed. <rdar://problem/43586979> Differential Revision: https://reviews.llvm.org/D55631 llvm-svn: 349435
* Add "dump" command as a custom "process plugin" subcommand when ↵Greg Clayton2018-12-188-1/+386
| | | | | | | | | | | | | | | | | ProcessMinidump is used. Each process plug-in can create its own custom commands. I figured it would be nice to be able to dump things from the minidump file from the lldb command line, so I added the start of the some custom commands. Currently you can dump: minidump stream directory all linux specifc streams, most of which are strings each linux stream individually if desired, or all with --linux The idea is we can expand the command set to dump more things, search for data in the core file, and much more. This patch gets us started. Differential Revision: https://reviews.llvm.org/D55727 llvm-svn: 349429
* A few small updates to the testsuite for running against an iOS device.Jason Molenda2018-12-179-9/+13
| | | | | | | Remove the expected-fails for 34538611; using an alternate platform implementation handles these correctly. llvm-svn: 349417
* Document the DBGSourcePathRemapping dictionary that may be Jason Molenda2018-12-171-0/+27
| | | | | | | | | | present in the dSYM per-uuid plist, its precedence order with the older DBGBuildSourcePath/DBGSourcePath, and note that must be present and have a value of 3 or the dictionary will be ignored. <rdar://problem/46421686> llvm-svn: 349409
* Add PdbAstBuilder.cpp.Jason Molenda2018-12-171-0/+6
| | | | llvm-svn: 349406
* [lit] Detect unexpected passes in lldbtest.Jonas Devlieghere2018-12-171-0/+4
| | | | | | | This patch will have lit report unexpected passes when dotest reports at least one XPASS and no failures. llvm-svn: 349401
* Fix case of source file in CMakeLists.txtZachary Turner2018-12-171-1/+1
| | | | llvm-svn: 349399
* Reflow readmeAdrian Prantl2018-12-171-46/+55
| | | | llvm-svn: 349398
* Remove sleep() synchronisation from teststcase andAdrian Prantl2018-12-171-9/+3
| | | | | | | | | | make the executable name more unique. This test is failing sporadically on some bots. By removing the sleep synchronisation, I'm hoping to get it to fail more reproducibly so I can investigate what is going on. llvm-svn: 349397
* [NativePDB] Decouple AST reconstruction from lldb Symbol creation.Zachary Turner2018-12-1710-814/+1374
| | | | | | | | | | | | Previously the code that parsed debug info to create lldb's Symbol objects such as Variable, Type, Function, etc was tightly coupled to the AST reconstruction code. This made it difficult / impossible to implement functions such as ParseDeclsForContext() that were only supposed to be operating on clang AST's. By splitting these apart, the logic becomes much cleaner and we have a clear separation of responsibilities. llvm-svn: 349383
* Fix lldb's macosx/heap.py cstr command.Davide Italiano2018-12-173-1/+28
| | | | | | <rdar://problem/44432167> llvm-svn: 349372
* [Driver] Fix --repl argument.Jonas Devlieghere2018-12-172-8/+19
| | | | | | | | | | | | | | | | | The --repl option was incorrectly defined as "Separate" (option and value separated by a space). This resulted in the option not being picked up when no value was specified. This patch fixes the driver so that `--repl` is recognized again. I split the option into two: - A flag: `--repl` and `-r` which take no arguments. - A joined option: `--repl=<flags>` and `-r=<flags>` that forward its values to the repl. This should match the driver's old behavior. llvm-svn: 349371
* Make crashlog.py work or binaries with spaces in their namesAdrian Prantl2018-12-172-21/+109
| | | | | | | | | | | | This is a little dangerous since the crashlog files aren't 100% unambiguous, but the risk is mitigated by using a non-greedy +? pattern. rdar://problem/38478511 Differential Revision: https://reviews.llvm.org/D55608 llvm-svn: 349367
* Make crashlog.py work when a .dSYM is present, but a binary is missingAdrian Prantl2018-12-171-15/+37
| | | | | | | | | | Often users have a crash log an d a .dSYM bundle, but not the original application binary. It turns out that for crash symbolication, we can safely fall back to using the binary inside the .dSYM bundle. Differential Revision: https://reviews.llvm.org/D55607 llvm-svn: 349366
* [Clang AST Context] Add a few helper functions.Zachary Turner2018-12-174-14/+35
| | | | | | | | | The first one allows us to add an enumerator to an enum if we already have an APSInt, since ultimately the implementation just constructs one anyway. The second is just a general utility function to covert a CompilerType to a clang::TagDecl. llvm-svn: 349360
* Add a description of the similar packets defined in theJason Molenda2018-12-161-3/+18
| | | | | | | | | | | gdb-remote serial protocol documentation, call out the incompatability of lldb's vFile:open: packet as it stands today. Need to think about whether to change lldb's enum values (breaking any existing lldb-server's out there) or create a different packet and abandon vFile:open: at least for a while. llvm-svn: 349316
* Clarify a few minor details.Jason Molenda2018-12-161-7/+8
| | | | llvm-svn: 349313
* Update the vFile:open: description to note that the flagsJason Molenda2018-12-152-1/+5
| | | | | | | | | | in the packet are lldb enum values, not the open(2) oflags -- forgot about that wrinkle. Also added a comment to File.h noting that the existing values cannot be modified or we'll have a compatibilty break with any alternative platform implementations, or older versions of lldb-server. llvm-svn: 349282
* lldb-test: Improve newline handlingPavel Labath2018-12-153-43/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously lldb-test's LinePrinter would output the indentation spaces even on completely empty lines. This is not nice, as trailing spaces get flagged as errors in some tools/editors, and it prevents FileCheck's CHECK-EMPTY from working. Equally annoying was the fact that the LinePrinter did not terminate it's output with a newline (instead it would leave the unterminated hanging indent from the last NewLine() command), which meant that the shell prompt following the lldb-test command came out wrong. This fixes both issues by changing how newlines are handled. NewLine(), which was ending the previous line ('\n') *and* begging the next line by printing the indent, is now "demoted" to just printing literal "\n". Instead, lines are now delimited via a helper Line object, which makes sure the line is indented and terminated in an RAII fashion. The typical usage would be: Printer.line() << "This text will be indented and terminated"; If one needs to do more work than it will fit into a single statement, one can also assign the result of the line() function to a local variable. The line will then be terminated when that object goes out of scope. Reviewers: zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D55597 llvm-svn: 349269
* ELF: more section creation cleanupPavel Labath2018-12-159-73/+230
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch attempts to move as much code as possible out of the CreateSections function to make room for future improvements there. Some of this may be slightly over-engineered (VMAddressProvider), but I wanted to keep the logic of this function very simple, because once I start taking segment headers into acount (as discussed in D55356), the function is going to grow significantly. While in there, I also added tests for various bits of functionality. This should be NFC, except that I changed the order of hac^H^Heuristicks for determining section type slightly. Previously, name-based deduction (.symtab -> symtab) would take precedence over type-based (SHT_SYMTAB -> symtab) one. In fact we would assert if we ran into a .text section with type SHT_SYMTAB. Though unlikely to matter in practice, this order seemed wrong to me, so I have inverted it. Reviewers: clayborg, krytarowski, espindola Subscribers: emaste, arichardson, lldb-commits Differential Revision: https://reviews.llvm.org/D55706 llvm-svn: 349268
* Remove /proc/pid/maps parsing code from NativeProcessLinuxPavel Labath2018-12-151-101/+18
| | | | | | A utility function doing this was added in r349182, so use that instead. llvm-svn: 349267
* Ah, forgot qModuleInfo. Need to look that one upJason Molenda2018-12-151-0/+11
| | | | | | and finish filling this in. llvm-svn: 349232
* A brief outline of the packets that need to be implementedJason Molenda2018-12-151-0/+375
| | | | | | | | | | to write an lldb platform server that doesn't link against LLDB.framework to be able to fully run the lldb testsuite on a remote system. The platform packets weren't covered in the existing lldb-gdb-remote.txt doc, so I wanted to jot them down in one place. llvm-svn: 349231
* Simplify Boolean expressionsJonas Devlieghere2018-12-15177-1018/+599
| | | | | | | | | | | This patch simplifies boolean expressions acorss LLDB. It was generated using clang-tidy with the following command: run-clang-tidy.py -checks='-*,readability-simplify-boolean-expr' -format -fix $PWD Differential revision: https://reviews.llvm.org/D55584 llvm-svn: 349215
* Fix the unittests for the move of Listener & BroadcasterJim Ingham2018-12-141-2/+2
| | | | | | from Core to Utility. llvm-svn: 349211
* Update a comment according to r255360 "Remove -r and -R options from dotest.py"Tatyana Krasnukha2018-12-141-2/+1
| | | | llvm-svn: 349208
OpenPOWER on IntegriCloud