summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Fix TestVSCode_attach on LinuxStella Stamenova2019-05-091-4/+7
| | | | | | The test is failing sometimes because the debugger is failing to attach for lack of permissions. The fix is to call lldb_enable_attach inside the inferior main function llvm-svn: 360371
* [test] Remove randomnessJonas Devlieghere2019-05-051-8/+3
| | | | | | | | This particular test fails once every so many runs on GreenDragon. Given that the randomness in the inferior isn't critical to the test, I removed it in the hopes that it is the cause of the flakiness. llvm-svn: 359992
* Fixed some minor style issues in rLLDB359921 [NFC]Raphael Isemann2019-05-031-6/+6
| | | | | | | | Ran clang-format on the added test file and use the new StringRef comparison over the temporary ConstStrings. Also aligned the end of one of the code string literals. llvm-svn: 359931
* [Alias] Add 're' alias for registerJonas Devlieghere2019-05-031-1/+2
| | | | | | | | | | This patch makes `re` an alias for `register`. Currently `re<TAB>` gives you the choice between `register` and `reproducer`. Given that you use `register` a lot more often, it should win for the common substring. Differential revision: https://reviews.llvm.org/D61469 llvm-svn: 359927
* Supply a default implementation of IsRuntimeSupportValue.Adrian Prantl2019-05-031-1/+0
| | | | | | Thanks to Pavel for pointing this out. llvm-svn: 359925
* Fix for ambiguous lookup in expressions between local variable and namespaceShafik Yaghmour2019-05-037-0/+117
| | | | | | | | | Summary: In an Objective-C context a local variable and namespace can cause an ambiguous name lookup when used in an expression. The solution involves mimicking the existing C++ solution which is to add local using declarations for local variables. This causes a different type of lookup to be used which eliminates the namespace during acceptable results filtering. Differential Revision: https://reviews.llvm.org/D59960 llvm-svn: 359921
* Split TestVLA into two and XFAIL one partPavel Labath2019-05-031-3/+10
| | | | | | | The part which checks whether vla_expr shows up in the variable list does not pass on non-darwin platforms. Add the appropriate decorator. llvm-svn: 359867
* Fix tests on non-Darwin platforms.Adrian Prantl2019-05-022-1/+6
| | | | llvm-svn: 359846
* Hide runtime support values such as clang's __vla_expr from frame variableAdrian Prantl2019-05-024-2/+94
| | | | | | | | | | | | by respecting the "artificial" attribute on variables. Function arguments that are artificial and useful to end-users are being whitelisted by the language runtime. <rdar://problem/45322477> Differential Revision: https://reviews.llvm.org/D61451 llvm-svn: 359841
* Disable TestArgumentPassingRestrictions for clang < 7Jonas Devlieghere2019-05-021-1/+2
| | | | | | http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-matrix/ llvm-svn: 359812
* [test] TestSharedPtr -> TestSharedPtrDbgInfoContentJonas Devlieghere2019-05-021-1/+1
| | | | | | | | | | Two tests cannot share the same name, because they will generate an identical trace file. When that happens, this can lead to a race condition where dotest fails when trying to move both files into the trace directory, because the file has already been moved. Additionally, the trace will have been overwritten by the test that finishes last. llvm-svn: 359807
* Add std::stack and std::queue support to CxxModuleHandlerRaphael Isemann2019-05-026-0/+139
| | | | | | | | | | | | | | Reviewers: aprantl, shafik Reviewed By: aprantl, shafik Subscribers: lldb-commits Tags: #c_modules_in_lldb, #lldb Differential Revision: https://reviews.llvm.org/D61305 llvm-svn: 359779
* Inject only relevant local variables in the expression evaluation contextRaphael Isemann2019-05-021-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In r259902, LLDB started injecting all the locals in every expression evaluation. This fixed a bunch of issues, but also caused others, mostly performance regressions on some codebases. The regressions were bad enough that we added a setting in r274783 to control the behavior and we have been shipping with the setting off to avoid the perf regressions. This patch changes the logic injecting the local variables to only inject the ones present in the expression typed by the user. The approach is fairly simple and just scans the typed expression for every local name. Hopefully this gives us the best of both world as it just realizes the types of the variables really used by the expression. Landing this requires the 2 other issues I pointed out today to be addressed but I wanted to gather comments right away. Original patch by Frédéric Riss! Reviewers: jingham, clayborg, friss, shafik Reviewed By: jingham, clayborg Subscribers: teemperor, labath, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D46551 llvm-svn: 359773
* [test] Convert TestWatchpointSetErrorCases.py to litJonas Devlieghere2019-05-021-74/+0
| | | | | | | | | | This test is flaky on GreenDragon. Since it was a pexpect test and straightforward enough to convert, I went ahead and converted it to a lit test. Differential revision: https://reviews.llvm.org/D61414 llvm-svn: 359751
* Set a CXXRecordDecl to not be passed in registers if DW_CC_pass_by_reference ↵Shafik Yaghmour2019-05-013-0/+56
| | | | | | | | | | | | | when loading from DWARF Summary: This will fix a bug where during expression parsing we are not setting a CXXRecordDecl to not be passed in registers and the resulting code generation is wrong. The DWARF attribute DW_CC_pass_by_reference tells us that we should not be passing in registers i.e. RAA_Indirect. This change depends this clang change which fixes the fact that the ASTImporter does not copy RecordDeclBits for CXXRecordDecl: https://reviews.llvm.org/D61140 Differential Revision: https://reviews.llvm.org/D61146 llvm-svn: 359732
* Disable queues_with_libBacktraceRecordingJonas Devlieghere2019-05-011-0/+1
| | | | | | | | After multiple attempts from both Fred and Adrian, this variant of the test is still flaky on GreenDragon. This commit disables it while we continue investigate. llvm-svn: 359724
* Disabling test in TestClassTemplateParameterPack.py until we do template ↵Shafik Yaghmour2019-05-012-7/+9
| | | | | | | | | | | | | lookup correctly Summary: Some tests currently only work because we are pulling all the local variables when we are evaluating an expression. This will soon change and these test are working but for the wrong reasons. The details can be found in the discussion here: http://lists.llvm.org/pipermail/lldb-commits/Week-of-Mon-20180507/040689.html Differential Review: https://reviews.llvm.org/D61266 llvm-svn: 359699
* Un-xfail the TestMiniDump tests on WindowsStella Stamenova2019-04-301-2/+0
| | | | | | After Aaron's commit for ObjectFilePECOFF:: GetUUID, the tests are now passing llvm-svn: 359573
* Instantiate 'std' templates explicitly in the expression evaluatorRaphael Isemann2019-04-3048-0/+800
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch is a follow-up for D58125. It implements the manual instantiation and merging of 'std' templates like `std::vector` and `std::shared_ptr` with information from the debug info AST. This (finally) allows using these classes in the expression evaluator like every other class (i.e. things like `vec.size()` and shared_ptr debugging now works, yay!). The main logic is the `CxxModuleHandler` which intercept the ASTImporter import process and replaces any `std` decls by decls from the C++ module. The decls from the C++ module are "imported" by just deserializing them directly in the expression evaluation context. This is mostly because we don't want to rely on the ASTImporter to correctly import these declarations, but in the future we should also move to the ASTImporter for that. This patch doesn't contain the automatic desugaring for result variables. This means that if you call for example `size` of `std::vector` you maybe get some very verbose typedef'd type as the variable type, e.g. `std::vector<int, std::allocator<int>>::value_type`. This is not only unreadable, it also means that our ASTImporter has to import all these types and associated decls into the persisent variable context. This currently usually leads to some assertion getting triggered in Clang when the ASTImporter either makes a mistake during importing or our debug info AST is inconsitent. The current workaround I use in the tests is to just cast the result to it's actual type (e.g. `size_t` or `int`) to prevent the ASTImporter from having to handle all these complicated decls. The automatic desugaring will be a future patch because I'm not happy yet with the current code for that and because I anticipate that this will be a controversial patch. Reviewers: aprantl, shafik, jingham, martong, serge-sans-paille Reviewed By: martong Subscribers: balazske, rnkovacs, mgorny, mgrang, abidh, jdoerfert, lldb-commits Tags: #c_modules_in_lldb, #lldb Differential Revision: https://reviews.llvm.org/D59537 llvm-svn: 359538
OpenPOWER on IntegriCloud