summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression
Commit message (Collapse)AuthorAgeFilesLines
...
* Removed One Definition Rule warnings because they'reSean Callanan2013-03-081-0/+1
| | | | | | | | noisy when dealing with anonymous structs. <rdar://problem/13246914> llvm-svn: 176738
* Added very lightweight, statically-allocatedSean Callanan2013-03-082-3/+20
| | | | | | | | | | | | counters for a variety of metrics associated with expression parsing. This should give some idea of how much work the expression parser is doing on Clang's behalf, and help with hopefully reducing that load over time. <rdar://problem/13210748> Audit type search/import for expressions llvm-svn: 176714
* Adding support for DW_OP_stack_value in DWARFExpression::EvaluateAndrew Kaylor2013-03-061-0/+12
| | | | llvm-svn: 176578
* Added a little bit of logging to ClangFunction toSean Callanan2013-03-061-1/+29
| | | | | | make it more obvious what's going on. llvm-svn: 176575
* Add support for non-register scalar values in DoMaterializeOneVariable.Andrew Kaylor2013-03-061-120/+173
| | | | llvm-svn: 176574
* <rdar://problem/13338643>Greg Clayton2013-03-041-9/+10
| | | | | | | | | | | | | | | | DWARF with .o files now uses 40-60% less memory! Big fixes include: - Change line table internal representation to contain "file addresses". Since each line table is owned by a compile unit that is owned by a module, it makes address translation into lldb_private::Address easy to do when needed. - Removed linked address members/methods from lldb_private::Section and lldb_private::Address - lldb_private::LineTable can now relink itself using a FileRangeMap to make it easier to re-link line tables in the future - Added ObjectFile::ClearSymtab() so that we can get rid of the object file symbol tables after we parse them once since they are not needed and kept memory allocated for no reason - Moved the m_sections_ap (std::auto_ptr to section list) and m_symtab_ap (std::auto_ptr to the lldb_private::Symtab) out of each of the ObjectFile subclasses and put it into lldb_private::ObjectFile. - Changed how the debug map is parsed and stored to be able to: - Lazily parse the debug map for each object file - not require the address map for a .o file until debug information is linked for a .o file llvm-svn: 176454
* Convert from the C-based LLVM Disassembler shim to the full MC Disassembler ↵Jim Ingham2013-03-021-1/+3
| | | | | | | | | | | | API's. Calculate "can branch" using the MC API's rather than our hand-rolled regex'es. As extra credit, allow setting the disassembly flavor for x86 based architectures to intel or att. <rdar://problem/11319574> <rdar://problem/9329275> llvm-svn: 176392
* Fixed some problems with type deportation:Sean Callanan2013-02-281-2/+3
| | | | | | | | | | | | | | | | | - made sure we tell Clang not to try to complete the type since it can't be completed from its origin any more; and - fixed a silly bug where we tried to forget about the original decl's origins rather than the deported decl's origin. These produced some crashes in ptr_refs, especially under libgmalloc. <rdar://problem/13256150> llvm-svn: 176233
* Add GNU indirect function support in expressions for Linux.Matt Kopec2013-02-271-15/+46
| | | | llvm-svn: 176206
* <rdar://problem/13265297> Greg Clayton2013-02-231-2/+2
| | | | | | StackFrame assumes m_sc is additive, but m_sc can lose its target. So now the SymbolContext::Clear() method takes a bool that indicates if the target should be cleared. Modified all existing code to properly set the bool argument. llvm-svn: 175953
* Fix clang warnings related to python macro redefinition and printf format ↵Matt Kopec2013-02-211-1/+1
| | | | | | specifiers. llvm-svn: 175829
* Change to JITDefault code model for ELF targetsAndrew Kaylor2013-02-211-1/+9
| | | | | | On x86-64 platforms, the small code model assumes that code will be loaded below the 2GB boundary. With the static relocation model, the fact that the expression code is initially loaded (in the LLDB debugger address space) above that boundary causes problems. Switching to the JITDefault code model causes the large code model to be used for 64-bit targets and small code model of 32-bit targets. llvm-svn: 175828
* Hardening in case a thread's frames are missing.Sean Callanan2013-02-211-1/+1
| | | | | | <rdar://problem/13254824> llvm-svn: 175806
* Adding CMake build system to LLDB. Some known issues remain:Daniel Malea2013-02-211-0/+22
| | | | | | | | | | | | | | - generate-vers.pl has to be called by cmake to generate the version number - parallel builds not yet supported; dependency on clang must be explicitly specified Tested on Linux. - Building on Mac will require code-signing logic to be implemented. - Building on Windows will require OS-detection logic and some selective directory inclusion Thanks to Carlo Kok (who originally prepared these CMakefiles for Windows) and Ben Langmuir who ported them to Linux! llvm-svn: 175795
* Fixed a bug where certain vector code didn'tSean Callanan2013-02-211-0/+10
| | | | | | | | | work on i386. Now we let the JIT emit SSE/SSE2 instructions on i386. <rdar://problem/13240476> llvm-svn: 175700
* Change ELF relocation model to staticAndrew Kaylor2013-02-202-1/+8
| | | | llvm-svn: 175671
* Fixes in the IRInterpreter:Sean Callanan2013-02-151-8/+7
| | | | | | | | | | | | - removed an unnecessary variable - fixed an issue where we sometimes wrote too much data into a buffer - made the recognition of variables as "this" a little more conservative <rdar://problem/13216268> llvm-svn: 175318
* Bring lldb up to date with clang revision 175141.Filipe Cabecinhas2013-02-141-0/+1
| | | | llvm-svn: 175213
* Centralized the expression prefixes that are used for both expressions and ↵Greg Clayton2013-02-132-57/+33
| | | | | | utility functions. llvm-svn: 175108
* <rdar://problem/13210494>Greg Clayton2013-02-131-1/+30
| | | | | | | | | | | | | | | | | Parse objective C information as efficiently as possible and without taking dangerous runtime locks. Reworked the way objective C information is parsed by: 1 - don't read all class names up front, this is about 500K of data with names 2 - add a 32 bit hash map that maps a hash of a name to the Class pointer (isa) 3 - Improved name lookups by using the new hash map 4 - split up reading the objc runtime info into dynamic and shared cache since the shared cache only needs to be read once. 5 - When reading all isa values, also get the 32 bit hash instead of the name 6 - Read names lazily now that we don't need all names up front 7 - Allow the hash maps to not be there and still have this function correctly There is dead code in here with all of the various methods I tried. I want to check this in first to not lose any of it in case we need to revert to any of the extra code. I will promptly cleanup and commit again. llvm-svn: 175101
* Made NULL, nil, and Nil use the appropriateSean Callanan2013-02-131-3/+3
| | | | | | | | builtins. <rdar://problem/13204027> llvm-svn: 175091
* Made LLDB build with the latest Clang. This meantSean Callanan2013-02-121-14/+32
| | | | | | | | | changing the ClangASTSource to return a bool instead of returning a list of results. Our testsuite mostly works with this change, but some minor issues may remain both on LLDB's side and on Clang's side. llvm-svn: 174949
* Fixed the way the ClangExpressionDeclMap looksSean Callanan2013-02-121-4/+11
| | | | | | | | | | | | up variables in the current stack frame to avoid mutual recursion between the expression parser and the synthetic child providers. Variables should only be looked up in a very simple way, using no synthetic anything. <rdar://problem/13173454> llvm-svn: 174947
* Reworked the way Process::RunThreadPlan and the ThreadPlanCallFunction ↵Jim Ingham2013-02-091-1/+1
| | | | | | | | | | | interoperate to fix problems where hitting auto-continue signals while running a thread plan would cause us to lose control of the debug session. <rdar://problem/12993641> llvm-svn: 174793
* Address sanitizer found an issue which we filed a bug for: ↵Greg Clayton2013-02-071-0/+3
| | | | | | <rdar://problem/13168967> llvm-svn: 174579
* Correct the definition of ObjC's BOOL in our pre-canned set of defines. ↵Jim Ingham2013-02-011-1/+1
| | | | | | | | | | It's supposed to be "signed char" not "int". <rdar://problem/13131126> llvm-svn: 174209
* Modified the expression parser's class wrapper toSean Callanan2013-02-011-16/+57
| | | | | | | | | | | | | | | | | | | | | | | | | support reporting "this" as a templated class. The expression parser wraps expressions in C++ methods as methods with the signature $__lldb_class::$__lldb_expr(...) and previously responded to clang's queries about $__lldb_class with the type of *this. This didn't work if *this was a ClassTemplateSpecializationDecl because ClassTemplateSpecializationDecls can't be the result of simple name queries. Instead what we do now is respond that $__lldb_class is a typedef and that the target of the typedef is the (potentially templated) type of *this. That is much more robust. Thanks to John McCall for key insights. <rdar://problem/10987183> llvm-svn: 174153
* Add "thread return -x" to unwind the innermost user called expression (if ↵Jim Ingham2013-01-311-2/+2
| | | | | | | | | | you happen to have stopped in it due to a crash.) Make the message when you hit an crash while evaluating an expression a little clearer, and mention "thread return -x". rdar://problem/13110464 llvm-svn: 174095
* <rdar://problem/13107904>Greg Clayton2013-01-291-1/+0
| | | | | | wchar_t causes problem with certain compilers. Removing it for now. llvm-svn: 173823
* Fixed a "wchar_t" typo.Greg Clayton2013-01-291-2/+2
| | | | llvm-svn: 173731
* Always define types from stdint.h so they are always available for use in ↵Greg Clayton2013-01-281-12/+26
| | | | | | | | | | | | | | | | | | | | expressions no matter what debug info you have. Types added are: int8_t uint8_t int16_t uint16_t int32_t uint32_t int64_t uint64_t intptr_t uintptr_t size_t ptrdiff_t whar_t llvm-svn: 173724
* <rdar://problem/13069948>Greg Clayton2013-01-255-56/+52
| | | | | | | | | | | | Major fixed to allow reading files that are over 4GB. The main problems were that the DataExtractor was using 32 bit offsets as a data cursor, and since we mmap all of our object files we could run into cases where if we had a very large core file that was over 4GB, we were running into the 4GB boundary. So I defined a new "lldb::offset_t" which should be used for all file offsets. After making this change, I enabled warnings for data loss and for enexpected implicit conversions temporarily and found a ton of things that I fixed. Any functions that take an index internally, should use "size_t" for any indexes and also should return "size_t" for any sizes of collections. llvm-svn: 173463
* Quick fix to make LLDB TOT work with Clang TOT.Sean Callanan2013-01-221-1/+1
| | | | | | | Avoids an error about an ambiguous constructor call. llvm-svn: 173118
* Extended LLDB to handle blocks capturing 'self'Sean Callanan2013-01-192-7/+92
| | | | | | | | | | | | | | | in an Objective-C class method. Before, errors of the form error: cannot find interface declaration for '$__lldb_objc_class' would appear when running any expression when the current frame is a block that captures 'self' from an Objective-C class method. <rdar://problem/12905561> llvm-svn: 172880
* Made the expression handle variables withSean Callanan2013-01-181-38/+151
| | | | | | | | | | | DW_AT_const_value instead of a location. Also added a testcase covering "frame variable," "expr" using the IR interpreter, and "expr" using the LLVM JIT. <rdar://problem/12978195> llvm-svn: 172848
* ClangExpressionVariable previously was not capable ofSean Callanan2013-01-151-84/+117
| | | | | | | | | | | | | | | | handling multiple clients. However, occasionally an expression must be run in the service of another expression, and in this case two parsers need to access the same list of persistent variables. To allow this, persistent variables now provide state for multiple parsers, and parsers must allocate, access, and deallocate this state by providing their own ID (at the moment, simply the value of the "this" pointer). <rdar://problem/12914539> llvm-svn: 172573
* Separated the "expr --unwind-on-error" behavior into two parts, actual ↵Jim Ingham2013-01-152-22/+44
| | | | | | | | | | | | | | | | errors (i.e. crashes) which continue to be controlled by the --unwind-on-error flag, and --ignore-breakpoint which separately controls behavior when a called function hits a breakpoint. For breakpoints, we don't unwind, we either stop, or ignore the breakpoint, which makes more sense. Also make both these behaviors globally settable through "settings set". Also handle the case where a breakpoint command calls code that ends up re-hitting the breakpoint. We were recursing and crashing. Now we just stop without calling the second command. <rdar://problem/12986644> <rdar://problem/9119325> llvm-svn: 172503
* Once a function has been JIT-compiled once, don'tSean Callanan2013-01-141-0/+2
| | | | | | JIT it again. llvm-svn: 172477
* Added emulation of shifts to the IR interpreter.Sean Callanan2013-01-091-0/+31
| | | | | | <rdar://problem/12978619> llvm-svn: 172013
* Update to reflect API changes in r171367.Chandler Carruth2013-01-021-2/+2
| | | | llvm-svn: 171381
* Rewrite #includes for llvm/Foo.h to llvm/IR/Foo.h as appropriate to reflect theChandler Carruth2013-01-025-20/+20
| | | | | | | | | migration in r171366. I don't know anything about lldb, but a force run of the build bot indicated it would need this patch. I'll try to watch the build bot to get it green. llvm-svn: 171374
* Added support for the modulus operator (%) toSean Callanan2012-12-211-0/+10
| | | | | | | | the IR interpreter. <rdar://problem/12921700> llvm-svn: 170934
* Made LLDB compile with LLVM top-of-tree again.Sean Callanan2012-12-211-7/+5
| | | | | | | | | The results from Clang name lookups changed to be ArrayRefs, so I had to change the way we check for the presence of a result and the way we iterate across results. llvm-svn: 170927
* This patch removes the SymbolFileSymtab support Sean Callanan2012-12-191-1/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | for reporting class types from Objective-C runtime class symbols. Instead, LLDB now queries the Objective-C runtime for class types. We have also added a (minimal) Objective-C runtime type vendor for Objective-C runtime version 1, to prevent regressions when calling class methods in the V1 runtime. Other components of this fix include: - We search the Objective-C runtime in a few more places. - We enable enumeration of all members of Objective-C classes, which Clang does in certain circumstances. - SBTarget::FindFirstType and SBTarget::FindTypes now query the Objective-C runtime as needed. - I fixed several test cases. <rdar://problem/12885034> llvm-svn: 170601
* Removed a possible use of unchecked NULL fromSean Callanan2012-12-181-11/+7
| | | | | | | | the AST result synthesizer's logging. <rdar://problem/12889053> llvm-svn: 170396
* Fix a parser_type to get created with the right AST, and also make variables ↵Greg Clayton2012-12-141-2/+2
| | | | | | made from symbols to not be "void * const", but just "void *". llvm-svn: 170165
* Fixed the IRInterpreter's handling of "this" andSean Callanan2012-12-111-54/+106
| | | | | | | | | | | | | | | | | | | | | | | "self" when those pointers are in registers. Previously in this case the IRInterpreter would handle them just as if the user had typed in "$rdi", which isn't safe because $rdi is passed in through the argument struct. Now we correctly break out all three cases (i.e., normal variables in registers, $reg, and this/self), and handle them in a way that's a little bit easier to read and change. This results in more accurate printing of "this" and "self" pointers all around. I have strengthened the optimized-code test case for Objective-C to ensure that we catch regressions in this area reliably in the future. <rdar://problem/12693963> llvm-svn: 169924
* Fix a few more clang (3.2) warnings on Linux:Daniel Malea2012-12-071-2/+1
| | | | | | | | | | | | | | | | | - remove unused members - add NO_PEDANTIC to selected Makefiles - fix return values (removed NULL as needed) - disable warning about four-char-constants - remove unneeded const from operator*() declaration - add missing lambda function return types - fix printf() with no format string - change sizeof to use a type name instead of variable name - fix Linux ProcessMonitor.cpp to be 32/64 bit friendly - disable warnings emitted by swig-generated C++ code Patch by Matt Kopec! llvm-svn: 169645
* Now that we set ThreadPlanCallFunction to private in the constructor, it is ↵Jim Ingham2012-12-072-6/+2
| | | | | | | | confusing that we set it again in client code after creating the plans. So remove those unnecessary calls. llvm-svn: 169625
* The expression parser will now check the validitySean Callanan2012-12-061-1/+1
| | | | | | | | | | | | of the "self"/"this" pointer for the current stack frame before wrapping expressions in C++ or Objective-C methods. This works around bad debug info where the compiler emits a "this" or "self" but doesn't give any way to find its location. <rdar://problem/12809985> llvm-svn: 169461
OpenPOWER on IntegriCloud