summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/LanguageRuntime/ObjC
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Use Timeout<> in EvaluateExpressionOptions classPavel Labath2016-12-062-5/+5
| | | | llvm-svn: 288797
* Don't allow direct access to StreamString's internal buffer.Zachary Turner2016-11-161-1/+1
| | | | | | | | | | | | | | | 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-121-1/+1
| | | | llvm-svn: 286723
* 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
* 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-221-1/+1
| | | | | | | 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-221-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | 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-211-3/+5
| | | | | | | | | | 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
* 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
* 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-0616-6679/+6068
| | | | | | | | | | | | | | | | | | | | | | | *** 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-111-5/+6
| | | | | | | | | | | | | | | | 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
* 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
* LLDB help content has accumulated over time without a recent attempt toKate Stone2016-07-141-16/+10
| | | | | | | | | 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
* second pass over removal of Mutex and ConditionSaleem Abdulrasool2016-05-192-4/+4
| | | | 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-056-15/+6
| | | | | | | | | | | | | | "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-056-6/+15
| | | | | | | | | | | | 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
* 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
* 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
* Add an "offset" option to "break set -n" and "break set -f -l". Jim Ingham2016-03-092-0/+2
| | | | | | | | | | | | 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
* 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
* Remove autoconf support from source directories.Eugene Zelenko2016-01-281-14/+0
| | | | | | Differential revision: http://reviews.llvm.org/D16662 llvm-svn: 259098
* 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
* Newer versions of the ObjC runtime have an extra field in objc_opt_t.Sean Callanan2015-11-201-6/+32
| | | | llvm-svn: 253732
* Change the way we read data from the ObjC runtimeEnrico Granata2015-11-061-18/+20
| | | | llvm-svn: 252272
* Completely avoid building Apple simulator on non-Darwin platforms.Chaoren Lin2015-11-051-2/+6
| | | | | | | | | | | | | | Summary: This is a resubmission of r252179, but correctly ignores the source files for other platforms. Reviewers: granata.enrico, tberghammer, zturner, jingham Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14389 llvm-svn: 252205
* Attempt to fix MSVC builds after rL250966.Eugene Zelenko2015-10-221-9/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D13968 llvm-svn: 251031
* [AppleObjCRuntime] Don't bother looking for the runtime on non-apple targetsPavel Labath2015-10-221-1/+4
| | | | | | | | | | | | | | | Summary: This short-circuits the GetObjCVersion function to avoid iterating through target modules on non-apple targets. This function is called on every Process::IsDynamicValue call, so this overhead is not negligible. Reviewers: clayborg, jingham Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13948 llvm-svn: 251004
* Fix Clang-tidy modernize-use-override warnings in some files in ↵Eugene Zelenko2015-10-228-362/+302
| | | | | | | | source/Plugins/LanguageRuntime; other minor fixes. Differential Revision: http://reviews.llvm.org/D13966 llvm-svn: 250966
* Moved more Clang-specific parts of the expression parser into the Clang plugin.Sean Callanan2015-09-251-1/+1
| | | | | | | | | There are still a bunch of dependencies on the plug-in, but this helps to identify them. There are also a few more bits we need to move (and abstract, for example the ClangPersistentVariables). llvm-svn: 248612
OpenPOWER on IntegriCloud