summaryrefslogtreecommitdiffstats
path: root/lldb/test/lang/c
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix all the test case breakages caused by folks writing tests all over the ↵Jim Ingham2012-09-2214-66/+38
| | | | | | | | place that depended explicitly on the output of "break set". Please don't do this sort of thing!!!!! llvm-svn: 164433
* Removed a hack that gives zero-length arrays aSean Callanan2012-07-181-2/+3
| | | | | | | single element. Also modified our struct test case to test this. llvm-svn: 160449
* Found one more place where the OkayToDiscard needs to be consulted.Jim Ingham2012-05-112-3/+176
| | | | | | | Also changed the defaults for SBThread::Step* to not delete extant plans. Also added some test cases to test more complex stepping scenarios. llvm-svn: 156667
* Second batch of adding @dsym_test/@dwarf_test decorators to existing test cases.Johnny Chen2012-04-0613-0/+34
| | | | | | | Plus some minor cleanup of test method names. Third and final batch is coming. llvm-svn: 154197
* Disabling blocks support because of rdar://problem/11024417 - This is ↵Enrico Granata2012-03-301-0/+2
| | | | | | hopefully just a temporary countermeasure llvm-svn: 153758
* <rdar://problem/11113279>Greg Clayton2012-03-261-2/+2
| | | | | | | | | | Fixed type lookups to "do the right thing". Prior to this fix, looking up a type using "foo::bar" would result in a type list that contains all types that had "bar" as a basename unless the symbol file was able to match fully qualified names (which our DWARF parser does not). This fix will allow type matches to be made based on the basename and then have the types that don't match filtered out. Types by name can be fully qualified, or partially qualified with the new "bool exact_match" parameter to the Module::FindTypes() method. This fixes some issue that we discovered with dynamic type resolution as well as improves the overall type lookups in LLDB. llvm-svn: 153482
* Updated the revision of LLVM/Clang used by LLDB.Sean Callanan2012-03-081-2/+0
| | | | | | | | | | | | | | | This takes two important changes: - Calling blocks is now supported. You need to cast their return values, but that works fine. - We now can correctly run JIT-compiled expressions that use floating-point numbers. Also, we have taken a fix that allows us to ignore access control in Objective-C as in C++. llvm-svn: 152286
* Added support for calling blocks from expressions,Sean Callanan2012-03-063-0/+100
| | | | | | | but gated by an #ifdef until we roll LLVM/Clang to bring in the necessary parser support. llvm-svn: 152149
* Improved the type's handling of anonymous structs,Sean Callanan2012-03-023-0/+92
| | | | | | | | | so that the expression parser can look up members of anonymous structs correctly. This meant creating all the proper IndirectFieldDecls in each Record after it has been completely populated with members. llvm-svn: 151868
* I have brought LLDB up-to-date with top of treeSean Callanan2012-02-042-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LLVM/Clang. This brings in several fixes, including: - Improvements in the Just-In-Time compiler's allocation of memory: the JIT now allocates memory in chunks of sections, improving its ability to generate relocations. I have revamped the RecordingMemoryManager to reflect these changes, as well as to get the memory allocation and data copying out fo the ClangExpressionParser code. Jim Grosbach wrote the updates to the JIT on the LLVM side. - A new ExternalASTSource interface to allow LLDB to report accurate structure layout information to Clang. Previously we could only report the sizes of fields, not their offsets. This meant that if data structures included field alignment directives, we could not communicate the necessary alignment to Clang and accesses to the data would fail. Now we can (and I have update the relevant test case). Thanks to Doug Gregor for implementing the Clang side of this fix. - The way Objective-C interfaces are completed by Clang has been made consistent with RecordDecls; with help from Doug Gregor and Greg Clayton I have ensured that this still works. - I have eliminated all local LLVM and Clang patches, committing the ones that are still relevant to LLVM and Clang as needed. I have tested the changes extensively locally, but please let me know if they cause any trouble for you. llvm-svn: 149775
* Convert all python objects in our API to use overload the __str__ methodGreg Clayton2012-02-041-6/+6
| | | | | | | | | | | | | | | | instead of the __repr__. __repr__ is a function that should return an expression that can be used to recreate an python object and we were using it to just return a human readable string. Fixed a crasher when using the new implementation of SBValue::Cast(SBType). Thread hardened lldb::SBValue and lldb::SBWatchpoint and did other general improvements to the API. Fixed a crasher in lldb::SBValue::GetChildMemberWithName() where we didn't correctly handle not having a target. llvm-svn: 149743
* If the expression parser is unable to complete a TagDeclSean Callanan2011-12-085-0/+133
| | | | | | | | | | | | | | in the context in which it was originally found, the expression parser now goes hunting for it in all modules (in the appropriate namespace, if applicable). This means that forward-declared types that exist in another shared library will now be resolved correctly. Added a test case to cover this. The test case also tests "frame variable," which does not have this functionality yet. llvm-svn: 146204
* <rdar://problem/10338439>Greg Clayton2011-11-132-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the actual fix for the above radar where global variables that weren't initialized were not being shown correctly when leaving the DWARF in the .o files. Global variables that aren't intialized have symbols in the .o files that specify they are undefined and external to the .o file, yet document the size of the variable. This allows the compiler to emit a single copy, but makes it harder for our DWARF in .o files with the executable having a debug map because the symbol for the global in the .o file doesn't exist in a section that we can assign a fixed up linked address to, and also the DWARF contains an invalid address in the "DW_OP_addr" location (always zero). This means that the DWARF is incorrect and actually maps all such global varaibles to the first file address in the .o file which is usually the first function. So we can fix this in either of two ways: make a new fake section in the .o file so that we have a file address in the .o file that we can relink, or fix the the variable as it is created in the .o file DWARF parser and actually give it the file address from the executable. Each variable contains a SymbolContextScope, or a single pointer that helps us to recreate where the variables came from (which module, file, function, etc). This context helps us to resolve any file addresses that might be in the location description of the variable by pointing us to which file the file address comes from, so we can just replace the SymbolContextScope and also fix up the location, which we would have had to do for the other case as well, and update the file address. Now globals display correctly. The above changes made it possible to determine if a variable is a global or static variable when parsing DWARF. The DWARF emits a DW_TAG_variable tag for each variable (local, global, or static), yet DWARF provides no way for us to classify these variables into these categories. We can now detect when a variable has a simple address expressions as its location and this will help us classify these correctly. While making the above changes I also noticed that we had two symbol types: eSymbolTypeExtern and eSymbolTypeUndefined which mean essentially the same thing: the symbol is not defined in the current object file. Symbol objects also have a bit that specifies if a symbol is externally visible, so I got rid of the eSymbolTypeExtern symbol type and moved all code locations that used it to use the eSymbolTypeUndefined type. llvm-svn: 144489
* Fixed indentation.Johnny Chen2011-09-151-2/+2
| | | | llvm-svn: 139802
* Redesign of the interaction between Python and frozen objects:Enrico Granata2011-09-061-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - introduced two new classes ValueObjectConstResultChild and ValueObjectConstResultImpl: the first one is a ValueObjectChild obtained from a ValueObjectConstResult, the second is a common implementation backend for VOCR and VOCRCh of method calls meant to read through pointers stored in frozen objects ; now such reads transparently move from host to target as required - as a consequence of the above, removed code that made target-memory copies of expression results in several places throughout LLDB, and also removed code that enabled to recognize an expression result VO as such - introduced a new GetPointeeData() method in ValueObject that lets you read a given amount of objects of type T from a VO representing a T* or T[], and doing dereferences transparently in private layer it returns a DataExtractor ; in public layer it returns an instance of a newly created lldb::SBData - as GetPointeeData() does the right thing for both frozen and non-frozen ValueObject's, reimplemented ReadPointedString() to use it en lieu of doing the raw read itself - introduced a new GetData() method in ValueObject that lets you get a copy of the data that backs the ValueObject (for pointers, this returns the address without any previous dereferencing steps ; for arrays it actually reads the whole chunk of memory) in public layer this returns an SBData, just like GetPointeeData() - introduced a new CreateValueFromData() method in SBValue that lets you create a new SBValue from a chunk of data wrapped in an SBData the limitation to remember for this kind of SBValue is that they have no address: extracting the address-of for these objects (with any of GetAddress(), GetLoadAddress() and AddressOf()) will return invalid values - added several tests to check that "p"-ing objects (STL classes, char* and char[]) will do the right thing Solved a bug where global pointers to global variables were not dereferenced correctly for display New target setting "max-string-summary-length" gives the maximum number of characters to show in a string when summarizing it, instead of the hardcoded 128 Solved a bug where the summary for char[] and char* would not be shown if the ValueObject's were dumped via the "p" command Removed m_pointers_point_to_load_addrs from ValueObject. Introduced a new m_address_type_of_children, which each ValueObject can set to tell the address type of any pointers and/or references it creates. In the current codebase, this is load address most of the time (the only notable exception being file addresses that generate file address children UNLESS we have a live process) Updated help text for summary-string Fixed an issue in STL formatters where std::stlcontainer::iterator would match the container's synthetic children providers Edited the syntax and help for some commands to have proper argument types llvm-svn: 139160
* Restored the version of LLVM that we previouslySean Callanan2011-08-221-2/+2
| | | | | | | | | | | | | | rolled back, and the testcase that the rollback broke. The new LLVM has a new ARM disassembler, which may cause instability. Keeping the old one would force us into a contorted position vis-a-vis the LLVM sources we bring in, so we will address issues on the new one rather than keeping the old one around. llvm-svn: 138284
* Refined the rollback to LLVM, picking up a newerSean Callanan2011-08-191-2/+2
| | | | | | | | | | | | | revision and adding a patch that fixes an AsmParser crash on ARM. One feature that we unfortunately lost (for the moment!) is the ability to cast unknown code symbols to arbitrary function types and put the resulting function pointer in a result variable. This feature will be back, though. llvm-svn: 138036
* Revert the previous addition of expectedFailure decorators, it was a mistake.Johnny Chen2011-08-191-4/+0
| | | | llvm-svn: 138013
* Add expectedFailure decorator.Johnny Chen2011-08-181-0/+4
| | | | | | Failed possibly due to rollback of llvm/clang. llvm-svn: 138011
* Take clang output into account.Johnny Chen2011-08-161-1/+1
| | | | llvm-svn: 137739
* Fix the expect patterns to work for both OSX SnowLeopard and Lion.Johnny Chen2011-08-111-1/+6
| | | | | | On Lion, printf is defined in libsystem_c.dylib. llvm-svn: 137348
* Updated LLVM/Clang to to pick up fixes for aSean Callanan2011-08-111-11/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | problem in which the following cast: – expr (int (*)(const char*, ...))printf - caused a crash. This had several causes: - First, Clang did not support implicit casts of a function of unknown type to a function pointer. - Second, after this was fixed, the Clang AST importer did not support importing function pointer types produced by resolving these casts. These two problems are now resolved, and I have added a test case to verify that they work. I also did a little bit of build-system cleanup because we now use libEnhancedDisassembly.a instead of the .dylib. llvm-svn: 137338
* Fixed a problem that prevented access to membersSean Callanan2011-08-103-0/+80
| | | | | | | | | | | of string literals ("hello"[2]). Also fixed a problem in which empty string literals were not being compiled correctly ((int)printf("") would print garbage). Added a testcase that covers both. llvm-svn: 137247
* Add a negative self.expect() to verify that the bug has been fixed.Johnny Chen2011-08-091-0/+2
| | | | | | rdar://problem/9747668 llvm-svn: 137129
* Cleaned up the SBType.h file to not include internal headers and reorganizedGreg Clayton2011-08-032-11/+11
| | | | | | | | | | | | | | | | | | the SBType implementation classes. Fixed LLDB core and the test suite to not use deprecated SBValue APIs. Added a few new APIs to SBValue: int64_t SBValue::GetValueAsSigned(int64_t fail_value=0); uint64_t SBValue::GetValueAsUnsigned(uint64_t fail_value=0) llvm-svn: 136829
* The lldbtest.TestBase.DebugSBValue(self, val) method call now does not need ↵Johnny Chen2011-07-112-13/+13
| | | | | | | | the frame argument. Only the val (of SBValue type) argument is needed. llvm-svn: 134915
* Add rdar://problem/9747668 info for "target variable g_marked_spot.y" command.Johnny Chen2011-07-081-0/+5
| | | | llvm-svn: 134772
* Add test scenarios for 'target variable' command into TestGlobalVariables.py ↵Johnny Chen2011-07-082-0/+13
| | | | | | file. llvm-svn: 134771
* Made the string representation for a SBValue return what "frame variable" Greg Clayton2011-07-061-1/+1
| | | | | | | | | | | | would return instead of a less than helpful "name: '%s'" description. Make sure that when we ask for the error from a ValueObject object we first update the value if needed. Cleaned up some SB functions to use internal functions and not re-call through the public API when possible. llvm-svn: 134497
* Centralize all of the type name code so that we always strip the leadingGreg Clayton2011-06-301-2/+2
| | | | | | | | "struct ", "class ", and "union " from the start of any type names that are extracted from clang QualType objects. I had to fix test suite cases that were expecting the struct/union/class prefix to be there. llvm-svn: 134132
* Move top level recurse dir to reside under lang/c.Johnny Chen2011-06-272-0/+33
| | | | llvm-svn: 133950
* Move top level inlines dir to reside under lang/c.Johnny Chen2011-06-273-0/+62
| | | | llvm-svn: 133949
* Move struct_types, stepping, and set_values dirs to now reside under lang/c.Johnny Chen2011-06-2510-0/+503
| | | | | | Move stl dir to now reside under lang/cpp. llvm-svn: 133884
* Move global_variables dir to lang/c and foundation dir to lang/objc.Johnny Chen2011-06-255-0/+109
| | | | llvm-svn: 133883
* Move test dirs forward and function_types to now reside under lang/c.Johnny Chen2011-06-259-0/+201
| | | | llvm-svn: 133882
* Move some directories to now reside under lang/c or lang/cpp.Johnny Chen2011-06-257-0/+480
| | | | llvm-svn: 133881
* Move enum_types to now reside under lang/c.Johnny Chen2011-06-253-0/+106
llvm-svn: 133880
OpenPOWER on IntegriCloud