summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix TestBreakpointSerialization on windowsPavel Labath2016-09-223-1/+34
| | | | | | | | | The test exposed a bug in the StructuredData Serialization code, which did not escape the backslash properly. This manifested itself as windows breakpoint serialization roundtrip test not succeeding (as windows paths included backslashes). llvm-svn: 282167
* Fix parsing expressions to evaluate with spaces and optional args (MI)Ilia K2016-09-222-15/+16
| | | | | | | | | | | | | | | | | | | | | Summary: When extracting options for long options (starting with `--`), the use of `MIUtilString::SplitConsiderQuotes` to split all the arguments was being conditioned on the option type to be expected. This was wrong as this caused other options to be parsed incorrectly since it was not taking into account the presence of quotes. Patch by Ed Munoz <edmunoz@microsoft.com> Reviewers: edmunoz, ki.stfu Subscribers: ki.stfu, lldb-commits Projects: #lldb Differential Revision: https://reviews.llvm.org/D24202 llvm-svn: 282135
* fix Args function broken in r281942Todd Fiala2016-09-221-1/+1
| | | | | | | | The method was hard-coded to check only the 0th element of the array. This manifested as NSLog messages behaving incorrectly on macOS. (This is independent of the broken DarwinLog feature). llvm-svn: 282128
* Fix typo in lldb --helpEd Maste2016-09-211-1/+1
| | | | | | | | Patch by Yacine Belkadi Differential Revision: https://reviews.llvm.org/D12158 llvm-svn: 282123
* Fix for loop sign fix in r282112 for column = 0Ed Maste2016-09-211-1/+1
| | | | llvm-svn: 282119
* Fix an incorrect nullptr conversion.Zachary Turner2016-09-211-1/+1
| | | | llvm-svn: 282117
* Fix integer sign warning from r282105Ed Maste2016-09-211-1/+1
| | | | llvm-svn: 282112
* Fix -Wcovered-switch-default warning in StackFrame.cppEd Maste2016-09-211-2/+0
| | | | | | | | The switch coveres all possible values. If a new one is added in the future the compiler will start warning, providing a notification that the switch needs updating. llvm-svn: 282111
* [CMake] Initial support for LLDB.frameworkChris Bieneman2016-09-2111-40/+103
| | | | | | | | | | | | | | | | | | | Summary: This patch adds a CMake option LLDB_BUILD_FRAMEWORK, which builds libLLDB as a macOS framework instead of as a *nix shared library. With this patch any LLDB executable that has the INCLUDE_IN_FRAMEWORK option set will be built into the Framework's resources directory, and a symlink to the exeuctable will be placed under the build directory's bin folder. Creating the symlinks allows users to run commands from the build directory without altering the workflow. The framework generated by this patch passes the LLDB test suite, but has not been tested beyond that. It is not expected to be fully ready to ship, but it is a first step. With this patch binaries that are placed inside the framework aren't being properly installed. Fixing that would increase the patch size significantly, so I'd like to do that in a follow-up. Reviewers: zturner, tfiala Subscribers: beanz, lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D24749 llvm-svn: 282110
* add stop column highlighting supportTodd Fiala2016-09-2116-51/+341
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces optional marking of the column within a source line where a thread is stopped. This marking will show up when the source code for a thread stop is displayed, when the debug info knows the column information, and if the optional column marking is enabled. There are two separate methods for handling the marking of the stop column: * via ANSI terminal codes, which are added inline to the source line display. The default ANSI mark-up is to underline the column. * via a pure text-based caret that is added in the appropriate column in a newly-inserted blank line underneath the source line in question. There are some new options that control how this all works. * settings set stop-show-column This takes one of 4 values: * ansi-or-caret: use the ANSI terminal code mechanism if LLDB is running with color enabled; if not, use the caret-based, pure text method (see the "caret" mode below). * ansi: only use the ANSI terminal code mechanism to highlight the stop line. If LLDB is running with color disabled, no stop column marking will occur. * caret: only use the pure text caret method, which introduces a newly-inserted line underneath the current line, where the only character in the new line is a caret that highlights the stop column in question. * none: no stop column marking will be attempted. * settings set stop-show-column-ansi-prefix This is a text format that indicates the ANSI formatting code to insert into the stream immediately preceding the column where the stop column character will be marked up. It defaults to ${ansi.underline}; however, it can contain any valid LLDB format codes, e.g. ${ansi.fg.red}${ansi.bold}${ansi.underline} * settings set stop-show-column-ansi-suffix This is the text format that specifies the ANSI terminal codes to end the markup that was started with the prefix described above. It defaults to: ${ansi.normal}. This should be sufficient for the common cases. Significant leg-work was done by Adrian Prantl. (Thanks, Adrian!) differential review: https://reviews.llvm.org/D20835 reviewers: clayborg, jingham llvm-svn: 282105
* Probably should add the breakpoint names test directory as well...Jim Ingham2016-09-213-0/+200
| | | | llvm-svn: 282103
* Fix failing regex tests.Zachary Turner2016-09-211-1/+1
| | | | | | | | | | | r282079 converted the regular expression interface to accept and return StringRefs instead of char pointers. In one case a null pointer check was converted to an empty string check, but this was an incorrect conversion because an empty string is a valid regular expression. Removing this check should fix the test failures. llvm-svn: 282090
* Fix an inefficient StringRef conversion.Zachary Turner2016-09-211-3/+1
| | | | | | | Since the original object was already an llvm::SmallString<> there's no point calling c_str() first. llvm-svn: 282080
* Make lldb::Regex use StringRef.Zachary Turner2016-09-2149-192/+230
| | | | | | | | | | This updates getters and setters to use StringRef instead of const char *. I tested the build on Linux, Windows, and OSX and saw no build or test failures. I cannot test any BSD or Android variants, however I expect the required changes to be minimal or non-existant. llvm-svn: 282079
* Refactor NativeRegisterContextLinux_x86_64 code.Valentina Giusti2016-09-212-114/+41
| | | | | | | | | | | | This patch refactors the way the XState type is checked and, in order to simplify the code, it removes the usage of the 'cpuid' instruction: just checking if the ptrace calls done throuhg ReadFPR is enough to verify both if there is HW support and if there is kernel support. Also the XCR0 bits are enough to check if there is both HW and kernel support for AVX and MPX. Differential Revision: https://reviews.llvm.org/D24764 llvm-svn: 282072
* Remove an invalid doxygen `@return` docstring on a void functionLuke Drummond2016-09-211-3/+0
| | | | | | | `ClangASTSource::FindExternalVisibleDecls` has void return type, so the previous docstring was misleading. llvm-svn: 282066
* Adds tests for breakpoint names, and a FindBreakpointsByName.Jim Ingham2016-09-216-4/+66
| | | | | | | | Also if you set a breakpoint with an invalid name, we'll refuse to set the breakpoint rather than silently ignoring the name. llvm-svn: 282043
* Fix Clang initialization and Clang-tidy modernize-use-nullptr warnings in ↵Eugene Zelenko2016-09-213-94/+97
| | | | | | | | source/Plugins/Process/Utility. Differential revision: https://reviews.llvm.org/D24694 llvm-svn: 282041
* Add some more tests for breakpoint serialization.Jim Ingham2016-09-2014-64/+270
| | | | | | | | | | Serialize breakpoint names & the hardware_requested attributes. Also added a few missing affordances to SBBreakpoint whose absence writing the tests pointed out. <rdar://problem/12611863> llvm-svn: 282036
* Unbreak the NetBSD build after recent changesKamil Rytarowski2016-09-201-1/+1
| | | | | | | | Similar to r281922 "Try to fix freebsd and android builds." Replace .AppendArgument(cstr) with .AppendArgument(llvm::StringRef(cstr)) llvm-svn: 282032
* Enable clang attributes when using clang-cl.Zachary Turner2016-09-201-1/+1
| | | | llvm-svn: 282029
* [PECOFF] Use the COFF subsystem field when determining the Triple.Zachary Turner2016-09-202-1/+20
| | | | | | | Patch by walter erquinigo Differential revision: https://reviews.llvm.org/D24284 llvm-svn: 282013
* Make it so that one can register prefix matches as well as identical matches ↵Enrico Granata2016-09-202-14/+78
| | | | | | as extra cases for NSDictionary data formatting llvm-svn: 281993
* Fixed the build by changing a couple of const char *s to StringRefs.Sean Callanan2016-09-193-7/+10
| | | | llvm-svn: 281943
* Convert 3 more functions to use a StringRef.Zachary Turner2016-09-197-92/+65
| | | | | | | | This converts Args::Unshift, Args::AddOrReplaceEnvironmentVariable, and Args::ContainsEnvironmentVariable to use StringRefs. The code is also simplified somewhat as a result. llvm-svn: 281942
* Fix compilation of unit tests.Zachary Turner2016-09-191-33/+33
| | | | llvm-svn: 281926
* Try to fix freebsd and android builds.Zachary Turner2016-09-192-2/+2
| | | | llvm-svn: 281922
* Fix more functions in Args to use StringRef.Zachary Turner2016-09-1934-151/+194
| | | | | | | | | | | | | | | This patch also marks the const char* versions as =delete to prevent their use. This has the potential to cause build breakages on some platforms which I can't compile. I have tested on Windows, Linux, and OSX. Best practices for fixing broken callsites are outlined in Args.h in a comment above the deleted function declarations. Eventually we can remove these =delete declarations, but for now they are important to make sure that all implicit conversions from const char * are manually audited to make sure that they do not invoke a conversion from nullptr. llvm-svn: 281919
* Xcode: support gtests that use the Inputs dirTodd Fiala2016-09-192-79/+125
| | | | | | | | | | | | | | | | This change adds support for the gtests that require input data in the Inputs files. This is done through a new Xcode script phase that runs the scripts/Xcode/prepare-gtest-run-dir.sh script. That script simply copies the contents of all unittests/**/Inputs dirs into ${TARGET_BUILD_DIR}/Inputs before running the test. This change also renames the Xcode 'gtest-for-debugging' to 'gtest-build', and makes the gtest "build and run" target depend on gtest-build. This reduces replication within the targets. gtest .c/.cpp files now should only be added to the gtest-build target. llvm-svn: 281913
* Fix boolean logic error in BreakpointID.Zachary Turner2016-09-171-1/+1
| | | | llvm-svn: 281804
* Convert many functions to use StringRefs.Zachary Turner2016-09-1725-99/+207
| | | | | | | | | | | | | Where possible, remove the const char* version. To keep the risk and impact here minimal, I've only done the simplest functions. In the process, I found a few opportunities for adding some unit tests, so I added those as well. Tested on Windows, Linux, and OSX. llvm-svn: 281799
* Fix compiler warnings where two values weren't being initialized.Greg Clayton2016-09-161-2/+2
| | | | llvm-svn: 281770
* Set the correct triple when creating an ArchSpec for Windows.Zachary Turner2016-09-161-0/+3
| | | | | | | Patch by Walter Erquinigo Differential Revision: https://reviews.llvm.org/D24283 llvm-svn: 281765
* Add unit tests for a few string conversion functions in Args.Zachary Turner2016-09-1610-48/+133
| | | | | | | Also provided a StringRef overload for these functions and have the const char* overloads delegate to the StringRef overload. llvm-svn: 281764
* [RenderScript] Support tracking and dumping reduction kernelsLuke Drummond2016-09-162-59/+264
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initial implementation of support for tracking [RenderScript Reductions](https://developer.android.com/guide/topics/renderscript/compute.html#reduction-in-depth) With this patch, `language renderscript module dump` properly lists reductions that are part of loaded RenderScript modules as well the the consituent functions and their roles, within the reduction. This support required new tracking mechanisms for the `#pragma(reduce)` mechanism, and extension of `RSModuleDescriptor::ParseRSInfo` to support the metadata output by `bcc`. This work was also an opportunity to refactor/improve parse code: - `RSModuleDescriptor::ParseExportReduceCount` now has a complete implementation and the debugger can correctly track reductions on receipt of a module hook. - `RSModuleDescriptor::Dump` now dumps Reductions as well as `ForEach` kernels. Also, fixed indentation of the output, and made indentation groupings in the source clearer. - `RSModuleDescriptor::ParseRSInfo` now returns true if the `".rs.info"` packet has nonzero linecount, rather than rejecting RenderScripts that don't contain kernels (an unlikely situation, but possibly valid). This was changed because scripts that only contained reductions were not being tracked in `RenderScriptRuntime::LoadModule`. - Refactor `RSModuleInfo::ParseRSInfo` and add reduction spec parser stub - Prepared ParseRSInfo to more easily be able to add new parser types - Use llvm::StringRef and llvm::StringMap helpers to make the parsing code cleaner - factor out forEachCount, globalVarCount, and pragmaCount parsing block to their own methods - Add ExportReduceCount Parser - Use `llvm::StringRef` in `RSKernelDescriptor` constructor - removed now superfluous `MAXLINE` macros as we've switched from `const char *` to `llvm::StringRef` llvm-svn: 281717
* add availability check to DarwinLog event testsTodd Fiala2016-09-161-0/+13
| | | | | | | | | | The pexpect-based tests properly checked for the stub reporting DarwinLog support. The event-based ones did not. This is fixed here. Swift CI bots are not currently building debugserver on macOS, so they don't have the DarwinLog support even when they pass the macOS 10.12 check. llvm-svn: 281696
* First tests for serializing breakpoints.Jim Ingham2016-09-168-36/+276
| | | | | | Plus a few bug fixes I found along the way. llvm-svn: 281690
* Allow ArchSpec to take a StringRef.Zachary Turner2016-09-153-108/+152
| | | | llvm-svn: 281662
* [cmake] Don't depend on lldb-server unless it's built.Zachary Turner2016-09-151-1/+6
| | | | llvm-svn: 281661
* Fixing bot failuresChris Bieneman2016-09-151-1/+3
| | | | | | Need to only add debugserver as a test dependency on Darwin. llvm-svn: 281652
* [LIT] First pass of LLDB LIT supportChris Bieneman2016-09-1512-2/+255
| | | | | | | | | | | | | | | | | | | | | Summary: This patch supplies basic infrastructure for LLDB to use LIT, and ports a few basic test cases from the LLDB test suite into LIT. With this patch the LLDB lit system is not capable or intended to fully replace the existing LLDB test suite, but this first patch enables people to write lit tests for LLDB. The lit substitution for %cc and %cxx default to the host compiler unless the CMake option LLDB_TEST_CLANG is On, in which case the in-tree clang will be used. The target check-lldb-lit will run all lit tests including the lit-based executor for the unit tests. Alternatively there is a target generated for each subdirectory under the lit directory, so check-lldb-unit and check-lldb-expr will run just the tests under their respective directories. The ported tests are not removed from the existing suite, and should not be until such a time when the lit runner is mature and in use by bots and workflows. Reviewers: zturner, labath, jingham, tfiala Subscribers: beanz, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D24591 llvm-svn: 281651
* Convert ArchSpec::ParseMachOCPUDashSubtypeTriple to use StringRef.Zachary Turner2016-09-153-48/+37
| | | | | | | | | | | | | This makes the code easier to grok, and since this is a very low level function it also is very helpful to have this take a StringRef since it means anyone higher up the chain who has a StringRef would have to first convert it to a null-terminated string. This way it can work equally well with StringRefs or const char*'s, which will enable the conversion of higher up functions to StringRef. Tested on Windows, Linux, and OSX and saw no regressions. llvm-svn: 281642
* added LLDB_PYTHON_TESTSUITE_ARCH Xcode variableTodd Fiala2016-09-151-2/+6
| | | | | | | | | | | This Xcode build variable defaults to x86_64. It can be set to i386 to cause the lldb-python-test-suite target run the tests in the specified architecture. This flag is being added for the zorg build script so that Green Dragon can run the test suite against both x86_64 and i386 macOS targets. llvm-svn: 281639
* Reformat x86_64 register infos defines tableDimitar Vlahovski2016-09-151-72/+41
| | | | | | | Fix the table format of the register defines after clang-format. Added guards to prevent future reformatting again from clang-format. llvm-svn: 281606
* Fix TestSymbolContextTwoFiles on Android after rL281595Tamas Berghammer2016-09-151-1/+1
| | | | llvm-svn: 281601
* Add support for DW_AT_ranges_base attributeTamas Berghammer2016-09-1510-33/+95
| | | | | | | | | | | | | It is a new attribute emitted by clang as a GNU extension and will be part of Dwarf5. The purpose of the attribute is to specify a compile unit level base value for all DW_AT_ranges to reduce the number of relocations have to be done by the linker. Fixes (at least partially): https://llvm.org/pr28826 Differential revision: https://reviews.llvm.org/D24514 llvm-svn: 281595
* Try to fix windows build after rL281569Tamas Berghammer2016-09-152-2/+2
| | | | llvm-svn: 281594
* Make the keys enumerations for options and resolvers enum classes.Jim Ingham2016-09-154-13/+16
| | | | | | | This keeps them from conflicting with other symbols names, so it's worth their being less convenient to use for indexing. llvm-svn: 281569
* More cleanup in `frame diagnose,` eliminating a bunch of messy cases.Sean Callanan2016-09-143-60/+33
| | | | llvm-svn: 281545
* Replaced two instances of std::function with auto.Sean Callanan2016-09-142-8/+6
| | | | | | | | Thanks to Zachary Turner for the suggestion. It's distasteful that the actual type of the lambda can't be spelled out, but it should be evident from the definition of the lambda body. llvm-svn: 281536
OpenPOWER on IntegriCloud