summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/LanguageRuntime/ObjC
Commit message (Collapse)AuthorAgeFilesLines
...
* Added a testcase that checks that fairly complicatedSean Callanan2014-11-111-0/+40
| | | | | | | | | | | | structures are parsed safely by the Objective-C runtime. Also made some modifications to the way we parse structs in the runtime to avoid mis-parsing @ followed by the name of the next field. <rdar://problem/18887634> llvm-svn: 221643
* Handle types from the runtime that conform toSean Callanan2014-11-061-1/+11
| | | | | | | | protocols. <rdar://problem/18883778> llvm-svn: 221476
* Complete the superclass type when completing anSean Callanan2014-10-311-0/+4
| | | | | | Objective-C class type. llvm-svn: 221022
* Updated the Objective-C runtime type vendor toSean Callanan2014-10-311-5/+41
| | | | | | | load ivars into classes that are reported to the Objective-C runtime. llvm-svn: 220981
* - Fixed a bug where ::Describe for class descriptorsSean Callanan2014-10-311-16/+19
| | | | | | | | | | would fail if the class had no ivars. - Updated use of the RealizeType API by the class descriptors to use "for_expression" rather than the misnamed "allow_unknownanytype." llvm-svn: 220980
* - Use "for_expression" rather than "allow_unknownanytype"Sean Callanan2014-10-312-33/+64
| | | | | | | | | | | | | to indicate that we're doing stuff for the expression parser. - When for_expression is true, look through @s and find the actual class rather than just returning id. - Rename BuildObjCObjectType to BuildObjCObjectPointerType since it's actually returning an object *pointer* type. llvm-svn: 220979
* Resolve non-pointer isas for metaclasses.Sean Callanan2014-10-136-9/+65
| | | | | | | Patch by Enrico Granata. <rdar://problem/18618298> llvm-svn: 219641
* When parsing ObjC types from encoded strings (and disallowing any-type), the ↵Enrico Granata2014-10-101-6/+17
| | | | | | | | | ^? combination gets resolved to no type, while we could resolve it to void* I don't think on any of the platforms where ObjC matters sizeof(T*) depends on T, so even if we never figured out the pointee type, the pointer type should still be sane This might also allow some limited inspection where previously none was possible, so a win llvm-svn: 219540
* This checkin is the first step in making the lldb thread stepping mechanism ↵Jim Ingham2014-09-291-4/+4
| | | | | | | | | | | | more accessible from the user level. It adds the ability to invent new stepping modes implemented by python classes, and to view the current thread plan stack and to some extent alter it. I haven't gotten to documentation or tests yet. But this should not cause any behavior changes if you don't use it, so its safe to check it in now and work on it incrementally. llvm-svn: 218642
* Extend the encoding parser to support the @typeName syntax for Objective-C ↵Enrico Granata2014-08-232-7/+24
| | | | | | object types llvm-svn: 216305
* Fix warnings about overloaded virtual functions.Greg Clayton2014-08-202-2/+2
| | | | llvm-svn: 216077
* Changes uint to uint32_t.Zachary Turner2014-08-192-7/+7
| | | | | | This fixes the build broken as a result of r216026. llvm-svn: 216034
* Attempt to keep the Linux build happy in face of my changes. Non-Apple ↵Enrico Granata2014-08-191-0/+2
| | | | | | folks, can you confirm that this is good enough to keep things building for you? llvm-svn: 216028
* This is a fairly bulky patch, but a lot of it involves rearranging existing codeEnrico Granata2014-08-198-833/+1331
| | | | | | | | | | | | | | | | | | | | What it does: - it introduces a concept of EncodingToType to the ObjCLanguageRuntime The ObjC runtime has a "type encoding" feature that describes types as strings The EncodingToType is a decoder for that format, making types out of type encoding strings This feature already existed in some shape as we were using it to create method signatures out of the runtime, but this checkin extends the parser to support the full syntax, and moves things so that more parts of LLDB have access to this decoder - it splits the ClassDescriptorV2 object to its own file, it was starting to grow too large - it adds to the ClassDescriptor mechanism a notion of ivar storage; the ObjC runtime vends ivar information as well as method information While ivar information is not ready for prime type (i.e. we don't want to add it to the runtime generated types for expression evaluator usage), there are potentially useful scenarios in which realizing ivar types could be useful. For now, the ClassDescriptor is going to hold ivar information directly. Existing code already allows describing ivars, this patch hooks those moving parts up so that one can actually ask a ClassDescriptor about ivars for the class it represents and as a couple minor niceties: - it makes it possible to retrieve the LLDB ClangASTContext that is associated to a clang::ASTContext - it extends the ValueObject-to-ClassDescriptor API in the language runtime to deal correctly with base-class hierarchies llvm-svn: 216026
* Two fixes in the Objective-C language runtime:Sean Callanan2014-07-171-3/+20
| | | | | | | | | | | | | | | - First, when logging, be helpful by printing the real name of the class; - Second, up the limit for number of classes from 16k to 128k, and put in an assertion (and better error handling when not in a debug configuration) when we cross that limit the next time. <rdar://problem/17052976> llvm-svn: 213218
* Fix typos.Bruce Mitchener2014-07-012-4/+4
| | | | llvm-svn: 212132
* Switch over to using object_getClass to get the class of an object. ↵Jim Ingham2014-06-191-27/+39
| | | | | | | | | | | | Previously we were directly accessing the isa pointer of a class object to get its meta-class, but the isa pointers are not simple pointers on arm64, so this would cause the stepping to fail. object_getClass does whatever magic needs doing in this case. <rdar://problem/17239690> llvm-svn: 211289
* Rename eExecution*** to eExpression*** to be consistent with the result type.Jim Ingham2014-05-052-3/+3
| | | | llvm-svn: 207945
* Make the Expression Execution result enum available to the SB API layer.Jim Ingham2014-05-052-3/+3
| | | | | | | | | Add a callback that will allow an expression to be cancelled between the expression evaluation stages (for the ClangUserExpressions.) <rdar://problem/16790467>, <rdar://problem/16573440> llvm-svn: 207944
* LLDB_INVALID_ADDRESS may not be too large for a uintptr_t, so castJoerg Sonnenberger2014-05-021-1/+1
| | | | | | first. llvm-svn: 207860
* Give the clang functions names. This is only for logging.Jim Ingham2014-04-223-4/+8
| | | | llvm-svn: 206836
* sweep up -Wformat warnings from gccSaleem Abdulrasool2014-04-041-28/+27
| | | | | | | This is a purely mechanical change explicitly casting any parameters for printf style conversion. This cleans up the warnings emitted by gcc 4.8 on Linux. llvm-svn: 205607
* Workaround for collision between enum members in LLVM's MachO.h and system ↵Jim Ingham2014-04-022-2/+0
| | | | | | | | | | headers on Mac OS X (in particular mach/machine.h). <rdar://problem/16494607> llvm-svn: 205480
* <rdar://problem/14515139>Enrico Granata2014-03-254-34/+40
| | | | | | | Add a GetFoundationVersion() to AppleObjCRuntime This API is used to return and cache the major version of Foundation.framework, which is potentially a useful piece of data to key off of to enable or disable certain ObjC related behaviors (especially in data formatters) llvm-svn: 204756
* This commit reworks how the thread plan's ShouldStopHere mechanism works, so ↵Jim Ingham2014-03-131-8/+10
| | | | | | | | | | | | | | | that it is useful not only for customizing "step-in" behavior (e.g. step-in doesn't step into code with no debug info), but also the behavior of step-in/step-out and step-over when they step out of the frame they started in. I also added as a proof of concept of this reworking a mode for stepping where stepping out of a frame into a frame with no debug information will continue stepping out till it arrives at a frame that does have debug information. This is useful when you are debugging callback based code where the callbacks are separated from the code that initiated them by some library glue you don't care about, among other things. llvm-svn: 203747
* Fix Windows build using portable types for formatting the log outputsDeepak Panickal2014-03-031-1/+1
| | | | llvm-svn: 202723
* Fix build break due to signature change on ASTContext' setExternalSource ↵Todd Fiala2014-02-271-1/+1
| | | | | | | | | parameter. This change converts points to clang::ExternalASTSource from llvm::OwningPtr<> to llvm::IntrusiveRefCntPtr<>. llvm-svn: 202411
* Merging the iohandler branch back into main. Greg Clayton2014-01-271-1/+2
| | | | | | | | | | | | The many many benefits include: 1 - Input/Output/Error streams are now handled as real streams not a push style input 2 - auto completion in python embedded interpreter 3 - multi-line input for "script" and "expression" commands now allow you to edit previous/next lines using up and down arrow keys and this makes multi-line input actually a viable thing to use 4 - it is now possible to use curses to drive LLDB (please try the "gui" command) We will need to deal with and fix any buildbot failures and tests and arise now that input/output and error are correctly hooked up in all cases. llvm-svn: 200263
* Harden the Objective-C runtime against weird methodSean Callanan2013-12-201-0/+6
| | | | | | | | signatures. <rdar://problem/15631996> llvm-svn: 197843
* This patch does a couple of things. Jim Ingham2013-11-074-34/+37
| | | | | | | | | | | | | | | | | | | | | | It completes the job of using EvaluateExpressionOptions consistently throughout the inferior function calling mechanism in lldb begun in Greg's patch r194009. It removes a handful of alternate calls into the ClangUserExpression/ClangFunction/ThreadPlanCallFunction which were there for convenience. Using the EvaluateExpressionOptions removes the need for them. Using that it gets the --debug option from Greg's patch to work cleanly. It also adds another EvaluateExpressionOption to not trap exceptions when running expressions. You shouldn't use this option unless you KNOW your expression can't throw beyond itself. This is: <rdar://problem/15374885> At present this is only available through the SB API's or python. It fixes a bug where function calls would unset the ObjC & C++ exception breakpoints without checking whether they were set by somebody else already. llvm-svn: 194182
* Roll back the changes I made in r193907 which created a new FrameJason Molenda2013-11-041-1/+1
| | | | | | | | | | pure virtual base class and made StackFrame a subclass of that. As I started to build on top of that arrangement today, I found that it wasn't working out like I intended. Instead I'll try sticking with the single StackFrame class -- there's too much code duplication to make a more complicated class hierarchy sensible I think. llvm-svn: 193983
* Add a new base class, Frame. It is a pure virtual function whichJason Molenda2013-11-021-1/+1
| | | | | | | | | | | | | | | | | | | | | defines a protocol that all subclasses will implement. StackFrame is currently the only subclass and the methods that Frame vends are nearly identical to StackFrame's old methods. Update all callers to use Frame*/Frame& instead of pointers to StackFrames. This is almost entirely a mechanical change that touches a lot of the code base so I'm committing it alone. No new functionality is added with this patch, no new subclasses of Frame exist yet. I'll probably need to tweak some of the separation, possibly moving some of StackFrame's methods up in to Frame, but this is a good starting point. <rdar://problem/15314068> llvm-svn: 193907
* <rdar://problem/15144376>Enrico Granata2013-10-291-0/+11
| | | | | | | | | | | | This commit reimplements the TypeImpl class (the class that backs SBType) in terms of a static,dynamic type pair This is useful for those cases when the dynamic type of an ObjC variable can only be obtained in terms of an "hollow" type with no ivars In that case, we could either go with the static type (+iVar information) or with the dynamic type (+inheritance chain) With the new TypeImpl implementation, we try to combine these two sources of information in order to extract as much information as possible This should improve the functionality of tools that are using the SBType API to do extensive dynamic type inspection llvm-svn: 193564
* <rdar://problem/13635174>Greg Clayton2013-10-111-1/+1
| | | | | | | | Added a way to set hardware breakpoints from the "breakpoint set" command with the new "--hardware" option. Hardware breakpoints are not a request, they currently are a requirement. So when breakpoints are specified as hardware breakpoints, they might fail to be set when they are able to be resolved and should be used sparingly. This is currently hooked up for GDB remote debugging. Linux and FreeBSD should quickly enable this feature if possible, or return an error for any breakpoints that are hardware breakpoint sites in the "virtual Error Process::EnableBreakpointSite (BreakpointSite *bp_site);" function. llvm-svn: 192491
* Convert to UNIX line endings.Joerg Sonnenberger2013-09-252-11/+11
| | | | llvm-svn: 191367
* <rdar://problem/14071463>Enrico Granata2013-09-102-4/+4
| | | | | | The wrong method was being called in some instances here, causing class lookups to fail llvm-svn: 190436
* Remove commented out routines.Jim Ingham2013-09-051-33/+0
| | | | llvm-svn: 190085
* This commit does two things. One, it converts the return value of the ↵Jim Ingham2013-07-181-1/+1
| | | | | | | | | | | | | QueueThreadPlanXXX plan providers from a "ThreadPlan *" to a "lldb::ThreadPlanSP". That was needed to fix a bug where the ThreadPlanStepInRange wasn't checking with its sub-plans to make sure they succeed before trying to proceed further. If the sub-plan failed and as a result didn't make any progress, you could end up retrying the same failing algorithm in an infinite loop. <rdar://problem/14043602> llvm-svn: 186618
* Huge change to clean up types.Greg Clayton2013-07-114-55/+55
| | | | | | | | A long time ago we start with clang types that were created by the symbol files and there were many functions in lldb_private::ClangASTContext that helped. Later we create ClangASTType which contains a clang::ASTContext and an opauque QualType, but we didn't switch over to fully using it. There were a lot of places where we would pass around a raw clang_type_t and also pass along a clang::ASTContext separately. This left room for error. This checkin change all type code over to use ClangASTType everywhere and I cleaned up the interfaces quite a bit. Any code that was in ClangASTContext that was type related, was moved over into ClangASTType. All code that used these types was switched over to use all of the new goodness. llvm-svn: 186130
* Cleanup on the unified section list changes. Main changes are:Greg Clayton2013-07-102-2/+2
| | | | | | | | | | | | | | | - ObjectFile::GetSymtab() and ObjectFile::ClearSymtab() no longer takes any flags - Module coordinates with the object files and contain a unified section list so that object file and symbol file can share sections when they need to, yet contain their own sections. Other cleanups: - Fixed Symbol::GetByteSize() to not have the symbol table compute the byte sizes on the fly - Modified the ObjectFileMachO class to compute symbol sizes all at once efficiently - Modified the Symtab class to store a file address lookup table for more efficient lookups - Removed Section::Finalize() and SectionList::Finalize() as they did nothing - Improved performance of the detection of symbol files that have debug maps by excluding stripped files and core files, debug files, object files and stubs - Added the ability to tell if an ObjectFile has been stripped with ObjectFile::IsStripped() (used this for the above performance improvement) llvm-svn: 185990
* Don't go to the trouble of trying to figure out the implementation function ↵Jim Ingham2013-06-201-0/+8
| | | | | | | | for selectors sent to nil objects, it won't work anyway. llvm-svn: 184474
* Sort out a number of mismatched integer types in order to cut down the ↵Andy Gibbs2013-06-193-5/+5
| | | | | | number of compiler warnings. llvm-svn: 184333
* Fix various build warnings.Matt Kopec2013-06-031-1/+1
| | | | llvm-svn: 183140
* <rdar://problem/13863031>Enrico Granata2013-05-281-1/+3
| | | | | | | | Giving a timeout for the call to NSPrintForDebugger() that happens when you “po” objects This is a temporary workaround until a more detailed solution to the general problem of canceling actions is found llvm-svn: 182782
* A couple of small fixes to make core file debugging less noisy.Jason Molenda2013-05-111-3/+6
| | | | | | | | | | Don't want about being unable to find a needed objective-c runtime function when we're core file debugging and can't jit anything anyway. Don't warn when quitting a debug session on a core file, the program state can be reconstructed by re-running lldb on the same core file again. llvm-svn: 181653
* <rdar://problem/13854277>Greg Clayton2013-05-104-37/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <rdar://problem/13594769> Main changes in this patch include: - cleanup plug-in interface and use ConstStrings for plug-in names - Modfiied the BSD Archive plug-in to be able to pick out the correct .o file when .a files contain multiple .o files with the same name by using the timestamp - Modified SymbolFileDWARFDebugMap to properly verify the timestamp on .o files it loads to ensure we don't load updated .o files and cause problems when debugging The plug-in interface changes: Modified the lldb_private::PluginInterface class that all plug-ins inherit from: Changed: virtual const char * GetPluginName() = 0; To: virtual ConstString GetPluginName() = 0; Removed: virtual const char * GetShortPluginName() = 0; - Fixed up all plug-in to adhere to the new interface and to return lldb_private::ConstString values for the plug-in names. - Fixed all plug-ins to return simple names with no prefixes. Some plug-ins had prefixes and most ones didn't, so now they all don't have prefixed names, just simple names like "linux", "gdb-remote", etc. llvm-svn: 181631
* Figure out the reply to "PlanExplainsStop" once when we stop and then use ↵Jim Ingham2013-05-082-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the cached value. This fixes problems, for instance, with the StepRange plans, where they know that they explained the stop because they were at their "run to here" breakpoint, then deleted that breakpoint, so when they got asked again, doh! I had done this for a couple of plans in an ad hoc fashion, this just formalizes it. Also add a "ResumeRequested" in Process so that the code in the completion handlers can tell the ShouldStop logic they want to resume rather than just directly resuming. That allows us to handle resuming in a more controlled fashion. Also, SetPublicState can take a "restarted" flag, so that it doesn't drop the run lock when the target was immediately restarted. --This line, and those below , will be ignored-- M test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py M include/lldb/Target/ThreadList.h M include/lldb/Target/ThreadPlanStepOut.h M include/lldb/Target/Thread.h M include/lldb/Target/ThreadPlanBase.h M include/lldb/Target/ThreadPlanStepThrough.h M include/lldb/Target/ThreadPlanStepInstruction.h M include/lldb/Target/ThreadPlanStepInRange.h M include/lldb/Target/ThreadPlanStepOverBreakpoint.h M include/lldb/Target/ThreadPlanStepUntil.h M include/lldb/Target/StopInfo.h M include/lldb/Target/Process.h M include/lldb/Target/ThreadPlanRunToAddress.h M include/lldb/Target/ThreadPlan.h M include/lldb/Target/ThreadPlanCallFunction.h M include/lldb/Target/ThreadPlanStepOverRange.h M source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.h M source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp M source/Target/StopInfo.cpp M source/Target/Process.cpp M source/Target/ThreadPlanRunToAddress.cpp M source/Target/ThreadPlan.cpp M source/Target/ThreadPlanCallFunction.cpp M source/Target/ThreadPlanStepOverRange.cpp M source/Target/ThreadList.cpp M source/Target/ThreadPlanStepOut.cpp M source/Target/Thread.cpp M source/Target/ThreadPlanBase.cpp M source/Target/ThreadPlanStepThrough.cpp M source/Target/ThreadPlanStepInstruction.cpp M source/Target/ThreadPlanStepInRange.cpp M source/Target/ThreadPlanStepOverBreakpoint.cpp M source/Target/ThreadPlanStepUntil.cpp M lldb.xcodeproj/xcshareddata/xcschemes/Run Testsuite.xcscheme llvm-svn: 181381
* Fixed a build problem.Sean Callanan2013-04-241-1/+1
| | | | llvm-svn: 180212
* Added support for pulling Objective-C class symbolsSean Callanan2013-04-241-1/+11
| | | | | | | | | | out of the runtime. This allows calling static methods on classes whose symbols have been stripped out of the binary. <rdar://problem/12042992> llvm-svn: 180210
* Changes to the ObjC runtimeEnrico Granata2013-04-243-132/+539
| | | | llvm-svn: 180199
OpenPOWER on IntegriCloud