summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
Commit message (Collapse)AuthorAgeFilesLines
* Ah, forgot a debug line I left in the dsym-for-uuid.sh scriptJason Molenda2019-07-171-1/+0
| | | | | | | to make sure it was correctly being disabled after this test case completed. llvm-svn: 366381
* Add support to ProcessMachCore::DoLoadCore to handle an EFI UUID str.Jason Molenda2019-07-175-0/+442
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a core file has an EFI version string which includes a UUID (similar to what it returns for the kdp KDP_KERNELVERSION packet) in the LC_IDENT or LC_NOTE 'kern ver str' load command. In that case, we should try to find the binary and dSYM for the UUID listed. The dSYM may have python code which knows how to relocate the binary to the correct address in lldb's target section load list and loads other ancillary binaries. The test case is a little involved, 1. it compiles an inferior hello world apple (a.out), 2. it compiles a program which can create a corefile manually with a specific binary's UUID encoded in it, 3. it gets the UUID of the a.out binary, 4. it creates a shell script, dsym-for-uuid.sh, which will return the full path to the a.out + a.out.dSYM when called with teh correct UUID, 5. it sets the LLDB_APPLE_DSYMFORUUID_EXECUTABLE env var before creating the lldb target, to point to this dsym-for-uuid.sh, 6. runs the create-corefile binary we compiled in step #2, 7. loads the corefile from step #6 into lldb, 8. verifies that lldb loaded a.out by reading the LC_NOTE load command from the corefile, calling dsym-for-uuid.sh with that UUID, got back the path to a.out and loaded it. whew! <rdar://problem/47562911> llvm-svn: 366378
* Fix CreateFunctionTemplateSpecialization to prevent dangling poiner to stack ↵Shafik Yaghmour2019-07-173-0/+39
| | | | | | | | | | memory In ClangASTContext::CreateFunctionTemplateSpecializationInfo a TemplateArgumentList is allocated on the stack but is treated as if it is persistent in subsequent calls. When we exit the function func_decl will still point to the stack allocated memory. We will use TemplateArgumentList::CreateCopy instead which will allocate memory out of the DeclContext. Differential Revision: https://reviews.llvm.org/D64777 llvm-svn: 366365
* [dotest] Disable color while testing.Jonas Devlieghere2019-07-171-0/+3
| | | | | | | | | Disable colors so we don't risk having unexpected ANSI codes in the test output. Currently, the behavior of a test can change depending on whether it's run under a color-supporting terminal, or under a dummy terminal, for example when using lit or multiprocessing. llvm-svn: 366356
* [Test] Add module cache for TestWeakSymbolsJonas Devlieghere2019-07-171-1/+1
| | | | | | | Explicitly set the module cache in the Makefile with -fmodules-cache-path. llvm-svn: 366352
* [ASTImporter] Fix LLDB lookup in transparent ctx and with ext srcGabor Marton2019-07-172-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: With LLDB we use localUncachedLookup(), however, that fails to find Decls when a transparent context is involved and the given DC has external lexical storage. The solution is to use noload_lookup, which works well with transparent contexts. But, we cannot use only the noload_lookup since the slow case of localUncachedLookup is still needed in some other cases. These other cases are handled in ASTImporterLookupTable, but we cannot use that with LLDB since that traverses through the AST which initiates the load of external decls again via DC::decls(). We must avoid loading external decls during the import becuase ExternalASTSource is implemented with ASTImporter, so external loads during import results in uncontrolled and faulty import. Reviewers: shafik, teemperor, jingham, clayborg, a_sidorin, a.sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits, lldb-commits Tags: #clang, #lldb Differential Revision: https://reviews.llvm.org/D61333 llvm-svn: 366325
* [lldb] [test] Un-XFAIL TestFormattersSBAPI on NetBSDMichal Gorny2019-07-131-1/+0
| | | | llvm-svn: 365991
* [lldb] Make TestDeletedExecutable more reliableRaphael Isemann2019-07-112-5/+25
| | | | | | | | | | | | | | | | | | | | | Summary: It seems that calling Popen can return to the caller before the started process has read all the needed information from its executable. This means that in case we delete the executable while the process is still starting up, this test will create a zombie process which in turn leads to a failing test. On my macOS system this happens quite frequently. This patch fixes this by letting the test synchronize with the inferior after it has started up. Reviewers: davide Reviewed By: davide Subscribers: labath, friss, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64546 llvm-svn: 365813
* [lldb] Disable TestDollarInVariable.py on WindowsRaphael Isemann2019-07-111-1/+2
| | | | | | | | | | | | It seems on Windows we don't handle the lldb_expr_result variable correctly: ``` AssertionError: False is not True : 'expr $__lldb_expr_result' returns expected result, got '(int &) $0 = 0x0000000000000000' ``` I'll disable the test until I can find a way to debug this on Windows. llvm-svn: 365719
* [lldb] Fix handling of dollar characters in expr commandRaphael Isemann2019-07-106-0/+53
| | | | llvm-svn: 365698
* [lldb_test_suite] Fix lldb test suite targeting remote AndroidAlex Langford2019-07-093-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Fixed `Android.rules` for running test suite on remote android - the build configuration is not compatible with ndk structure, change it to link to static libc++ - generally clang should be able to use libc++ and will link against the right library, but some libc++ installations require the user manually link libc++abi. - add flag `-lc++abi` to fix the test binary build failure Added `skipIfTargetAndroid` `skipUnlessTargetAndroid` for better test support - the `skipIfPlatform` method will ask `lldbplatformutil.getPlatform()` for platform info which is actually the os type, and //Android// is not os type but environment - create this function to handle the android target condition **To Run Test on Remote Android** 1 start lldb-server on your devices 2 run lldb-dotest with following configuration: `./lldb-dotest --out-of-tree-debugserver --arch aarch64 --platform-name remote-android --platform-url connect://localhost:12345 --platform-working-dir /data/local/tmp/ --compiler your/ndk/clang` Reviewers: xiaobai, labath Reviewed By: labath Subscribers: labath, javed.absar, kristof.beyls, srhines, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64118 llvm-svn: 365561
* [lldb-suite] Skip TestMachCore on WindowsStella Stamenova2019-07-091-1/+4
| | | | | | This test was originally marked as expected failure on Windows, but it is timing out instead of outright failing now. The expectedFailure attribute does not correctly track timeouts (as in, they don't count as failures), so now this is causing the test suite to fail. llvm-svn: 365527
* [lldb] [test] Update NetBSD XFAILs in test suiteMichal Gorny2019-07-0811-4/+9
| | | | llvm-svn: 365338
* [lldb] [lldbsuite] Use a unique class name for TestValueVarUpdateStella Stamenova2019-07-011-1/+1
| | | | | | It looks like when this test was added, it was based on TestHelloWorld and it ended up with the same class name. This is an issue because the logs associated with the tests use the class name as the identifier for the file and if two tests have the same name their logs overwrite each other. On non-windows, this just means we lose one of the logs, but on Windows this means that one of the tests will fail occasionally because the file are locked by the other test. llvm-svn: 364860
* [lldb] [lldbsuite] Use a unique class name for TestBacktraceAllStella Stamenova2019-07-011-1/+1
| | | | | | It looks like when this test was added, it was based on TestBreakAfterJoin and it ended up with the same class name. This is an issue because the logs associated with the tests use the class name as the identifier for the file and if two tests have the same name their logs overwrite each other. On non-windows, this just means we lose one of the logs, but on Windows this means that one of the tests will fail occasionally because the file are locked by the other test. llvm-svn: 364826
* [lldb] [Process/NetBSD] Use global enable bits for watchpointsMichal Gorny2019-07-0112-20/+0
| | | | | | | | | | | Set global enable bits (i.e. bits 1, 3, 5, 7) to enable watchpoints on NetBSD rather than the local enable bits (0, 2, 4, 6). The former are necessary for watchpoints to be correctly recognized by the NetBSD kernel. The latter cause them to be reported as trace points. Differential Revision: https://reviews.llvm.org/D63792 llvm-svn: 364781
* @skipIfXmlSupportMissing TestRecognizeBreakpointPavel Labath2019-07-011-0/+1
| | | | llvm-svn: 364753
* Revert "Implement xfer:libraries-svr4:read packet"Pavel Labath2019-07-018-226/+1
| | | | | | | | | | | | | | | | | | | D62502, together with D62503 have broken the builds which have XML support enabled. Reverting D62503 (r364355) fixed that, but has broken has left some of the tests introduced by D62502 broken more or less nondeternimistically (it depended on whether the system happens to place the library list near unreadable pages of memory). I attempted to make a partial fix for this in r364748, but Jan Kratochvil pointed out that this reintroduces the problem which reverting D62503 was trying to solve. So instead, I back out the whole thing so we can get back to a clean slate that works for everyone. We can figure out a way forward from there. This reverts r364748, r363772 and r363707. llvm-svn: 364751
* Replace tabs with spaces.Adrian Prantl2019-06-291-2/+2
| | | | llvm-svn: 364716
* Get the expression parser to handle missing weak symbols.Jim Ingham2019-06-286-0/+157
| | | | | | | | | | MachO only for this patch. Differential Revision: https://reviews.llvm.org/D63914 <rdar://problem/51463642> llvm-svn: 364686
* Make sure the thread list is updated before you set the stop reasonJim Ingham2019-06-283-0/+206
| | | | | | | | | | | | | | | on a thread. When talking to some older gdb-remote stubs, We were getting a stop reason from the stop reply packet and setting it on the relevant thread before we updated the full stop list. That would get discarded when the full list was updated. Also, if you already have a thread list when you go to see if there is an Operating System plugin, and you do indeed load a new OS plugin, you have to re-fetch the thread list or it will only show the raw threads. Differential Revision: https://reviews.llvm.org/D62887 llvm-svn: 364666
* Support nested target.xml register definition files, lack of reg group markers.Jason Molenda2019-06-261-0/+238
| | | | | | | | | | | | | | | | | | | | | The qemu x86_64 target returns a target.xml register definition file which includes other xml files and they include others, etc. Also, the registers are not put in register groups like lldb wants to see. This patch (1) puts registers that aren't in a register group in a "general" register group, (2) change ProcessGDBRemote::GetGDBServerRegisterInfo to be a method that starts the parsing, asking a recurisve function to fetch and parse target.xml, (3) adds ProcessGDBRemote::GetGDBServerRegisterInfoXMLAndProcess which can recusively call itself to read and parse included xml files, (4) in addition to expecting the top-level <target> element (which only happens in the top level xml file), also an xml file that consists of a <feature> node - read the register defintions and includes from that <feature> element. <rdar://problem/49537922> Differential revision: https://reviews.llvm.org/D63802 llvm-svn: 364484
* [dotest] Add the ability to set environment variables for the inferior.Jonas Devlieghere2019-06-264-0/+15
| | | | | | | | | | | This patch adds a dotest flag for setting environment variables for the inferior. This is different from the current --env flag, which sets variables in the debugger's environment. This allows us to set things like LD_LIBRARY_PATH for testing. Differential revision: https://reviews.llvm.org/D63790 llvm-svn: 364443
* [dotest] Remove unused functionJonas Devlieghere2019-06-251-9/+1
| | | | | | The function `EnvArray` has no used. llvm-svn: 364351
* [ABI] Implement Windows ABI for x86_64Alex Langford2019-06-241-1/+0
| | | | | | | | | | | | | | | | | | Summary: Implement the ABI for WIndows-x86_64 including register info and calling convention. Handled nested struct returned in register (SysV doesn't have it supported) Reviewers: xiaobai, compnerd Reviewed By: compnerd Subscribers: labath, jasonmolenda, fedor.sergeev, mgorny, teemperor, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D62213 llvm-svn: 364216
* Stabilize TestGdbRemoteLibrariesSvr4SupportPavel Labath2019-06-191-3/+6
| | | | | | | | | | | | | | on some systems this test fails because the two methods it uses to cross-reference the data don't match in the case of the vdso module. The "read from /proc/%pid/maps" method returns "[vdso]", while the method which reads it from the linker rendezvous structures returns "linux-vdso.so.1". Neither of the two names match any actual file. This restricts the test to only consider the libraries that we ourselves have added to the test, minimizing the impact of system dependencies that we cannot control. llvm-svn: 363772
* Implement xfer:libraries-svr4:read packetAntonio Afonso2019-06-188-1/+223
| | | | | | | | | | | | | | | | | | | Summary: This is the fourth patch to improve module loading in a series that started here (where I explain the motivation and solution): D62499 Implement the `xfer:libraries-svr4` packet by adding a new function that generates the list and then in Handle_xfer I generate the XML for it. The XML is really simple so I'm just using string concatenation because I believe it's more readable than having to deal with a DOM api. Reviewers: clayborg, xiaobai, labath Reviewed By: labath Subscribers: emaste, mgorny, srhines, krytarowski, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D62502 llvm-svn: 363707
* Add color to the default thread and frame format.Jonas Devlieghere2019-06-171-1/+1
| | | | | | | | | | | | | | Now that we correctly ignore ASCII escape sequences when colors are disabled (r362240), I'd like to change the default frame and thread format to include color in their output, in line with the syntax highlighting that Raphael added a while ago. This patch adds highlighting for the stop reason, the file, line and column number. With colors disabled, this of course is a no-op. Differential revision: https://reviews.llvm.org/D62743 llvm-svn: 363608
* [lldb] [test] Extend D55859 symbols.enable-external-lookup=false for more ↵Jan Kratochvil2019-06-173-6/+11
| | | | | | | | | | | | | | | | | | | | | | testcases D55859 <https://reviews.llvm.org/D55859> has no effect for some of the testcases so this patch extends it even for (all?) other testcases known to me. LLDB was failing when LLDB prints errors reading system debug infos (`*-debuginfo.rpm`, DWZ-optimized) which should never happen as LLDB testcases should not be affected by system debug infos. `lldb/packages/Python/lldbsuite/test/api/multithreaded/driver.cpp.template` is using only SB API which does not expose `ModuleList` so I had to call `HandleCommand()` there. `lldb-test.cpp` could also use `HandleCommand` and then there would be no need for `ModuleListProperties::SetEnableExternalLookup()` but I think it is cleaner with API and not on based on text commands. Differential Revision: https://reviews.llvm.org/D63339 llvm-svn: 363567
* [lldb] [test] Watchpoint tests can be always run as root on NetBSDMichal Gorny2019-06-171-0/+2
| | | | llvm-svn: 363551
* [lldb] [test] Skip watchpoint tests on NetBSD if userdbregs is disabledMichal Gorny2019-06-171-0/+25
| | | | | | | | | | | Skip watchpoint tests if security.models.extensions.user_set_dbregs is disabled. This indicates that unprivileged processes are not allowed to write to debug registers which is a prerequisite for using hardware watchpoints. Differential Revision: https://reviews.llvm.org/D63380 llvm-svn: 363536
* Skip failing test on older versions of clang.Adrian Prantl2019-06-121-0/+1
| | | | llvm-svn: 363202
* [Expression] Add PersistentExpressionState::GetCompilerTypeFromPersistentDeclAlex Langford2019-06-121-0/+10
| | | | | | | | | | | | | | | | Summary: PersistentStateExpressions (e.g. ClangPersistentVariables) have the ability to define types using expressions that persist throughout the debugging session. GetCompilerTypeFromPersistentDecl is a useful operation to have if you need to use any of those persistently declared types, like in CommandObjectMemory. This decouples clang from CommandObjectMemory and decouples Plugins from Commands in general. Differential Revision: https://reviews.llvm.org/D62797 llvm-svn: 363183
* [ABI] Fix SystemV ABI to handle nested aggregate type returned in registerAlex Langford2019-06-044-6/+238
| | | | | | | | | | Add a function to flatten the nested aggregate type Differential Revision: https://reviews.llvm.org/D62702 Patch by Wanyi Ye <kusmour@gmail.com> llvm-svn: 362543
* [lldb-server] Support 'g' packetsPavel Labath2019-05-306-44/+218
| | | | | | | Differential Revision: https://reviews.llvm.org/D62221 Patch by Guilherme Andrade <guiandrade@google.com>. llvm-svn: 362063
* [Test] Fix conflicting test names.Jonas Devlieghere2019-05-211-1/+1
| | | | | | | Two tests having the same name creates a race condition when moving the trace files. llvm-svn: 361310
* [lldb-mi] Include full path in the -data-disassemble responseTatyana Krasnukha2019-05-211-0/+8
| | | | | | | | Differential Revision: https://reviews.llvm.org/D59015 Patch by Anton Kolesov <Anton.Kolesov@synopsys.com> llvm-svn: 361255
* Make sure GetObjectDescription falls back to the Objective-C runtime.Adrian Prantl2019-05-163-0/+42
| | | | | | | | | | | | | This fixes an unintended regression introduced by https://reviews.llvm.org/D61451 by making sure the Objective-C runtime is also tried when the "correct" language runtime failed to return an object description. rdar://problem/50791055 Differential Revision: https://reviews.llvm.org/D62015 llvm-svn: 360929
* [lldb] [test] Skip one more TestMiBreak on NetBSDMichal Gorny2019-05-151-1/+1
| | | | llvm-svn: 360800
* [lldb] [test] Mark frequently failing flaky tests skipped on NetBSDMichal Gorny2019-05-154-4/+6
| | | | llvm-svn: 360767
* [Target] Generalize some behavior in ThreadAlex Langford2019-05-151-3/+4
| | | | | | | | | | Summary: I don't think there's a good reason for this behavior to be considered ObjC-specific. We can generalize this. Differential Revision: https://reviews.llvm.org/D61776 llvm-svn: 360741
* Make SBDebugger.RunCommandInterpreter callable from Python.Jim Ingham2019-05-151-0/+38
| | | | | | | | Authored by: Lukas Boger Differential Revision: https://reviews.llvm.org/D61602 llvm-svn: 360730
* TestMinidumpNew.py: Use yaml2obj where possiblePavel Labath2019-05-1410-79/+147
| | | | | | | | | Replace checked-in minidumps with their yaml forms now that yaml2obj supports the ThreadList stream. I delete the test_modules_in_mini_dump test altogether as this functionality is covered more systematically in TestMinidumpUUID.py. llvm-svn: 360655
* typedef enum -> enumFangrui Song2019-05-143-6/+6
| | | | | | | | Reviewed By: labath Differential Revision: https://reviews.llvm.org/D61883 llvm-svn: 360654
* @skipIfLinux flaky lldb-mi testsPavel Labath2019-05-132-1/+3
| | | | llvm-svn: 360564
* Change the disabling of packet logging to be in TearDownHook lambdas.Jason Molenda2019-05-104-12/+9
| | | | llvm-svn: 360482
* Ted pointed out that some of test tests that are enabling packetJason Molenda2019-05-104-7/+17
| | | | | | | | logging when the testsuite is run with trace mode enabled are leaving the logging enabled after the tests have finished. That state isn't cleared in a --no-multiprocess testsuite run. llvm-svn: 360480
* minidump: Don't eagerly resolve module paths read from the minidumpPavel Labath2019-05-102-1/+29
| | | | | | | | This can cause us to return paths to files on the local filesystem even if we don't end up using that file (for instance because the file is not a real module). llvm-svn: 360432
* Revert "Disable the step over skipping calls feature since buildbots are not ↵Pavel Labath2019-05-102-2/+0
| | | | | | | | | | | | | | | | happy." While this fixed the windows bot failures, it also broke all other bots. Upon closer inspection, it turns out that the windows bots were "broken" because two tests were unexpectedly passing -- i.e., the original patch (r360375) actually improved our stepping support on windows. So instead, I remove the relevant XFAILs. This reverts commit r360397. llvm-svn: 360407
* Improve step over performance by not stopping at branches that are function ↵Greg Clayton2019-05-091-4/+3
| | | | | | | | | | calls and stepping into and them out of each one Currently when we single step over a source line, we run and stop at every branch in the source line range. We can reduce the number of times we stop when stepping over by figuring out if any of these branches are function calls, and if so, ignore these branches. Since we are stepping over we can safely ignore these calls since they will return to the next instruction. Currently the step logic would stop at those branches (1st stop), single step into the branch (2nd stop), and then set a breakpoint at the return address (3rd stop), and then continue. Differential Revision: https://reviews.llvm.org/D58678 llvm-svn: 360375
OpenPOWER on IntegriCloud