summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* [NFC] Fix compiler warning in TestArmv7Disassembly.cppRaphael Isemann2018-09-111-1/+1
| | | | | | | | | | The warning is comparison of integers of different signs: 'const int' and 'const unsigned long' and triggered by EXPECT_EQ (num_of_instructions, inst_list.GetSize()); as num_of_instructions is an int in this comparison (and the RHS is size_t). llvm-svn: 341931
* Undoing first commit which added a space to a commentShafik Yaghmour2018-09-101-1/+1
| | | | llvm-svn: 341881
* First test commit into svn, adding space to commentShafik Yaghmour2018-09-101-1/+1
| | | | llvm-svn: 341879
* Rollback "Fix raw address breakpoints not resolving".Davide Italiano2018-09-104-45/+23
| | | | | | | It broke a bunch of bots. Ted confirmed, but can't revert for now so I'm reverting on his behalf. llvm-svn: 341878
* Fix raw address breakpoints not resolvingTed Woodward2018-09-104-23/+45
| | | | | | | | | | | | | | Summary: An address breakpoint of the form "b 0x1000" won't resolve if it's created while the process isn't running. This patch deletes Address::SectionWasDeleted, renames Address::SectionWasDeletedPrivate to SectionWasDeleted (and makes it public), and changes the section check in Breakpoint::ModulesChanged back to its original form Reviewers: jingham, #lldb Reviewed By: jingham Subscribers: davide, lldb-commits Differential Revision: https://reviews.llvm.org/D51816 llvm-svn: 341849
* [PDB] Restore AST from PDB symbolsAleksandr Urakov2018-09-1012-184/+863
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds an implementation of retrieving of declarations and declaration contexts based on PDB symbols. PDB has different type symbols for const-qualified types, and this implementation ensures that only one declaration was created for both const and non-const types, but creates different compiler types for them. The implementation also processes the case when there are two symbols corresponding to a variable. It's possible e.g. for class static variables, they has one global symbol and one symbol belonging to a class. PDB has no info about namespaces, so this implementation parses the full symbol name and tries to figure out if the symbol belongs to namespace or not, and then creates nested namespaces if necessary. Reviewers: asmith, zturner, labath Reviewed By: asmith Subscribers: aleksandr.urakov, teemperor, lldb-commits, stella.stamenova Tags: #lldb Differential Revision: https://reviews.llvm.org/D51162 llvm-svn: 341782
* Speculative fix for NetBSD bot for r341758Pavel Labath2018-09-092-8/+8
| | | | llvm-svn: 341759
* Re-commit "Modernize NativeProcessProtocol::GetSoftwareBreakpointTrapOpcode"Pavel Labath2018-09-097-144/+62
| | | | | | | | | | | | | This recommits r341487, which was reverted due to failing tests with clang. It turned out I had incorrectly expected that the literal arrays passed to ArrayRef constructor will have static (permanent) storage. This was only the case with gcc, while clang was constructing them on stack, leading to dangling pointers when the function returns. The fix is to explicitly assign static storage duration to the opcode arrays. llvm-svn: 341758
* Revert "Modernize NativeProcessProtocol::GetSoftwareBreakpointTrapOpcode"Pavel Labath2018-09-087-58/+146
| | | | | | | This reverts commit r341487. Jan Kratochvil reports it breaks LLDB when compiling with clang. llvm-svn: 341747
* Check if a terminal supports colors on Windows properlyDavid Bolvansky2018-09-082-1/+3
| | | | | | | | | | | | | | | | | Summary: Previously we SetUseColor(true) wrongly when output was not a terminal so it broken some (not public) bots. Thanks for issue report, @stella.stamenova Reviewers: stella.stamenova, zturner Reviewed By: stella.stamenova Subscribers: abidh, lldb-commits, stella.stamenova Differential Revision: https://reviews.llvm.org/D51772 llvm-svn: 341746
* [XCodeproj] Remove extra whitespace in SBAPI path.Davide Italiano2018-09-071-1/+1
| | | | llvm-svn: 341732
* [Disassembler] Run ARM-specific tests only if the ARM backend is built.Davide Italiano2018-09-071-11/+13
| | | | | | <rdar://problem/44239070> llvm-svn: 341714
* Add the Disassembler unit test dir.Jason Molenda2018-09-071-0/+1
| | | | llvm-svn: 341696
* NFC: Move Searcher::Depth into lldb-enumerations as SearchDepth.Jim Ingham2018-09-0721-56/+57
| | | | | | | | In a subsequent commit, I will need to expose the search depth to the SB API's, so I'm moving this define into lldb-enumerations where it will get added to the lldb module. llvm-svn: 341690
* [Scalar] Commit the correct patch, forgot `git add`.Davide Italiano2018-09-071-8/+8
| | | | | | <rdar://problem/44229924> llvm-svn: 341685
* Add input files to the "prepare swig bindings" step.Jim Ingham2018-09-071-1/+69
| | | | | | | | This build phase had no inputs, so you always had to manually delete LLDBWrapPython.cpp to get it to rebuild. Add the correct inputs. llvm-svn: 341683
* [Scalar] Fix undefined behaviour when converting double to long.Davide Italiano2018-09-071-2/+7
| | | | | | | | | | | This showed up in an Ubsan build of lldb (inside the CFAbsoluteTime data formatter). As we only care about the bit pattern, we just round to the nearest double, and truncate to a size that fits in ulonglong_t. <rdar://problem/44229924> llvm-svn: 341682
* [ARC] Make char unsigned by defaultAlexander Polyakov2018-09-071-0/+1
| | | | | | | | | | | | | | Summary: This patch specifies 'char' default sign on ARC. Reviewers: tatyana-krasnukha, clayborg Reviewed By: tatyana-krasnukha, clayborg Subscribers: clayborg, lldb-commits Differential Revision: https://reviews.llvm.org/D51594 llvm-svn: 341667
* Enable the fp-armv8 disassembler feature when disassembling Cortex-MJason Molenda2018-09-075-3/+122
| | | | | | | | | | code. This will enable disassembly of the optional subset of neon that some Cortex cores support. Add a unit test to check that a few of these instructions disassemble as expected. <rdar://problem/26674303> llvm-svn: 341623
* Reland [ClangUserExpression][NFC] Removed unused codeRaphael Isemann2018-09-061-3/+1
| | | | | | | | The GetLanguageForExpr has side effects, so we can't remove this call without breaking the completion mechanism. However, we can keep the change that gets rid of this unnecessary variable. llvm-svn: 341535
* Revert "[ClangUserExpression][NFC] Removed unused code"Raphael Isemann2018-09-061-0/+4
| | | | | | | GetLanguageForExpr has side effects, so this actually breaks the completion. Should fix TestExprCompletion. llvm-svn: 341532
* Re-instate a bit of code that was commented out in r188246 whichJason Molenda2018-09-062-10/+18
| | | | | | | | | | | | | | | | | | | | | | | reads an ObjectFileMachO's string table in one chunk. Originally this was commented out because binaries in the system's shared cache all share a mega-string table and so reading the entire mega-strtab for each binary was a performance problem. In the reinstated code, I add a check that the binary we're reading from memory is not in the shared cache (there isn't a constant in <mach-o/loader.h> for this bit yet; we hardcode the value in one other place in ObjectFileMachO alread). For binaries that we're reading out of memory that are NOT in the shared cache, reading the string table in one chunk is a big performance improvement. Also have debugserver send up the flags value for binaries in its response to the jGetLoadedDynamicLibrariesInfos request. NFC. <rdar://problem/33604496> llvm-svn: 341511
* Print column info in backtraces et al. if availableAdrian Prantl2018-09-055-3/+18
| | | | | | | | | | | | This patch allows LLDB to print column info in backtraces et al. if available, which is useful when the backtrace contains a frame like the following: f(can_crash(0), can_crash(1)); Differential Revision: https://reviews.llvm.org/D51661 llvm-svn: 341506
* Set Windows console mode to enable support for ansi escape codesDavid Bolvansky2018-09-051-0/+9
| | | | | | | | | | | | | | | | | | | | Summary: Windows console now supports supports ANSI escape codes, but we need to enable it using SetConsoleMode with ENABLE_VIRTUAL_TERMINAL_PROCESSING flag. https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences. Syntax hightlighting now works fine on Windows: https://i.imgur.com/P0i04A7.png Reviewers: JDevlieghere, teemperor, zturner Reviewed By: zturner Subscribers: abidh, lldb-commits Differential Revision: https://reviews.llvm.org/D51615 llvm-svn: 341497
* Modernize NativeProcessProtocol::GetSoftwareBreakpointTrapOpcodePavel Labath2018-09-057-146/+58
| | | | | | | | | | | | return the opcode as a Expected<ArrayRef> instead of a Status+pointer+size combo. I also move the linux implementation to the base class, as the trap opcodes are likely to be the same for all/most implementations of the class (except the arm one, where linux chooses a different opcode than what the arm spec recommends, which I keep linux-specific). llvm-svn: 341487
* Hold GIL while allocating memory for PythonString.Tatyana Krasnukha2018-09-051-0/+82
| | | | | | | | | | | | | | Summary: Swig wraps C++ code into SWIG_PYTHON_THREAD_BEGIN_ALLOW; ... SWIG_PYTHON_THREAD_END_ALLOW; Thus, LLDB crashes with "Fatal Python error: Python memory allocator called without holding the GIL" when calls an lldb_SB***___str__ function. Reviewers: clayborg Reviewed By: clayborg Differential Revision: https://reviews.llvm.org/D51569 llvm-svn: 341482
* [www] Updated outdated download links [NFC]Raphael Isemann2018-09-051-8/+11
| | | | | | Also added ubuntu and Arch Linux links. llvm-svn: 341471
* Change TestCompletion to only ever look inside of BaseDirFrederic Riss2018-09-041-7/+3
| | | | | | | | | | | | | | | | | | TestCompletion was failing quite frequently on our Linux bots. Some tracing revealed that when we are iterating BaseDir we are not getting all the entries. More specifically, we are sometimes missing the entry corresponding to the TestCompletion directory that the first test in DirCompletionAbsolute is looking for. BaseDir is the directory where lit is creating all the temporary files. The semantics of opendir/readdir are unclear when it comes to iterating over a directory that changes contents, but it seems like on Linux you might fail to list an entry even if it was there before opendir and is still present throughout the iteration. Changing the test to only look inside of the test- specific directory seems to fix the instability. This commit also removes some assertions that were added to try to track down this issue. llvm-svn: 341425
* Terminate debugger if an assert was hitDavid Bolvansky2018-09-041-10/+10
| | | | | | | | | | | | Reviewers: JDevlieghere, teemperor, #lldb Reviewed By: JDevlieghere Subscribers: clayborg, lemo, lldb-commits Differential Revision: https://reviews.llvm.org/D51604 llvm-svn: 341387
* [NFC] Fixed enum constant in boolean context errorDavid Bolvansky2018-09-031-5/+6
| | | | | | | | | | | | | | | | | | | Summary: /home/xbolva00/LLVM/llvm/tools/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp:656:59: warning: enum constant in boolean context [-Wint-in-bool-context] if (mh.magic == llvm::MachO::MH_CIGAM || llvm::MachO::MH_MAGIC) ^~~~~~~~ /home/xbolva00/LLVM/llvm/tools/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp:658:62: warning: enum constant in boolean context [-Wint-in-bool-context] if (mh.magic == llvm::MachO::MH_CIGAM_64 || llvm::MachO::MH_MAGIC_64) Reviewers: JDevlieghere, teemperor Reviewed By: teemperor Subscribers: abidh, lldb-commits Differential Revision: https://reviews.llvm.org/D51600 llvm-svn: 341340
* [NFC] Use llvm_unreachable instead of lldb::assert David Bolvansky2018-09-031-1/+1
| | | | | | | | | | | | | | Summary: Fixes implicit fall through warnings Reviewers: JDevlieghere, teemperor Reviewed By: teemperor Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D51601 llvm-svn: 341339
* [ClangUserExpression][NFC] Removed unused codeDavid Bolvansky2018-09-031-4/+0
| | | | llvm-svn: 341334
* [PseudoTerminal][NFC] Use llvm errno helpersDavid Bolvansky2018-09-031-11/+20
| | | | | | | | | | | | | | | | | | | Summary: LLVM provide (str)errno helpers, so convert code to use it. Also fixes warning: /home/xbolva00/LLVM/llvm/tools/lldb/source/Host/common/PseudoTerminal.cpp:248:25: warning: ignoring return value of ‘char* strerror_r(int, char*, size_t)’, declared with attribute warn_unused_result [-Wunused-result] ::strerror_r(errno, error_str, error_len); Reviewers: JDevlieghere Reviewed By: JDevlieghere Subscribers: abidh, lldb-commits Differential Revision: https://reviews.llvm.org/D51591 llvm-svn: 341320
* [Symtab][NFC] Added llvm_unreachable to supress compiler warningDavid Bolvansky2018-09-031-0/+1
| | | | | | | | | | | | Reviewers: JDevlieghere Reviewed By: JDevlieghere Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D51587 llvm-svn: 341315
* [DWARF] Fix dwarf5-index-is-used.cppAleksandr Urakov2018-09-031-1/+1
| | | | | | | | | | | | | | | | | | | Summary: `dwarf5-index-is-used.cpp` have been failing after rL340206, because `clang` have stopped to emit pubnames by default after that change. Current patch adds `-gpubnames` option to the `clang` command line in the test to emit pubnames. Reviewers: labath, dblaikie Reviewed By: labath Subscribers: clayborg, probinson, teemperor, lldb-commits, aprantl, JDevlieghere, abidh, stella.stamenova Tags: #lldb Differential Revision: https://reviews.llvm.org/D51208 llvm-svn: 341296
* Ignore unicode decode errors in test suite's encoded_file classPavel Labath2018-09-011-1/+1
| | | | | | | | | These happen in a couple of tests when lldb tries to pretty print a const char * variable in the inferior which points to garbage. Instead, we have the python replace the invalid sequences with the unicode replacement character. llvm-svn: 341274
* File completion bugfixFrederic Riss2018-08-312-1/+10
| | | | | | | | | | | If you tried to complete somwthing like ~/., lldb would come up with a lot of non-existent filenames by concatenating every exisitng file in the directory with an initial '.'. This was due to a workaround for an llvm::fs::path::filename behavior that was not applied selectively enough. llvm-svn: 341268
* Avoid using short identifiers in some testsPavel Labath2018-08-313-21/+21
| | | | | | | | | This applies the same workaround as r321271 to other tests. The root problem is that lldb finds an internal symbol with the same name in the debug info of system libraries, and then fails to disambiguate between the two. llvm-svn: 341235
* Fix a comment to use the correct variable name.Frederic Riss2018-08-311-2/+2
| | | | llvm-svn: 341233
* XFail one more VSCode test which fails under heavy loadPavel Labath2018-08-311-0/+1
| | | | llvm-svn: 341186
* Fix a typo in mac SIP workaroundPavel Labath2018-08-311-2/+2
| | | | | | | | presumably the or subexpression was meant to be evaluated first. The way it is now means that we apply the workaround for any python in `/usr`, which matches pretty much every unix system. llvm-svn: 341167
* Increase qHostInfo packet timeoutPavel Labath2018-08-311-0/+3
| | | | | | | | | Host info computation can involve DNS traffic (to compute the remote host name). On very unreliable networks (such as free WiFi on trains), this can take several seconds to complete or timeout. Increase the qHostInfo timeout to account for this. llvm-svn: 341164
* Silence some "control reaches end of non-void function" warnings with gccPavel Labath2018-08-312-0/+3
| | | | llvm-svn: 341163
* Fixed missing sidebars on the websiteRaphael Isemann2018-08-313-0/+0
| | | | | | | We didn't mark these HTML files as executable, which means that the SSI includes for including the sidebar didn't work. llvm-svn: 341157
* Fixed comment for UserExpression::Complete [NFC]Raphael Isemann2018-08-301-2/+2
| | | | llvm-svn: 341126
* Use a CompletionRequest in the expression command completion [NFC]Raphael Isemann2018-08-307-17/+17
| | | | | | | | The patch was originally written before we had a CompletionRequest, so it still used a StringList to pass back the completions to the request. llvm-svn: 341124
* Move NoBuiltin=true closer to the other LangOpts code [NFC]Raphael Isemann2018-08-301-4/+4
| | | | llvm-svn: 341121
* Adjusting some comments in ClangExpressionParser.cppRaphael Isemann2018-08-301-2/+1
| | | | llvm-svn: 341112
* Added missing include to <cctype> for 'std::isalnum'Raphael Isemann2018-08-301-0/+1
| | | | | | Should fix the failing Windows bots. llvm-svn: 341109
* Fixed code style for the CodeCompletion members [NFC]Raphael Isemann2018-08-301-10/+10
| | | | | | | This code is in LLDB, so it should also follow the LLDB code style and use the m_ prefix for members. llvm-svn: 341105
OpenPOWER on IntegriCloud