summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/LanguageRuntime
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't use auto - (try to) appease the Android g++ botEnrico Granata2016-04-141-1/+1
| | | | llvm-svn: 266271
* Augment the 'language objc class-table dump' command to take a "-v" option, ↵Enrico Granata2016-04-142-8/+159
| | | | | | which makes it print ivar and method information, as well as an optional regex argument which filters out all class names that don't match the regex llvm-svn: 266267
* Add support for resolving dynamic types of extended ObjC tagged pointersEnrico Granata2016-04-112-0/+188
| | | | | | rdar://problem/24401051 llvm-svn: 266001
* Move some functions from DWARFASTParserClang to ClangASTImporter.Zachary Turner2016-03-282-21/+20
| | | | | | | | | | | | | | | | | | This allows these functions to be re-used by a forthcoming PDBASTParser. The functions in question are CanCompleteType, CompleteType, and CanImport. Conceptually, these functions belong on ClangASTImporter anyway, and previously they were just ping ponging around through a few levels of indirection to end up there as well, so this patch actually makes the code somewhat simpler. A few methods were moved to a new file called ClangUtil, so that they can be shared between ClangASTImporter and ClangASTContext without creating a circular dependency between those two cpp files. Differential Revision: http://reviews.llvm.org/D18381 llvm-svn: 264685
* Add a 'language cplusplus demangle' command. This can be useful to provide a ↵Enrico Granata2016-03-251-1/+89
| | | | | | low-friction reproduction for issues with the LLDB demangling of C++ symbols llvm-svn: 264474
* Get rid of two global constructors by making things static variables in the ↵Greg Clayton2016-03-242-9/+8
| | | | | | only function that uses these variables. llvm-svn: 264347
* Compilation can end up calling functions (e.g. to resolve indirect ↵Jim Ingham2016-03-212-1/+6
| | | | | | | | | | functions) so I added a way for compilation to take a "thread to use for compilation". If it isn't set then the compilation will use the currently selected thread. This should help keep function execution to the one thread intended. llvm-svn: 263972
* Add a DiagnosticManager replace error streams in the expression parser.Sean Callanan2016-03-194-111/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to do a better job presenting errors that occur when evaluating expressions. Key to this effort is getting away from a model where all errors are spat out onto a stream where the client has to take or leave all of them. To this end, this patch adds a new class, DiagnosticManager, which contains errors produced by the compiler or by LLDB as an expression is created. The DiagnosticManager can dump itself to a log as well as to a string. Clients will (in the future) be able to filter out the errors they're interested in by ID or present subsets of these errors to the user. This patch is not intended to change the *users* of errors - only to thread DiagnosticManagers to all the places where streams are used. I also attempt to standardize our use of errors a bit, removing trailing newlines and making clients omit 'error:', 'warning:' etc. and instead pass the Severity flag. The patch is testsuite-neutral, with modifications to one part of the MI tests because it relied on "error: error:" being erroneously printed. This patch fixes the MI variable handling and the testcase. <rdar://problem/22864976> llvm-svn: 263859
* This change introduces a "ExpressionExecutionThread" to the ThreadList. Jim Ingham2016-03-121-2/+2
| | | | | | | | | | | | | | | | | | | Turns out that most of the code that runs expressions (e.g. the ObjC runtime grubber) on behalf of the expression parser was using the currently selected thread. But sometimes, e.g. when we are evaluating breakpoint conditions/commands, we don't select the thread we're running on, we instead set the context for the interpreter, and explicitly pass that to other callers. That wasn't getting communicated to these utility expressions, so they would run on some other thread instead, and that could cause a variety of subtle and hard to reproduce problems. I also went through the commands and cleaned up the use of GetSelectedThread. All those uses should have been trying the thread in the m_exe_ctx belonging to the command object first. It would actually have been pretty hard to get misbehavior in these cases, but for correctness sake it is good to make this usage consistent. <rdar://problem/24978569> llvm-svn: 263326
* [Renderscript] Add stack argument reading code for Mipsel 3Aidan Dodds2016-03-101-7/+7
| | | | | | | | Fix a problem raised with the previous patches being applied in the wrong order. Committed on behalf of: Dean De Leo <dean@codeplay.com> llvm-svn: 263134
* [Renderscript] Add stack argument reading code for Mipsel 2Aidan Dodds2016-03-101-2/+9
| | | | | | | | This commit implements the reading of stack spilled function arguments for little endian MIPS targets. Committed on behalf of: Dean De Leo <dean@codeplay.com> llvm-svn: 263131
* [Renderscript] Add stack argument reading code for MipselAidan Dodds2016-03-101-6/+17
| | | | | | | | This commit implements the reading of stack spilled function arguments for little endian MIPS targets. Committed on behalf of: Dean De Leo <dean@codeplay.com> llvm-svn: 263130
* [Renderscript] Explicitly set the language to evaluate allocationsAidan Dodds2016-03-101-1/+3
| | | | | | | | | | | | | | | | | | | | Currently it is not specified, and since allocations are usually requested once we hit a renderscript breakpoint, the language will be inferred being as renderscript by the ExpressionParser. Actually allocations attempt to invoke functions part of the RS runtime, written in C/C++, so evaluating the calls in RenderScript could be misleading. In particular, in MIPS, the ABI between C/C++ (mips o32) and renderscript (arm) might introduce subtle bugs when evaluating such expressions. This change explicitly sets the language used to evaluate the allocations as C++. Committed on behalf of: Dean De Leo <dean@codeplay.com> llvm-svn: 263129
* Add an "offset" option to "break set -n" and "break set -f -l". Jim Ingham2016-03-093-0/+3
| | | | | | | | | | | | That way you can set offset breakpoints that will move as the function they are contained in moves (which address breakpoints can't do...) I don't align the new address to instruction boundaries yet, so you have to get this right yourself for now. <rdar://problem/13365575> llvm-svn: 263049
* Add a set of new plugins to handle Java debuggingTamas Berghammer2016-02-264-0/+270
| | | | | | | | | The purpose of these plugins is to make LLDB capable of debugging java code JIT-ed by the android runtime. Differential revision: http://reviews.llvm.org/D17616 llvm-svn: 262015
* Fix all of the unannotated switch cases to annotate the fall through or do ↵Greg Clayton2016-02-261-4/+4
| | | | | | the right thing and break. llvm-svn: 261950
* [Renderscript] Change expression strings to use portable format specifiers.Aidan Dodds2016-02-241-22/+26
| | | | | | Mips64 tests were failing on windows because the sscanf implementation differs between clang/gcc/msvc such that on windows %lx specifies a 32bits parameter and %llx is for 64bits. For us this meant that 64bit pointers were being truncated to 32bits on their way into a JIT'd expression. llvm-svn: 261741
* RenderScript: silence some -Wmissing-brace warningsSaleem Abdulrasool2016-02-231-2/+2
| | | | | | Silence some -Wmissing-brace warnings on Linux with clang 3.7. llvm-svn: 261612
* [Renderscript] Refactor .rs.info parser.Aidan Dodds2016-02-181-52/+66
| | | | | | This patch refactors the .rs.info table parser so that its more in line with the current language runtime code. llvm-svn: 261202
* Apple simulator platforms don't have a shared cache to load Objective-C ↵Enrico Granata2016-02-171-8/+2
| | | | | | | | | | | class information from This code was doing the right thing for the iOS simulator, but not other simulator platforms Fix it by making the warning not happen for all platforms whose name ends in "-simulator" Since this code lives in AppleObjCRuntimeV2.cpp, this already only applies to Apple platforms by definition, so I am not too worried about conflicts with other vendors llvm-svn: 261165
* Silence some clang warningsSaleem Abdulrasool2016-02-151-13/+13
| | | | | | Silences -Wmissing-brace and -Wformat-pedantic warnings from clang on Linux. NFC. llvm-svn: 260914
* [Renderscript] Fix typo in mips64 argument reading code.Aidan Dodds2016-02-111-1/+1
| | | | | | A typo in the mips64 argument reading code would cause register passed arguments to be truncated to 32bits. llvm-svn: 260546
* [Renderscript] Refactor target argument reading code.Aidan Dodds2016-02-112-340/+463
| | | | | | This patch reworks the function argument reading code, allowing us to annotate arguments with their types. The type/size information is needed to correctly parse arguments passed on the stack. llvm-svn: 260525
* Now that SymbolFileDWARF supports having types in completely separate .pcm ↵Greg Clayton2016-02-102-0/+7
| | | | | | | | | | | | | | file with "-fmodules -gmodules", each SymbolFileDWARF can reference module DWARF info by looking in other DWARF files. Then if you have 1000 .o files that each reference one or more .pcm files in their debug info, a simple Module::FindTypes(...) call can end up searching the same .pcm file over and over and over. Now all internal FindTypes methods in classes (ModuleList, Module, SymbolFile) now take an extra argument: llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files Each time a SymbolFile::FindTypes() is called, it needs to check the searched_symbol_files list to make sure it hasn't already been asked to find the type and return immediately if it has been checked. This will stop circular dependencies from also crashing LLDB during type queries. This has proven to be an issue when debugging large applications on MacOSX that use DWARF in .o files. <rdar://problem/24581488> llvm-svn: 260434
* [RenderScript] Refactor allocation expressions Ewan Crawford2016-02-101-77/+85
| | | | | | | Patch refractors RS plugin code specifying how format strings are used to JIT the runtime. Author: Dean De Leo <dean@codeplay.com> llvm-svn: 260372
* Don't complete a class type just to test if it is a class. Code in ↵Greg Clayton2016-02-091-2/+2
| | | | | | CompilerType and in clang::QualType knows how to complete a type if it needs to. llvm-svn: 260299
* Fix an issue where certain CommandObjects (or Options thereof) were being ↵Enrico Granata2016-02-061-6/+1
| | | | | | | | | | created once, bound to a specific CommandInterpreter (and hence a specific Debugger), and then cached for reuse across different Debugger instances Obviously, if the original Debugger goes away, those commands are holding on to now stale memory, which has the potential to cause crashes Fixes rdar://24460882 llvm-svn: 259964
* [RenderScript] Add command for recalculating allocation detailsEwan Crawford2016-02-042-0/+61
| | | | | | | | Patch replaces the --refresh flag removed in r258800 with it's own command, 'language renderscript allocation refresh'. Since there is no reason this functionality should be tied to another command as an option. The command itself simply re-JITs all our cached information about allocations. llvm-svn: 259773
* [RenderScript] Remove unused RS commandEwan Crawford2016-01-292-55/+2
| | | | | | | | | | Patch deletes the 'language renderscript module probe' command. This command was present in the initial commit to help debug the plugin. However we haven't used it recently and it's functionality is unclear, so can be removed entirely. Also add back 'kernel coordinate' command, removed by accident in clang format patch r259056. llvm-svn: 259181
* Remove autoconf support from source directories.Eugene Zelenko2016-01-284-56/+0
| | | | | | Differential revision: http://reviews.llvm.org/D16662 llvm-svn: 259098
* [Renderscript] Clang-format the renderscript plugin.Aidan Dodds2016-01-282-754/+819
| | | | | | Run clang-format over the renderscript plugin and fix common formatting deviations. llvm-svn: 259056
* [RenderScript] Provide option to specify a single allocation to printEwan Crawford2016-01-262-22/+23
| | | | | | | | Patch replaces the 'renderscript allocation list' command flag --refresh, with a new option --id <ID>. This new option only prints the details of a single allocation with a given id, rather than printing all the allocations. Functionality from the removed '--refresh' flag will be moved into its own command in a subsequent commit. llvm-svn: 258800
* Fix clang warning in RenderScriptRuntimePavel Labath2016-01-201-1/+1
| | | | | | | | std::array should have "the same semantics as a struct holding a C-style array T[N] as its only non-static data member", so the initialization should have one more level of braces. Hopefully, no compiler will object to that. llvm-svn: 258306
* [RenderScript] New command for viewing coordinate of current kernel invocationEwan Crawford2016-01-202-35/+138
| | | | | | | Patch adds command 'language renderscript kernel coordinate' for printing the kernel index in (x,y,z) format. This is done by walking the call stack and looking for a function with suffix '.expand', as well as the frame variables containing the coordinate data. llvm-svn: 258303
* [RenderScript] Remove mips specific expressionsEwan Crawford2016-01-182-180/+90
| | | | | | | | Reverts earlier commit r254910, which used function pointers for jitted expressions to avoid a Mips64 compiler bug. Bug has since been fixed, and compiler longer issues the problem instruction. Author: Dean De Leo <dean@codeplay.com> llvm-svn: 258038
* [RenderScript] Hook kernel invocation.Aidan Dodds2016-01-142-17/+115
| | | | | | This patch adds a hook to track kernel invocations and to track all script and allocation objects used. llvm-svn: 257772
* Writing a test case for r257234 I found another place that wasJim Ingham2016-01-091-1/+14
| | | | | | | assuming a ValueObject always has a process. So this is that fix and the test case. llvm-svn: 257242
* Fix a thinko in the asserts in GetDynamicTypeAndAddress. It was requiring ↵Jim Ingham2016-01-081-2/+11
| | | | | | | | | | | | that the process in the incoming value be non-null, but Value Objects created off the target don't necessarily have a process. In that case, having the targets the same is good enough. <rdar://problem/24097805> llvm-svn: 257234
* Better scheme to lookup alternate mangled name when looking up function address.Siva Chandra2016-01-073-58/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change is relevant for inferiors compiled with GCC. GCC does not emit complete debug info for std::basic_string<...>, and consequently, Clang (the LLDB compiler) does not generate correct mangled names for certain functions. This change removes the hard-coded alternate names in ItaniumABILanguageRuntime.cpp. Before the hard-coded names were put in ItaniumABILanguageRuntime.cpp, one could not evaluate std::string methods (ex. std::string::length). After putting in the hard-coded names, one could evaluate them. However, it did not still enable one to call methods on, say for example, std::vector<string>. This change makes that possible. There is some amount of incompleteness in this change. Consider the following example: std::string hello("hello"), world("world"); std::map<std::string, std::string> m; m[hello] = world; One can still not evaluate the expression "m[hello]" in LLDB. Will address this issue in another pass. Reviewers: jingham, vharron, evgeny777, spyffe, dawn Subscribers: clayborg, dawn, lldb-commits Differential Revision: http://reviews.llvm.org/D12809 llvm-svn: 257113
* [RenderScript] Improve file format for saving RS allocationsEwan Crawford2016-01-072-29/+154
| | | | | | | | | | | Updates the file format for storing RS allocations to a file, so that the format now supports struct element types. The file header will now contain a subheader for every RS element and it's descendants. Where an element subheader contains element type details and offsets to the subheaders of that elements fields. Patch also improves robustness when loading incorrect files. llvm-svn: 257045
* [Renderscript] Fix stack argument inspection.Aidan Dodds2016-01-061-43/+42
| | | | | | | Function arguments that were spilled and passed on the stack were incorrectly read. The value was written back into the output pointer rather then the memory being pointed to. llvm-svn: 256941
* Revert r256769Ewan Crawford2016-01-051-1/+1
| | | | | | | | | Reverts "Use correct format identifiers to print something meaningful." Original format specifiers were correct. Instead use void* casts to remove warnings, since this is what the %p specifier expects. llvm-svn: 256833
* Use correct format identifiers to print something meaningful.Davide Italiano2016-01-041-1/+1
| | | | llvm-svn: 256769
* [RenderScript] Support all RS allocation types Ewan Crawford2015-12-171-18/+100
| | | | | | | | Currently we can just inspect the details of the most common allocation types. This patch allows us to support all the types defined by the RS runtime in its `RsDataType` enum. Including handlers, matrices and packed graphical data. llvm-svn: 255904
* [RenderScript] Support for amd64 RS hooksEwan Crawford2015-12-111-9/+54
| | | | | | | Adds support for reading a maximum of six integer arguments from a renderscript hook on X86_64. Author: Luke Drummond <luke.drummond@codeplay.com> llvm-svn: 255338
* [RenderScript] Refactor condition deciding when to JIT RS runtimeEwan Crawford2015-12-101-9/+19
| | | | | | | Patch creates a member function that decides when to JIT all the details about an allocation. By checking for zero pointers we can avoid the situation where we store uninitialised data from previously inspecting the allocation during creation. llvm-svn: 255238
* [RenderScript] Add hook for destroyed allocationsEwan Crawford2015-12-092-1/+46
| | | | | | | New hook for rsdAllocationDestroy() which is called when allocations are deleted. LLDB should be aware of this so we can remove the allocation from our internal list. llvm-svn: 255121
* [RenderScript] Mips64 allocations workaroundEwan Crawford2015-12-072-90/+180
| | | | | | | | | Workaround for Mips64 compiler bug by using function pointers to call functions for expression evaluation. This avoids the emission of the JAL instruction, which can only jump within a particular range of the PC. Author: Dean De Leo, dean@codeplay.com llvm-svn: 254910
* Fix hang in global static initializationAdrian McCarthy2015-11-301-4/+10
| | | | | | Differential Revision: http://reviews.llvm.org/D15092 llvm-svn: 254338
* [RS] Support RenderScript struct allocationsEwan Crawford2015-11-302-116/+409
| | | | | | | | | | | | This patch adds functionality for dumping allocations of struct elements. This involves: + Jitting the runtime for details on all the struct fields. + Finding the name of the struct type by looking for a global variable of the same type, which will have been reflected back to the java host code. + Using this struct type name to pass into expression evaluation for pretty printing the data for the dump command. llvm-svn: 254294
OpenPOWER on IntegriCloud