summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* Clean-up usage of OptionDefinition arraysTatyana Krasnukha2018-09-285-103/+61
| | | | | | Differential Revision: https://reviews.llvm.org/D52604 llvm-svn: 343348
* Revert r343318 together with llvm commit r343317Luke Cheeseman2018-09-282-3/+3
| | | | llvm-svn: 343342
* Reapply the changes reverted by r343236Luke Cheeseman2018-09-282-3/+3
| | | | llvm-svn: 343318
* [PDB] Handle `char` as a builtin typeAleksandr Urakov2018-09-285-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: `char`, `signed char` and `unsigned char` are three different types, and they are mangled differently: ``` void __declspec(dllexport) /* ?foo@@YAXD@Z */ foo(char c) { } void __declspec(dllexport) /* ?foo@@YAXE@Z */ foo(unsigned char c) { } void __declspec(dllexport) /* ?foo@@YAXC@Z */ foo(signed char c) { } ``` This commit separates `char` from `signed char` and `unsigned char`. Reviewers: asmith, zturner, labath Reviewed By: asmith, zturner Subscribers: teemperor, lldb-commits, stella.stamenova Tags: #lldb Differential Revision: https://reviews.llvm.org/D52468 llvm-svn: 343298
* [lldb] Remove an assertion in RichManglingContext::GetBufferRef() hit when ↵Aaron Smith2018-09-282-1/+23
| | | | | | | | | | | | | | | | debugging a native x86 Windows process Summary: A RichManglingContext constructed with an invalid demangled name or with a demangled function name without any context will have an empty context. This triggers an assertion in RichManglingContext::GetBufferRef() when debugging a native Windows process on x86 when it shouldn't. Remove the assertion. Reviewers: aleksandr.urakov, zturner, lldb-commits Reviewed By: zturner Subscribers: erik.pilkington Differential Revision: https://reviews.llvm.org/D52626 llvm-svn: 343292
* Fixes for GDB remote packet disassembler:Greg Clayton2018-09-271-59/+131
| | | | | | | | - Add latency timings to GDB packet log summary if timestamps are on log - Add the ability to plot the latencies for each packet type with --plot - Don't crash the script when target xml register info is in wierd format llvm-svn: 343243
* Add an interactive mode to BSD archive parser.Greg Clayton2018-09-271-11/+94
| | | | llvm-svn: 343242
* Revert r343193 together with r343192Luke Cheeseman2018-09-272-3/+3
| | | | llvm-svn: 343236
* Update CallFrameString API to account for r343114Luke Cheeseman2018-09-272-3/+3
| | | | | | | - CallFrameString now takes an Arch parameter to account for multiplexing overlapping CFI directives llvm-svn: 343193
* Refactor ClangUserExpression::GetLanguageForExprRaphael Isemann2018-09-272-20/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The `ClangUserExpression::GetLanguageForExpr` method is currently a big source of sadness, as it's name implies that it's an accessor method, but it actually is also initializing some variables that we need for parsing. This caused that we currently call this getter just for it's side effects while ignoring it's return value, which is confusing for the reader. This patch renames it to `UpdateLanguageForExpr` and merges all calls to the method into a single call in `ClangUserExpression::PrepareForParsing` (as calling this method is anyway mandatory for parsing to succeed) While looking at the code, I also found that we actually have two language variables in this class hierarchy. The normal `Language` from the UserExpression class and the `LanguageForExpr` that we implemented in this subclass. Both don't seem to actually contain the same value, so we probably should look at this next. Reviewers: xbolva00 Reviewed By: xbolva00 Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D52561 llvm-svn: 343191
* Replace pointer to C-array of PropertyDefinition with llvm::ArrayRefTatyana Krasnukha2018-09-2718-40/+24
| | | | | | Differential Revision: https://reviews.llvm.org/D52572 llvm-svn: 343181
* [target] Fix typo and give bool a default valueJonas Devlieghere2018-09-271-5/+5
| | | | | | This addresses Stella's review feedback in D51859. llvm-svn: 343180
* llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...)Fangrui Song2018-09-271-2/+2
| | | | | | The convenience wrapper in STLExtras is available since rL342102. llvm-svn: 343164
* Fix ProcessKDP after r343130Tatyana Krasnukha2018-09-261-2/+2
| | | | llvm-svn: 343141
* Fix OSX build after r343130Tatyana Krasnukha2018-09-261-3/+3
| | | | llvm-svn: 343134
* Replace "nullptr-terminated" C-arrays of OptionValueEnumeration with safer ↵Tatyana Krasnukha2018-09-2654-781/+782
| | | | | | | | llvm::ArrayRef Differential Revision: https://reviews.llvm.org/D49017 llvm-svn: 343130
* [unittest] Fix NativeProcessProtocolTest.cpp (NFC)Jonas Devlieghere2018-09-261-2/+2
| | | | | | | Cast std::min's second argument to size_t to prevent conflicting types for parameter deduction. llvm-svn: 343087
* [PDB] Restore the calling convention from PDBAleksandr Urakov2018-09-266-4/+77
| | | | | | | | | | | | | | | | | | | Summary: This patch implements restoring of the calling convention from PDB. It is necessary for expressions evaluation, if we want to call a function of the debuggee process with a calling convention other than ccall. Reviewers: clayborg, zturner, labath, asmith Reviewed By: clayborg Subscribers: teemperor, lldb-commits, stella.stamenova Tags: #lldb Differential Revision: https://reviews.llvm.org/D52501 llvm-svn: 343084
* Fix a memory read bug in lldb-serverPavel Labath2018-09-262-7/+85
| | | | | | | | | | | | | | NativeProcessProtocol::ReadMemoryWithoutTrap had a bug, where it failed to properly remove inserted breakpoint opcodes if the memory read partially overlapped the trap opcode. This could not happen on x86 because it has a one-byte breakpoint instruction, but it could happen on arm, which has a 4-byte breakpoint instruction (in arm mode). Since triggerring this condition would only be possible on an arm machine (and even then it would be a bit tricky). I test this using a NativeProcessProtocol unit test. llvm-svn: 343076
* [lldb-mi] Fix bugs in target-select-so-path.testAlexander Polyakov2018-09-252-6/+9
| | | | | | | | | | | | | | | | | | | | Summary: * This patch fixes hanging of the test in case of using python3, changes callback function that will be called if the timer ends, changes python interpreter to `%python` that is set up by llvm-lit. * Also, the test didn't work properly since it didn't contain a call of filecheck_proc.communicate(), that means that filecheck didn't run and its return code was equal to 0 in all cases. Reviewers: teemperor, labath, tatyana-krasnukha, aprantl Reviewed By: teemperor, labath Subscribers: ki.stfu, lldb-commits Differential Revision: https://reviews.llvm.org/D52498 llvm-svn: 343033
* Change the unwinder to not use a hard-coded limit on theJason Molenda2018-09-256-2/+65
| | | | | | | | | | max number of stack frames to backtrace, make it a setting, target.process.thread.max-backtrace-depth. Add a test case for the setting. <rdar://problem/28759559> llvm-svn: 343029
* [lldbinline] Set directory attribute on test-specific classesVedant Kumar2018-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set the "mydir" attribute of an inline test on the test-specific class, instead of on the base InlineTest class. This makes it possible to run dotest.py on a directory containing inline tests. This wasn't really possible prior to this patch, because what would happen is that one test would just run over and over again, even though the test infrastructure would claim that different tests were being run. Example: The test infrastructure claimed that all of these different tests were passing, which couldn't be true -- $ ./bin/lldb-dotest /Users/vsk/src/tailcall/lldb/test/testcases/functionalities/tail_call_frames/ -G dwarf -t 2>&1 | grep PASS PASS: LLDB (/Users/vsk/src/builds/tailcall-RA/bin/clang-8-x86_64) :: test_dwarf (lldbsuite.test.lldbtest.TestDisambiguateTailCallSeq) PASS: LLDB (/Users/vsk/src/builds/tailcall-RA/bin/clang-8-x86_64) :: test_dwarf (lldbsuite.test.lldbtest.TestArtificialFrameStepOutMessage) PASS: LLDB (/Users/vsk/src/builds/tailcall-RA/bin/clang-8-x86_64) :: test_dwarf (lldbsuite.test.lldbtest.TestAmbiguousTailCallSeq1) PASS: LLDB (/Users/vsk/src/builds/tailcall-RA/bin/clang-8-x86_64) :: test_dwarf (lldbsuite.test.lldbtest.TestDisambiguatePathsToCommonSink) PASS: LLDB (/Users/vsk/src/builds/tailcall-RA/bin/clang-8-x86_64) :: test_dwarf (lldbsuite.test.lldbtest.TestDisambiguateCallSite) PASS: LLDB (/Users/vsk/src/builds/tailcall-RA/bin/clang-8-x86_64) :: test_dwarf (lldbsuite.test.lldbtest.TestUnambiguousTailCalls) PASS: LLDB (/Users/vsk/src/builds/tailcall-RA/bin/clang-8-x86_64) :: test_dwarf (lldbsuite.test.lldbtest.TestAmbiguousTailCallSeq2) RESULT: PASSED (7 passes, 0 failures, 0 errors, 24 skipped, 0 expected failures, 0 unexpected successes) ... because it wasn't even looking at some of these tests: $ ./bin/lldb-dotest /Users/vsk/src/tailcall/lldb/test/testcases/functionalities/tail_call_frames/ -G dwarf -t 2>&1 | grep "Change dir" Change dir to: /Users/vsk/src/tailcall/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2 Change dir to: /Users/vsk/src/tailcall/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2 Change dir to: /Users/vsk/src/tailcall/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2 Change dir to: /Users/vsk/src/tailcall/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support Change dir to: /Users/vsk/src/tailcall/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2 Change dir to: /Users/vsk/src/tailcall/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return Change dir to: /Users/vsk/src/tailcall/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2 Change dir to: /Users/vsk/src/tailcall/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2 Change dir to: /Users/vsk/src/tailcall/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2 E.g it was only building one of them: $ ls lldb-test-build.noindex/functionalities/tail_call_frames/                         ambiguous_tail_call_seq2 Differential Revision: https://reviews.llvm.org/D52516 llvm-svn: 343023
* XFAIL some tests in TestTargetCreateDeps on linuxPavel Labath2018-09-251-0/+4
| | | | | | | | On linux, we do not support automatic loading of dependent modules, so the module list will always contain just one module (until the target is launched). llvm-svn: 343016
* Replace boolean parameter with enum value according r342633Tatyana Krasnukha2018-09-251-2/+2
| | | | llvm-svn: 342998
* [Swig] Merge typemaps with same bodiesTatyana Krasnukha2018-09-251-196/+53
| | | | | | Differential Revision: https://reviews.llvm.org/D52376 llvm-svn: 342959
* [lldb-mi] Fix hanging of target-select-so-path.testAlexander Polyakov2018-09-241-13/+21
| | | | | | | | | | | | | | | | | | | | | | | Summary: The target-select-so-path test might hang on some platforms. The reason of that behavior was in incorrect usage of Filecheck and lldb-mi processes. Instead of redirecting lldb-mi's output to Filecheck, we should run lldb-mi session, finish the session, collect its output and then pass it to Filecheck. Also, this patch adds a timer to the test to prevent it from hanging in the future. Reviewers: tatyana-krasnukha, aprantl, teemperor Reviewed By: tatyana-krasnukha, teemperor Subscribers: apolyakov, aprantl, teemperor, ki.stfu, abidh, lldb-commits Differential Revision: https://reviews.llvm.org/D52139 llvm-svn: 342915
* Add NativeProcessProtocol unit testsPavel Labath2018-09-242-0/+156
| | | | | | | | | | | | | | | | | | | | | | Summary: NativeProcessProtocol is an abstract class, but it still contains a significant amount of code. Some of that code is tested via tests of specific derived classes, but these tests don't run everywhere, as they are OS and arch-specific. They are also relatively high-level, which means some functionalities (particularly the failure cases) are hard/impossible to test. In this approach, I replace the abstract methods with mocks, which allows me to inject failures into the lowest levels of breakpoint setting code and test the class behavior in this situation. Reviewers: zturner, teemperor Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D52152 llvm-svn: 342875
* Change type of m_user_expression_start_pos to size_tRaphael Isemann2018-09-222-2/+2
| | | | | | | | | AbsPosToLineColumnPos is the only reader of m_user_expression_start_pos and actually treats it like a size_t. Also the value we store in m_user_expression_start_pos is originally a size_t, so it makes sense to change the type of this variable to size_t. llvm-svn: 342804
* Move architecture-specific address adjustment to architecture pluginsTatyana Krasnukha2018-09-218-236/+393
| | | | | | Differential Revision: https://reviews.llvm.org/D48623 llvm-svn: 342762
* build: add libedit to include pathsTatyana Krasnukha2018-09-213-0/+12
| | | | | | Differential Revision: https://reviews.llvm.org/D51999 llvm-svn: 342757
* Add dependency on llc required by find-variable-dwo testTatyana Krasnukha2018-09-211-0/+1
| | | | llvm-svn: 342733
* Skip test if gcc version is less than 7.1 since it doesn't support ↵Tatyana Krasnukha2018-09-211-0/+4
| | | | | | -gcolumn-info option llvm-svn: 342732
* [lldbtest] Fix self.filecheck check file lookupVedant Kumar2018-09-201-10/+11
| | | | | | | | | | | | | | The 'test_filename' property in TestBase changes over time, so attempting to find a check file relative to the directory containing 'test_filename' is flaky. Use the absolute path of the check file as that's always correct (and simpler). This relies on the test driver changing into the test directory, which it seems we can safely assume. As a drive-by, make self.filecheck respect the trace (-t) option. llvm-svn: 342699
* Replace boolean parameter with enum value according r342633Tatyana Krasnukha2018-09-201-1/+1
| | | | llvm-svn: 342671
* Refactor FindVariable() core functionality into StackFrame out of SBFrameShafik Yaghmour2018-09-203-20/+52
| | | | | | | | | | rdar://problem/14365983 Patch by Shafik Yaghmour Differential Revision: https://reviews.llvm.org/D52247 llvm-svn: 342663
* [target] Change target create's behavior wrt loading dependent files.Jonas Devlieghere2018-09-206-12/+224
| | | | | | | | | | | | | | | | | | | | When creating a target, lldb loads all dependent files (i.e. libs in LC_LOAD_DYLIB for Mach-O). This can be confusing, especially when two versions of the same library end up in the shared cache. It's possible to change this behavior, by specifying target create -d <target> these dependents are not loaded. This patch changes the default behavior to only load dependent files only when the target is an executable. When creating a target for a library, it is now no longer necessary to pass -d. The user can still override this behavior by specifying the -d option to change this behavior. rdar://problem/43721382 Differential revision: https://reviews.llvm.org/D51934 llvm-svn: 342634
* [NFC] Turn "load dependent files" boolean into an enumJonas Devlieghere2018-09-2025-64/+88
| | | | | | | | | | | | | | This is an NFC commit to refactor the "load dependent files" parameter from a boolean to an enum value. We want to be able to specify a default, in which case we decide whether or not to load the dependent files based on whether the target is an executable or not (i.e. a dylib). This is a dependency for D51934. Differential revision: https://reviews.llvm.org/D51859 llvm-svn: 342633
* [DataFormatters] Add formatter for C++17 std::variantShafik Yaghmour2018-09-199-0/+458
| | | | | | | | | | rdar://problem/43691454 Patch by Shafik Yaghmour. Differential Revision: https://reviews.llvm.org/D51520 llvm-svn: 342563
* Allow use of self.filecheck in LLDB tests (c.f self.expect)Vedant Kumar2018-09-189-70/+137
| | | | | | | | | | | | | Add a "filecheck" method to the LLDB test base. This allows test authors to pattern match command output using FileCheck, making it possible to write stricter tests than what `self.expect` allows. For context (motivation, examples of stricter checking, etc), see the lldb-dev thread: "Using FileCheck in lldb inline tests". Differential Revision: https://reviews.llvm.org/D50751 llvm-svn: 342508
* Revert "[DataFormatters] Add formatter for C++17 std::variant"Shafik Yaghmour2018-09-179-475/+0
| | | | | | | | This reverts commit r342421. Because it breaks build bot http://green.lab.llvm.org/green/job/lldb-cmake-clang-5.0.2//418/console llvm-svn: 342424
* [DataFormatters] Add formatter for C++17 std::variantShafik Yaghmour2018-09-179-0/+475
| | | | | | | | | | rdar://problem/43691454 Patch by Shafik Yaghmour. Differential Revision: https://reviews.llvm.org/D51520 llvm-svn: 342421
* Add docs for scripted breakpoint resolversJim Ingham2018-09-171-0/+189
| | | | | | Differential Revision: https://reviews.llvm.org/D52065 llvm-svn: 342419
* Revert "[IRInterpreter] Minor cleanups, add comments. NFCI."Davide Italiano2018-09-171-3/+7
| | | | | | This breaks buildbots. llvm-svn: 342404
* Add descriptions to completed expressionsRaphael Isemann2018-09-172-8/+65
| | | | | | | | | | | | | | | | | Summary: Completing inside the expression command now uses the new description API to also provide additional information to the user. For now this information are the types of variables/fields and the signatures of completed function calls. Reviewers: #lldb, JDevlieghere Reviewed By: JDevlieghere Subscribers: JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D52103 llvm-svn: 342385
* [lldb-mi] Correct regex in the symbol-list-lines testAlexander Polyakov2018-09-151-2/+2
| | | | | | | | | | | | | | | | | | | Summary: The test failed in case of compiling a test suite with gcc (checked versions are 5.2.0 and 7.3.0) because it adds one more line entry comparing to clang. It doesn't break the test's logic, so I just added a regex that matches this case. Reviewers: tatyana-krasnukha, aprantl, clayborg Reviewed By: aprantl Subscribers: ki.stfu, lldb-commits Differential Revision: https://reviews.llvm.org/D52101 llvm-svn: 342329
* [IRInterpreter] Minor cleanups, add comments. NFCI.Davide Italiano2018-09-141-7/+3
| | | | llvm-svn: 342280
* Fix lldb-vscode README.mdAlex Langford2018-09-141-8/+8
| | | | | | | | | | Summary: The readme was missing "-" characters to enable links Patch by Nathan Lanza <nathan@lanza.io> Differential Revision: https://reviews.llvm.org/D52069 llvm-svn: 342266
* [IRInterpreter] Fall back to JIT with 128-bit values.Davide Italiano2018-09-144-0/+27
| | | | | | | | | | | | | They're not that common, and falling back is definitely better than throwing an error instead of the result. If we feel motivated, we might end up implementing support for these, but it's unclear whether it's worth the effort/complexity. Fixes PR38925. <rdar://problem/44436068> llvm-svn: 342262
* Make the eSearchDepthFunction searches work, add tests Jim Ingham2018-09-144-10/+80
| | | | | | | | using the scripted breakpoint resolver. Differential Revision: https://reviews.llvm.org/D52111 llvm-svn: 342259
* [PDB] Use the raw PDB symbol interface more accuratelyAleksandr Urakov2018-09-141-13/+39
| | | | | | | | | | | | | | | | | | Summary: This patch adds some symbol tag checks before using the `IPDBRawSymbol` interface to improve safety and readability. Reviewers: zturner Reviewed By: zturner Subscribers: lldb-commits, stella.stamenova Tags: #lldb Differential Revision: https://reviews.llvm.org/D51967 llvm-svn: 342208
OpenPOWER on IntegriCloud