- Oct 29, 2010
-
-
Sean Callanan authored
7pm, and made minor integration fixes. llvm-svn: 117680
-
Greg Clayton authored
by type ID (the most common type of type lookup). Changed the API logging a bit to always show the objects in the OBJECT(POINTER) format so it will be easy to locate all instances of an object or references to it when looking at logs. llvm-svn: 117641
-
- Oct 28, 2010
-
-
Sean Callanan authored
familiar with the ownership relationships involving Diagnostic. llvm-svn: 117573
-
Sean Callanan authored
logging for type importing, making errors much easier to diagnose. Also removed some Objective-C related logging. llvm-svn: 117568
-
- Oct 27, 2010
-
-
Greg Clayton authored
when making objective C classes from the DWARF. llvm-svn: 117438
-
Greg Clayton authored
all of the calls inlined in the header file for better performance. Fixed the summary for C string types (array of chars (with any combo if modifiers), and pointers to chars) work in all cases. Fixed an issue where a forward declaration to a clang type could cause itself to resolve itself more than once if, during the resolving of the type itself it caused something to try and resolve itself again. We now remove the clang type from the forward declaration map in the DWARF parser when we start to resolve it and avoid this additional call. This should stop any duplicate members from appearing and throwing all the alignment of structs, unions and classes. llvm-svn: 117437
-
Sean Callanan authored
Also made type lookup lazy for types that are hidden behind pointers. llvm-svn: 117430
-
- Oct 26, 2010
-
-
Jason Molenda authored
loaded/parsed. Should add timers to this eventually. Delay getting a full UnwindPlan if it's possible to unwind with just a fast UnwindPlan. This keeps us from reading the eh_frame section unless we hit something built -fomit-frame pointer or we hit a frame with no symbol (read: no start address) available. It doesn't look like it is correctly falling back to using the full UnwindPlan to provide additional registers that the fast UnwindPlan doesn't supply; e.g. go to the middle of a stack and ask for r12 and it will show you the value of r12 in frame 0. That's a bug for tomorrow. llvm-svn: 117361
-
- Oct 25, 2010
-
-
Jason Molenda authored
Not yet enabled as the default unwinder but there are no known backtrace problems with the code at this point. Added 'log enable lldb unwind' to help diagnose backtrace problems; this output needs a little refining but it's a good first step. eh_frame information is currently read unconditionally - the code is structured to allow this to be delayed until it's actually needed. There is a performance hit when you have to parse the eh_frame information for any largeish executable/library so it's necessary to avoid if possible. It's confusing having both the UnwindPlan::RegisterLocation struct and the RegisterConextLLDB::RegisterLocation struct, I need to rename one of them. The writing of registers isn't done in the RegisterConextLLDB subclass yet; neither is the running of complex DWARF expressions from eh_frame (e.g. used for _sigtramp on Mac OS X). llvm-svn: 117256
-
Sean Callanan authored
Specifically, we fixed handling of the objc_class built-in type, which allowed us to pass named Objective-C objects to functions, call variable list -t on objects safely, etc. llvm-svn: 117249
-
- Oct 20, 2010
-
-
Greg Clayton authored
So the issue here was that we have lldb_private::FileSpec that by default was always resolving a path when using the: FileSpec::FileSpec (const char *path); and in the: void FileSpec::SetFile(const char *pathname, bool resolve = true); This isn't what we want in many many cases. One example is you have "/tmp" on your file system which is really "/private/tmp". You compile code in that directory and end up with debug info that mentions "/tmp/file.c". Then you type: (lldb) breakpoint set --file file.c --line 5 If your current working directory is "/tmp", then "file.c" would be turned into "/private/tmp/file.c" which won't match anything in the debug info. Also, it should have been just a FileSpec with no directory and a filename of "file.c" which could (and should) potentially match any instances of "file.c" in the debug info. So I removed the constructor that just takes a path: FileSpec::FileSpec (const char *path); // REMOVED You must now use the other constructor that has a "bool resolve" parameter that you must always supply: FileSpec::FileSpec (const char *path, bool resolve); I also removed the default parameter to SetFile(): void FileSpec::SetFile(const char *pathname, bool resolve); And fixed all of the code to use the right settings. llvm-svn: 116944
-
- Oct 15, 2010
-
-
Greg Clayton authored
debug information and you evaluated an expression, a crash would occur as a result of an unchecked pointer. Added the ability to get the expression path for a ValueObject. For a rectangle point child "x" the expression path would be something like: "rect.top_left.x". This will allow GUI and command lines to get ahold of the expression path for a value object without having to explicitly know about the hierarchy. This means the ValueObject base class now has a "ValueObject *m_parent;" member. All ValueObject subclasses now correctly track their lineage and are able to provide value expression paths as well. Added a new "--flat" option to the "frame variable" to allow for flat variable output. An example of the current and new outputs: (lldb) frame variable argc = 1 argv = 0x00007fff5fbffe80 pt = { x = 2 y = 3 } rect = { bottom_left = { x = 1 y = 2 } top_right = { x = 3 y = 4 } } (lldb) frame variable --flat argc = 1 argv = 0x00007fff5fbffe80 pt.x = 2 pt.y = 3 rect.bottom_left.x = 1 rect.bottom_left.y = 2 rect.top_right.x = 3 rect.top_right.y = 4 As you can see when there is a lot of hierarchy it can help flatten things out. Also if you want to use a member in an expression, you can copy the text from the "--flat" output and not have to piece it together manually. This can help when you want to use parts of the STL in expressions: (lldb) frame variable --flat argc = 1 argv = 0x00007fff5fbffea8 hello_world._M_dataplus._M_p = 0x0000000000000000 (lldb) expr hello_world._M_dataplus._M_p[0] == '\0' llvm-svn: 116532
-
- Oct 13, 2010
-
-
Greg Clayton authored
artifical members (like the vtable pointer member that shows up in the DWARF). We were adding this to each class which was making all member variables be off by a pointer size. Added a test case so we can track this with "test/forward". Fixed the type name index in DWARF to include all the types after finding some types were being omitted due to the DW_AT_specification having the DW_AT_declaration attribute which was being read into the real type instances when there were forward declarations in the DWARF, causing the type to be omitted. We now check to make sure any DW_AT_declaration values are only respected when parsing types if the attribute is from the current DIE. After fixing the missing types, we ran into some issues with the expression parser finding duplicate entries for __va_list_tag since they are built in types and would result in a "duplicate __va_list_tag definition" error. We are now just ignoring this name during lookup, but we will need to see if we can get the name lookup function to not get called in these cases. Fixed an issue that would cause an assertion where DW_TAG_subroutine_types that had no children, would not properly make a clang function type of: "void (*) (void)". llvm-svn: 116392
-
- Oct 12, 2010
-
-
Greg Clayton authored
function. It will inspect NAME and do the following: - if the name contains '(' or starts with "-[" or "+[" then a full name search will happen to match full function names with args (C++ demangled names) or full objective C method prototypes. - if the name contains "::" and no '(', then it is assumed to be a qualified function name that is in a namespace or class. For "foo::bar::baz" we will search for any functions with the basename or method name of "baz", then filter the results to only those that contain "foo::bar::baz". This allows setting breakpoint on C++ functions and methods without having to fully qualify all of the types that would appear in C++ mangled names. - if the name contains ":" (not "::"), then NAME is assumed to be an ObjC selector. _ otherwise, we assume just a plain function basename. Now that "--name" is our "auto" mode, I introduced the new "--basename" option ("breakpoint set --basename NAME") to allow for function names that aren't methods or selectors, just basenames. This can also be used to ignore C++ namespaces and class hierarchies for class methods. Fixed clang enumeration promotion types to be correct. llvm-svn: 116293
-
Greg Clayton authored
being chopped up correctly). The DWARF plug-in also keeps a map of the ObjC class names to selectors for easy parsing of all class selectors when we parse the class type. llvm-svn: 116290
-
- Oct 11, 2010
-
-
Greg Clayton authored
forward declarations). llvm-svn: 116181
-
Greg Clayton authored
lldb_private::RegularExpression compiles and matches with: size_t RegularExpression::GetErrorAsCString (char *err_str, size_t err_str_max_len) const; Added the ability to search a variable list for variables whose names match a regular expression: size_t VariableList::AppendVariablesIfUnique (const RegularExpression& regex, VariableList &var_list, size_t& total_matches); Also added the ability to append a variable to a VariableList only if it is not already in the list: bool VariableList::AddVariableIfUnique (const lldb::VariableSP &var_sp); Cleaned up the "frame variable" command: - Removed the "-n NAME" option as this is the default way for the command to work. - Enable uniqued regex searches on variable names by fixing the "--regex RE" command to work correctly. It will match all variables that match any regular expressions and only print each variable the first time it matches. - Fixed the option type for the "--regex" command to by eArgTypeRegularExpression instead of eArgTypeCount llvm-svn: 116178
-
- Oct 08, 2010
-
-
Greg Clayton authored
Added a new SortOrder enumeration and hooked it up to the "image dump symtab" command so we can dump symbol tables in the original order, sorted by address, or sorted by name. llvm-svn: 116049
-
Greg Clayton authored
if the address comes from a data section. Fixed an issue that could occur when looking up a symbol that has a zero byte size where no match would be returned even if there was an exact symbol match. Cleaned up the section dump output and added the section type into the output. llvm-svn: 116017
-
- Oct 02, 2010
-
-
Greg Clayton authored
operator naming stuff. We now get the constructor and destructor names right after passing in the type, and we get the correct conversion operator name after passing in the return type when getting the DeclarationNameInfo. llvm-svn: 115398
-
Greg Clayton authored
right name pools. llvm-svn: 115371
-
- Oct 01, 2010
-
-
Greg Clayton authored
its containing class was parsed, we would crash. llvm-svn: 115343
-
Greg Clayton authored
operators. llvm-svn: 115290
-
Greg Clayton authored
generate from DWARF. llvm-svn: 115268
-
Sean Callanan authored
llvm-svn: 115267
-
Greg Clayton authored
declarations because we lost the original context which was needed to be able to figure out the byte size. llvm-svn: 115223
-
- Sep 30, 2010
-
-
Greg Clayton authored
Added the start of Host specific launch services, though it currently isn't hookup up to anything. We want to be able to launch a process and use the native launch services to launch an app like it would be launched by the user double clicking on the app. We also eventually want to be able to run a command line app in a newly spawned terminal to avoid terminal sharing. Fixed an issue with the new DWARF forward type declaration stuff. A crasher was found that was happening when trying to properly expand the forward declarations. llvm-svn: 115213
-
- Sep 29, 2010
-
-
Greg Clayton authored
This gets us the new clang::CXXRecordDecl improvments in clang so that when we add fields, methods and other things to the clang::CXXRecordDecl, the correct bits are automatically set by clang::CXXRecordDecl itself instead of having SEMA and our lldb_private::ClangASTContext functions that create types for DWARF do it all manually. This allows the clang::ASTContext deep copying of types to work correctly and it means that the expression parser can now evaluate expressions in the context of a class method correctly. Previously when a class was copied from the DWARF generated ASTContext over into the expression ASTContext, we were losing CXXRecordDecl bits in the conversion which caused all classes to think they were at offset zero because the the bools for empty, POD, and others would end up being incorrect. llvm-svn: 115023
-
Greg Clayton authored
adding methods to C++ and objective C classes. In order to make methods, we need the function prototype which means we need the arguments. Parsing these could cause a circular reference that caused an assertion. Added a new typedef for the clang opaque types which are just void pointers: lldb::clang_type_t. This appears in lldb-types.h. This was fixed by enabling struct, union, class, and enum types to only get a forward declaration when we make the clang opaque qual type for these types. When they need to actually be resolved, lldb_private::Type will call a new function in the SymbolFile protocol to resolve a clang type when it is not fully defined (clang::TagDecl::getDefinition() returns NULL). This allows us to be a lot more lazy when parsing clang types and keeps down the amount of data that gets parsed into the ASTContext for each module. Getting the clang type from a "lldb_private::Type" object now takes a boolean that indicates if a forward declaration is ok: clang_type_t lldb_private::Type::GetClangType (bool forward_decl_is_ok); So function prototypes that define parameters that are "const T&" can now just parse the forward declaration for type 'T' and we avoid circular references in the type system. llvm-svn: 115012
-
- Sep 28, 2010
-
-
Johnny Chen authored
Error in object runtime language detection code (spurious '; ') Also replace false by NULL in a place where the compiler expects a pointer instead of a bool. llvm-svn: 114957
-
- Sep 24, 2010
-
-
Johnny Chen authored
llvm-svn: 114739
-
Greg Clayton authored
interface in ClangASTContext. Also added two bool returning functions that indicated if an opaque clang qual type is a CXX class type, and if it is an ObjC class type. Objective C classes now will get their methods added lazily as they are encountered. The reason for this is currently, unlike C++, the DW_TAG_structure_type and owns the ivars, doesn't not also contain the member functions. This means when we parse the objective C class interface we either need to find all functions whose names start with "+[CLASS_NAME" or "-[CLASS_NAME" and add them all to the class, or when we parse each objective C function, we slowly add it to the class interface definition. Since objective C's class doesn't change internal bits according to whether it has certain types of member functions (like C++ does if it has virtual functions, or if it has user ctors/dtors), I currently chose to lazily populate the class when each functions is parsed. Another issue we run into with ObjC method declarations is the "self" and "_cmd" implicit args are not marked as artificial in the DWARF (DW_AT_artifical), so we currently have to look for the parameters by name if we are trying to omit artificial function args if the language of the compile unit is ObjC or ObjC++. llvm-svn: 114722
-
- Sep 23, 2010
-
-
Sean Callanan authored
- Sema is now exported (and there was much rejoicing.) - Storage classes are now centrally defined. Also fixed some bugs that the new LLVM picked up. llvm-svn: 114622
-
Greg Clayton authored
llvm-svn: 114616
-
- Sep 22, 2010
-
-
Greg Clayton authored
Added some comments explaining why we currently have to manually set CXXRecordDecl variables. This is because SEMA is actually calling the accessors that should be built into the CXXRecordDecl class. We have an internal bug tracking this change and will remove the affected work around code when a solution is available. llvm-svn: 114516
-
Greg Clayton authored
or not. llvm-svn: 114512
-
- Sep 21, 2010
-
-
Greg Clayton authored
Fixed an issue with the clang type creation code for C++ classes where we wouldn't set a CXXRecordDecl to be NOT empty if we had base classes that were not empty or had virtual functions. llvm-svn: 114484
-
Sean Callanan authored
for C++ classes. Replaced it with a less hacky approach: - If an expression is defined in the context of a method of class A, then that expression is wrapped as ___clang_class::___clang_expr(void*) { ... } instead of ___clang_expr(void*) { ... }. - ___clang_class is resolved as the type of the target of the "this" pointer in the method the expression is defined in. - When reporting the type of ___clang_class, a method with the signature ___clang_expr(void*) is added to that class, so that Clang doesn't complain about a method being defined without a corresponding declaration. - Whenever the expression gets called, "this" gets looked up, type-checked, and then passed in as the first argument. This required the following changes: - The ABIs were changed to support passing of the "this" pointer as part of trivial calls. - ThreadPlanCallFunction and ClangFunction were changed to support passing of an optional "this" pointer. - ClangUserExpression was extended to perform the wrapping described above. - ClangASTSource was changed to revert the changes required by the hack. - ClangExpressionParser, IRForTarget, and ClangExpressionDeclMap were changed to handle different manglings of ___clang_expr flexibly. This meant no longer searching for a function called ___clang_expr, but rather looking for a function whose name *contains* ___clang_expr. - ClangExpressionParser and ClangExpressionDeclMap now remember whether "this" is required, and know how to look it up as necessary. A few inheritance bugs remain, and I'm trying to resolve these. But it is now possible to use "this" as well as refer implicitly to member variables, when in the proper context. llvm-svn: 114384
-
- Sep 20, 2010
-
-
Caroline Tice authored
Add GetDescription() and __repr__ () methods to most API classes, to allow "print" from inside Python to print out the objects in a more useful manner. llvm-svn: 114321
-
- Sep 18, 2010
-
-
Greg Clayton authored
Fixed an issue with ClangASTContext::GetIndexOfChildMemberWithName() where objective C ivars were not being found correctly if they were the second or higher child. llvm-svn: 114258
-