summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/LanguageRuntime
Commit message (Collapse)AuthorAgeFilesLines
...
* Add a debuginfo version check for RenderScript modulesLuke Drummond2017-01-042-1/+53
| | | | | | | | | | Added an extra field parser to the `RSModuleDescriptor` class enabling us to check whether the versions of LLVM used to generated the debug symbols match across the RenderScript compiler frontend (llvm-rs-cc) and backend (bcc); if they do not, we warn the user that the debugging experience may be suboptimal as LLVM IR debug information has no compatibility guarantees. llvm-svn: 290957
* Fix i386 being able to show member variables correctly by not returning ↵Greg Clayton2016-12-092-7/+3
| | | | | | | | | | empty objective C types from the runtime. We don't parse ObjC v1 types from the runtime metadata like we do for ObjC v2, but doing so by creating empty types was ruining the i386 v1 debugging experience. <rdar://problem/24093343> llvm-svn: 289233
* Fix an unannotated fallthrough that was causing a warning.Greg Clayton2016-12-071-1/+2
| | | | llvm-svn: 289000
* Use Timeout<> in EvaluateExpressionOptions classPavel Labath2016-12-062-5/+5
| | | | llvm-svn: 288797
* [lldb] Fix typos in file headersAlexander Shaposhnikov2016-11-264-4/+4
| | | | | | | | | | | | | This diff fixes typos in file headers (incorrect file names). Test plan: Under llvm/tools/lldb/source: find ./* -type f | grep -e '\(cpp\|h\)$' | while read F; do B=$(basename $F); echo $F head -n 1 $F | grep -v $B | wc -l ; done Differential revision: https://reviews.llvm.org/D27115 llvm-svn: 287966
* [CMake] NFC. Updating CMake dependency specificationsChris Bieneman2016-11-181-4/+8
| | | | | | This patch updates a bunch of places where add_dependencies was being explicitly called to add dependencies on intrinsics_gen to instead use the DEPENDS named parameter. This cleanup is needed for a patch I'm working on to add a dependency debugging mode to the build system. llvm-svn: 287408
* Don't allow direct access to StreamString's internal buffer.Zachary Turner2016-11-162-2/+2
| | | | | | | | | | | | | | | This is a large API change that removes the two functions from StreamString that return a std::string& and a const std::string&, and instead provide one function which returns a StringRef. Direct access to the underlying buffer violates the concept of a "stream" which is intended to provide forward only access, and makes porting to llvm::raw_ostream more difficult in the future. Differential Revision: https://reviews.llvm.org/D26698 llvm-svn: 287152
* Make Options::SetOptionValue take a StringRef.Zachary Turner2016-11-122-17/+17
| | | | llvm-svn: 286723
* [RenderScript] Fix reduction argument printingLuke Drummond2016-11-091-0/+4
| | | | | | | | | | | | | | | | When placing function name breakpoints on RenderScript Reduction kernel functions, we were not skipping over the function prologue meaning that inspection of the arguments could be garbled as the function was not finished setting up the stack/registers. In [122fe8f](https://github.com/llvm-mirror/lldb/commit/122fe8f47255ec850155495d10526fccc51f95fb) Aidan added the `SkipPrologue` function that allows us to trivially fix up the kernel's functions' resolved addresses, falling gracefully back to the old behaviour if we don't know how to handle the prologue or can't resolve its size. llvm-svn: 286387
* [Renderscript] Add commands for scriptgroup interaction.Aidan Dodds2016-11-035-4/+610
| | | | | | | | | This commit hooks the nofity function that signals script group compilation. By tracking scriptgroups compiled at runtine, users are able to place breakpoints by script group name. Breakpoints will be placed on the kernels forming the group. llvm-svn: 285902
* Remove a couple of old TODOs and don't make a new ConstString each time; ↵Enrico Granata2016-10-311-12/+15
| | | | | | none of this is super-critical since it applies to older versions of macOS (or OSX, I guess?) but still.. llvm-svn: 285599
* Convert some Args index-based iteration to range-style iteration.Zachary Turner2016-10-051-26/+24
| | | | | | | | | | | | | | This is better for a number of reasons. Mostly style, but also: 1) Signed-unsigned comparison warnings disappear since there is no loop index. 2) Iterating with the range-for style gives you back an entry that has more than just a const char*, so it's more efficient and more useful. 3) Makes code safter since the type system enforces that it's impossible to index out of bounds. llvm-svn: 283413
* Add the ability to set breakpoints on named RenderScript reductionsLuke Drummond2016-10-052-40/+404
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Add new `lldb_private::lldb_renderscript::RSReduceBreakpointResolver` class that can set breakpoints on kernels that are constituent functions of named reduction groups. Also support debugging of subsets of the the reduction group with the `-t, --function-role` flag which takes a comma-separated list of reduction function types outconverter,combiner,initializer,accumulator (defaults to all) - Add 2 new helper methods to `RenderScriptRuntime`, 1. `CreateReductionBreakpoint(name, types)`: instantiates a new RSReduceBreakpointResolver and inserts that resolver into the running process. 2. `PlaceBreakpointOnReduction`: which is a public helper function. - hook up the above functionality to the command-line with new `CommandObject*` classes that handle parsing of function roles and dispatch to the runtime. These are namespaced under the snappy `language renderscript reduction breakpoint ...` subcommand - [incidental] Factor multiple common uses of `FindFirstSymbolWithNameAndType(ConstString(".rs.info")` into static `IsRenderScriptScriptModule(ModuleSP module)` function, and replace original uses. llvm-svn: 283362
* [RenderScript] reflow/reword some comments and normalize namesLuke Drummond2016-10-054-567/+508
| | | | | | | | | | | | Pay more attention to comment alignement (Since _The Great Reformat_ (a015ff50) comments are no longer properly aligned) and variable naming conventions. - Manually reflow and cleanup comments and array literals - Be more economical with our naming conventions - Be internally consistent with regard to local variable/member function naming llvm-svn: 283335
* cleanup RSCoordinate handling and factor out coordinate parserLuke Drummond2016-10-052-128/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - This change updates the signature of `RenderScriptRuntime::PlaceBreakpointOnKernel` to take a default RSCoordinate pointer of nullptr. We use this as the predicate value for the breakpoint coordinate rather than trying to fit a sentinel `-1` into a signed version. ``` - void - PlaceBreakpointOnKernel(Stream &strm, const char *name, const std::array<int, 3> coords, Error &error, - lldb::TargetSP target); ``` ``` + bool + PlaceBreakpointOnKernel(lldb::TargetSP target, Stream &messages, const char *name, + const lldb_renderscript::RSCoordinate *coords = nullptr); ``` The above change makes the API for setting breakpoints on kernels cleaner as it returns a failure value rather than modify a sentinel in the caller. The optional arguments are now last and have a default (falsey) value. - RSCoordinate objects are now comparable with operator== and have zero initializers which should make them easier to work on. - Added a `FMT_COORD` macro for use in logging format strings which should make format strings a little less verbose. llvm-svn: 283320
* [CMake] Fixing a few missing dependencies on intrinsics_genChris Bieneman2016-10-031-0/+4
| | | | | | These are missing dependencies that have been exposed in builds as a result of my change to make lldb libraries depend on CLANG_TABLEGEN_TARGETS instead of libclang. llvm-svn: 283081
* To fix TestObjCMethods2/i386, allowed messaging nil ObjC objects as in x86_64.Sean Callanan2016-09-291-0/+3
| | | | llvm-svn: 282741
* Try to fix build errors on Android.Zachary Turner2016-09-222-4/+4
| | | | | | | It doesn't like the implicit conversion from T[] to ArrayRef<T> so I'm using `llvm::makeArrayRef()`. Hopefully I got everything. llvm-svn: 282195
* Convert option tables to ArrayRefs.Zachary Turner2016-09-222-39/+35
| | | | | | | | | | | | | | | | | | | | | | | | | This change is very mechanical. All it does is change the signature of `Options::GetDefinitions()` and `OptionGroup:: GetDefinitions()` to return an `ArrayRef<OptionDefinition>` instead of a `const OptionDefinition *`. In the case of the former, it deletes the sentinel entry from every table, and in the case of the latter, it removes the `GetNumDefinitions()` method from the interface. These are no longer necessary as `ArrayRef` carries its own length. In the former case, iteration was done by using a sentinel entry, so there was no knowledge of length. Because of this the individual option tables were allowed to be defined below the corresponding class (after all, only a pointer was needed). Now, however, the length must be known at compile time to construct the `ArrayRef`, and as a result it is necessary to move every option table before its corresponding class. This results in this CL looking very big, but in terms of substance there is not much here. Differential revision: https://reviews.llvm.org/D24834 llvm-svn: 282188
* Make lldb::Regex use StringRef.Zachary Turner2016-09-212-11/+15
| | | | | | | | | | 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
* [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
* Fix an issue where LLDB was not masking enough bits off of objc classes ↵Enrico Granata2016-09-131-1/+14
| | | | | | | | data() pointers, effectively rendering us unable to generate descriptors for some classes Fixes rdar://27758358 llvm-svn: 281282
* Fixing a build breakage caused from a change in LLVM rL281019Dimitar Vlahovski2016-09-091-3/+1
| | | | | | | | | | | | | | Summary: LLVM guys did some clean-up of the Attribute getters/setters and because of that the build was failing. Reviewers: ldrumm Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D24382 llvm-svn: 281030
* Fix -Wcovered-switch-default warning in AppleObjCRuntimeV2.cppEd Maste2016-09-081-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: 280933
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-0628-12116/+11218
| | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
* Remove unused variables.Zachary Turner2016-08-311-2/+1
| | | | | | Patch by Taras Tsugrii llvm-svn: 280283
* Add logic to the ObjC runtime in LLDB to extract the pointer values of the ↵Enrico Granata2016-08-204-1/+63
| | | | | | | | two singleton (pairtons?) instances of __NSCFBoolean that represent true and false This is useful because that knowledge will in turn allow no-code-running formatting of boolean NSNumbers; but that's a commit that will have to wait Monday.. llvm-svn: 279353
* Decoupled Options from CommandInterpreter.Todd Fiala2016-08-112-17/+21
| | | | | | | | | | | | | | | | Options used to store a reference to the CommandInterpreter instance in the base Options class. This made it impossible to parse options independent of a CommandInterpreter. This change removes the reference from the base class. Instead, it modifies the options-parsing-related methods to take an ExecutionContext pointer, which the options may inspect if they need to do so. Closes https://reviews.llvm.org/D23416 Reviewers: clayborg, jingham llvm-svn: 278440
* Delete Host/windows/win32.hZachary Turner2016-08-091-1/+1
| | | | | | | | | | | | | | | | | | | It's always hard to remember when to include this file, and when you do include it it's hard to remember what preprocessor check it needs to be behind, and then you further have to remember whether it's windows.h or win32.h which you need to include. This patch changes the name to PosixApi.h, which is more appropriately named, and makes it independent of any preprocessor setting. There's still the issue of people not knowing when to include this, because there's not a well-defined set of things it exposes other than "whatever is missing on Windows", but at least this should make it less painful to fix when problems arise. This patch depends on LLVM revision r278170. llvm-svn: 278177
* The lack of classes in the hash table is not an error - it's very ↵Enrico Granata2016-08-061-1/+1
| | | | | | legitimately possible for a process to define no ObjC classes of its own. Discovered by debugging /bin/ls llvm-svn: 277897
* Tweaks to the reporting of "missing dyld shared cached" that make it easier ↵Enrico Granata2016-08-052-23/+69
| | | | | | to grab logs when such issues occur, make the logs more helpful, and also tweaks to the user messaging to make it easier to pinpoint an investigation avenue early on llvm-svn: 277844
* [RenderScript] Always create a new allocation ID in CaptureAllocationInit hookLuke Drummond2016-08-032-12/+39
| | | | | | | | | | | | | | | | Due to internal reuse of buffers in the RenderScript runtime by the system allocator, comparing pointers is not a safe way to check whether an allocation is tracked by lldb. This change updates the lldb RenderScript internal hook callback to properly identify and remove old allocations that had have an address that is currently being tracked. This change also removes the need for `lldb_private::renderscript::LookupAllocation` to take a `create` flag, as this is now always the case. Original Author: <dean@codeplay.com> Subscribers: lldb-commits llvm-svn: 277613
* Fix an unused variable warning in release builds.Luke Drummond2016-08-031-1/+1
| | | | | | | | | | | | ``num_params`` was unused in RenderScript ABI fixup pass ``cloneToStructRetFnTy`` and was only used in an `assert()` that the number of function parameters for the cloned function was correct. Now we actually use this variable, rather than recomputing it, and avoid the unused variable warning when building without asserts enabled. Subscribers: lldb-commits llvm-svn: 277608
* Add IR fixups for RenderScript ABI mismatch between ARMV7 frontend and x86 ↵Luke Drummond2016-07-287-3/+588
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | backend Expression evaluation for function calls to certain public RenderScript API functions in libRSCPURef can segfault. `slang`, the compiler frontend for RenderScript embeds an ARM specific triple in IR that is shipped in the app, after generating IR that has some assumptions that an ARM device is the target. As the IR is then compiled on a device of unknown (at time the IR was generated at least) architecture, when calling RenderScript API function as part of debugger expressions, we have to perform a fixup pass that removes those assumptions right before the module is sent to be generated by the llvm backend. This issue is caused by multiple problems with the ARMv7-specific assumptions encoded in the LLVM IR. x86 large value returns use a hidden first argument (mapping to llvm::Attribute::StructRet), which can't be picked up by the JIT due to the mismatch between IR generated by the slang frontend and llvm backend. This means that code generated by bcc did not necessarily match the default SysV Linux/Android ABI used by the LLDB JIT - Original Authors: Luke Drummond (@ldrumm), Function declarations fixed by Aidan Dodds (@ADodds) Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D18059 llvm-svn: 276976
* Fix an issue where LLDB would detect an empty shared cache - which is ↵Enrico Granata2016-07-212-25/+43
| | | | | | | | | | legitimate albeit suboptimal - and warn about being unable to fetch ObjC class information, even though class data was actually properly loaded from the dynamic hashmap Only ever warn about missing ObjC runtime class data if one either can't run the expressions to obtain such data, or the total count of classes is below a threshold that makes things sound really suspicious Fixes rdar://27438500 llvm-svn: 276220
* Typo corrections identified by codespellEd Maste2016-07-191-5/+5
| | | | | | | | | Submitted by giffunip@yahoo.com; I fixed a couple of nearby errors and incorrect changes in the patch. llvm.org/pr27634 llvm-svn: 275983
* LLDB help content has accumulated over time without a recent attempt toKate Stone2016-07-143-27/+19
| | | | | | | | | review it for consistency, accuracy, and clarity. These changes attempt to address all of the above while keeping the text relatively terse. <rdar://problem/24868841> llvm-svn: 275485
* Fix a check in the objc trampoline handlerStephane Sezer2016-07-131-1/+1
| | | | | | | | | | | | | | | | Summary: The function FunctionCaller::WriteFunctionArguments returns false on errors, so they should check for the false return value. Change by Walter Erquinigo <a20012251@gmail.com> Reviewers: jingham, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D22278 llvm-svn: 275287
* Don't cache the stret/vrs. non-stret code pointer as static data in the runtime.Jim Ingham2016-05-262-6/+6
| | | | | | | | | It belongs in the instance, since then when you change architectures it can be adjusted appropriately. <rdar://problem/26308079> llvm-svn: 270938
* Add a missing include to ItaniumABILanguageRuntime.hPavel Labath2016-05-241-0/+1
| | | | | | | some (I'm not sure why only some, actually) implementations of std::map require the value type to be a fully specified type when declaring then. This make sure TypeAndOrName is. llvm-svn: 270570
* We have many radars showing that stepping through C++ code can result in ↵Greg Clayton2016-05-232-136/+173
| | | | | | | | | | | | slow steps. One of the things slowing us down is that ItaniumABILanguageRuntime class doesn't cache vtable to types in a map. This causes us, on every step, for every variable, to read the first pointer in a C++ type that could be dynamic and lookup the symbol, possibly in every symbol file (some symbols files on Darwin can end up having thousands of .o files when using DWARF in .o files, so thousands of .o files are searched each time). This fix caches lldb_private::Address (the resolved vtable symbol address in section + offset format) to TypeAndOrName instances inside the one ItaniumABILanguageRuntime in a process. This allows caching of dynamic types and stops us from always doing deep searches in each file. <rdar://problem/18890778> llvm-svn: 270488
* second pass over removal of Mutex and ConditionSaleem Abdulrasool2016-05-193-5/+5
| | | | llvm-svn: 270024
* remove use of Mutex in favour of std::{,recursive_}mutexSaleem Abdulrasool2016-05-186-38/+38
| | | | | | | | | | This is a pretty straightforward first pass over removing a number of uses of Mutex in favor of std::mutex or std::recursive_mutex. The problem is that there are interfaces which take Mutex::Locker & to lock internal locks. This patch cleans up most of the easy cases. The only non-trivial change is in CommandObjectTarget.cpp where a Mutex::Locker was split into two. llvm-svn: 269877
* Add a check for version 15 of the shared cache formatEnrico Granata2016-05-121-1/+1
| | | | | | <rdar://problem/26207478> llvm-svn: 269378
* Revert r268591Enrico Granata2016-05-0514-59/+26
| | | | | | | | | | | | | | "Allow LanguageRuntimes to return an error if they fail in the course of dynamic type discovery This is not meant to report that a value doesn't have a dynamic type - it is only meant as a mechanism to propagate actual type discovery issues (e.g. malformed type metadata for languages that have such a notion) This information is used by ValueObjectDynamic to set its own m_error, which is a fairly sharp and heavyweight tool to begin with For the time being, this is an architectural improvement but a practical no-op as no existing runtimes are actually setting errors" I need to think about what I want to do in this space more carefully - this attempt might be too heavy of a hammer for the nail I am trying to fix, and I don't want to leave it in while I ponder llvm-svn: 268686
* Allow LanguageRuntimes to return an error if they fail in the course of ↵Enrico Granata2016-05-0514-26/+59
| | | | | | | | | | | | dynamic type discovery This is not meant to report that a value doesn't have a dynamic type - it is only meant as a mechanism to propagate actual type discovery issues (e.g. malformed type metadata for languages that have such a notion) This information is used by ValueObjectDynamic to set its own m_error, which is a fairly sharp and heavyweight tool to begin with For the time being, this is an architectural improvement but a practical no-op as no existing runtimes are actually setting errors llvm-svn: 268591
* Make the functions that fetch data from the ObjC runtime choose whether or ↵Enrico Granata2016-05-051-15/+13
| | | | | | | | not to log depending on whether the types log is enabled This can prove helpful in debugging issues with that retrieval even if LLDB wasn't compiled with the magic macros defined llvm-svn: 268587
* Add more debug logging to g_get_shared_cache_class_info_bodyEnrico Granata2016-05-021-1/+14
| | | | llvm-svn: 268303
* Rename out->std_out in AppleObjCRuntimeV2.cpp.Oleksiy Vyalov2016-04-151-17/+17
| | | | llvm-svn: 266401
* Fix Android build after r266267Oleksiy Vyalov2016-04-141-17/+17
| | | | llvm-svn: 266274
OpenPOWER on IntegriCloud