summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix Linux build warnings due to redefinition of macros:Daniel Malea2012-12-051-0/+2
| | | | | | | | | - add new header lldb-python.h to be included before other system headers - short term fix (eventually python dependencies must be cleaned up) Patch by Matt Kopec! llvm-svn: 169341
* Added support for PtrToInt to the IRSean Callanan2012-12-011-0/+38
| | | | | | | | interpreter. <rdar://problem/12657742> llvm-svn: 169063
* Added logging to the code that determinesSean Callanan2012-12-011-1/+26
| | | | | | | whether the current frame is in a C++/Objective-C class or instance method. llvm-svn: 169062
* Resolve printf formatting warnings on Linux:Daniel Malea2012-11-2910-52/+52
| | | | | | | | - use macros from inttypes.h for format strings instead of OS-specific types Patch from Matt Kopec! llvm-svn: 168945
* If Clang is looking for an Objective-C method onSean Callanan2012-11-281-13/+14
| | | | | | | | | a type, and we find it in the origin for that type, don't look anywhere else; just report it. <rdar://problem/12675970> llvm-svn: 168766
* <rdar://problem/12106825>Greg Clayton2012-11-271-18/+62
| | | | | | Allow the expression parser to see more than just data symbols. We now accept any symbol that has an address. We take precautions to only accept symbols by their mangled or demangled names only if the demangled name was not synthesized. If the demangled name is synthesized, then we now mark symbols accordingly and only compare against the mangled original name. llvm-svn: 168668
* Missing “if (log)” on a log printf.Jim Ingham2012-11-261-3/+4
| | | | llvm-svn: 168602
* Fix lldb to compile with top of tree LLVM/clang.Greg Clayton2012-11-161-1/+1
| | | | llvm-svn: 168204
* Update RecordingMemoryManager as per change to RuntimeDyld base classDaniel Malea2012-11-161-2/+2
| | | | | | made in upstream llvm (r168114) llvm-svn: 168184
* In cases where the Objective-C ivar symbols are stripped out,Sean Callanan2012-11-151-3/+14
| | | | | | | | | | | | | | | | | expressions that refer to ivars will not work because Clang emits IR that refers to them to get the ivar offsets. However, it is possible to search the runtime for these values. I have added support for reading the relevant tables to the Objective-C runtime, and extended ClangExpressionDeclMap to query that information if and only if it doesn't find the symbols in the binary. Also added a testcase. <rdar://problem/12628122> llvm-svn: 168018
* <rdar://problem/12586350>Enrico Granata2012-11-081-3/+3
| | | | | | | | | | | | | | This commit does three things: (a) introduces a new notification model for adding/removing/changing modules to a ModuleList, and applies it to the Target's ModuleList, so that we make sure to always trigger the right set of actions whenever modules come and go in a target. Certain spots in the code still need to "manually" notify the Target for several reasons, so this is a work in progress (b) adds a new capability to the Platforms: locating a scripting resources associated to a module. A scripting resource is a Python file that can load commands, formatters, ... and any other action of interest corresponding to the loading of a module. At the moment, this is only implemented on Mac OS X and only for files inside .dSYM bundles - the next step is going to be letting the frameworks themselves hold their scripting resources. Implementors of platforms for other systems are free to implement "the right thing" for their own worlds (c) hooking up items (a) and (b) so that targets auto-load the scripting resources as the corresponding modules get loaded in a target. This has a few caveats at the moment: - the user needs to manually add the .py file to the dSYM (soon, it will also work in the framework itself) - if two modules with the same name show up during the lifetime of an LLDB session, the second one won't be able to load its scripting resource, but will otherwise work just fine llvm-svn: 167569
* Fixed a problem where we mistook normal resultSean Callanan2012-11-021-2/+2
| | | | | | | variables for guard variables because the current class or method named contained the letters "GV". llvm-svn: 167327
* Extra safeguards to ensure that we never querySean Callanan2012-11-021-120/+156
| | | | | | | | | | | | | | | | | the runtime if we have complete debug information for a class. Also made the Objective-C language runtime return NULL when asked for the complete debug information (i.e., information from DWARF, not information from the runtime) if that information isn't present. It used to return a non-authoritative version, which made it hard for clients to determine whether complete debug information was available. <rdar://problem/12608895> llvm-svn: 167299
* Carlo Kok was compiling with MSVC, caught some more issues. Greg Clayton2012-10-311-1/+1
| | | | llvm-svn: 167168
* Make blocks that capture their containing method's object pointer look like ↵Jim Ingham2012-10-302-71/+178
| | | | | | | | | | methods of the containing class so that direct ivar access will work in the expression parser. <rdar://problem/9797999> llvm-svn: 167061
* Path from Ashok Thirumurthi:Greg Clayton2012-10-302-3/+12
| | | | | | | | | | | | The attached patch adds eValueTypeVector to lldb_private::Value. The nested struct Vector is patterned after RegisterValue::m_data.buffer. This change to Value allows ClangExpressionDeclMap::LookupDecl to return vector register data for consumption by InterpreterStackFrame::ResolveValue. Note that ResolveValue was tweaked slightly to allocate enough memory for vector registers. An immediate result of this patch is that "expr $xmm0" generates the same results on Linux as on the Mac, which is good enough for TestRegisters.py. In addition, the log of m_memory.PrintData(data_region.m_base, data_region.m_extent) shows that the register content has been resolved successfully. On the other hand, the output is glaringly empty: runCmd: expr $xmm0 output: (unsigned char __attribute__((ext_vector_type(16)))) $0 = {} Expecting sub string: vector_type Matched llvm-svn: 167033
* Patch from Matt Kopec:Greg Clayton2012-10-301-1/+1
| | | | | | This patch switches support on Linux from JIT to MCJIT. llvm-svn: 167026
* This is the first phase of supporting the DW_AT_object_pointer tag. I ↵Jim Ingham2012-10-271-1/+2
| | | | | | | | | | expanded the decl metadata so it could hold this information, and then used it to look up unfound names in the object pointer if it exists. This gets "frame var" to work for unqualified references to ivars captured in blocks. But the expression parser is ignoring this information still. llvm-svn: 166860
* Cleanup some variable names to indicate auto pointers and also manager the ↵Greg Clayton2012-10-241-18/+15
| | | | | | llvm::Module memory more correctly. llvm-svn: 166598
* Added support for "bool", "true", and "false" toSean Callanan2012-10-171-0/+2
| | | | | | | the expression parser (also wchar_t) and added a test case. llvm-svn: 166131
* Add the ability to set timeout & "run all threads" options both from the ↵Jim Ingham2012-10-162-12/+26
| | | | | | | | | | "expr" command and from the SB API's that evaluate expressions. <rdar://problem/12457211> llvm-svn: 166062
* Bunch of cleanups for warnings found by the llvm static analyzer.Jim Ingham2012-10-124-12/+21
| | | | llvm-svn: 165808
* Fixed the IR interaction layer to deal with aSean Callanan2012-10-113-16/+11
| | | | | | change in the LLDB target data API. llvm-svn: 165754
* Add in the first iteration of support for llvm/clang/lldb to allow variable ↵Micah Villmow2012-10-113-11/+17
| | | | | | per address space pointer sizes to be optimized correctly. llvm-svn: 165726
* Move TargetData to DataLayout.Micah Villmow2012-10-082-8/+8
| | | | llvm-svn: 165396
* Ran the sources through the compiler with -Wshadow warningsJason Molenda2012-10-041-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | enabled after we'd found a few bugs that were caused by shadowed local variables; the most important issue this turned up was a common mistake of trying to obtain a mutex lock for the scope of a code block by doing Mutex::Locker(m_map_mutex); This doesn't assign the lock object to a local variable; it is a temporary that has its dtor called immediately. Instead, Mutex::Locker locker(m_map_mutex); does what is intended. For some reason -Wshadow happened to highlight these as shadowed variables. I also fixed a few obivous and easy shadowed variable issues across the code base but there are a couple dozen more that should be fixed when someone has a free minute. <rdar://problem/12437585> llvm-svn: 165269
* Removed some debugging cruft.Sean Callanan2012-09-241-3/+0
| | | | llvm-svn: 164572
* Brought LLDB top-of-tree into sync with LLVM/ClangSean Callanan2012-09-245-65/+171
| | | | | | | | | | | | | top-of-tree. Removed all local patches and llvm.zip. The intent is that fron now on top-of-tree will always build against LLVM/Clang top-of-tree, and that problems building will be resolved as they occur. Stable release branches of LLDB can be constructed as needed and linked to specific release branches of LLVM/Clang. llvm-svn: 164563
* Fixed a problem where persistent variables didSean Callanan2012-09-202-18/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | not correctly store the contents of Objective-C classes. This was due to a combination of factors: 1) Types were only being completed if we were looking inside them for specific ivars (using FindExternalVisibleDeclsByName). We now look the complete type up at every FindExternalLexicalDecls. 2) Even if the types were completed properly, ValueObjectConstResult overrode the type of every ValueObject using the complete type for its class from the debug information. Superclasses of complete classes are not guaranteed to be complete. Although "frame variable" uses the debug information, the expression parser does now piece together complete types at every level (as described in Bullet 1), so I provided a way for the expression parser to prevent overriding. 3) Type sizes were being miscomputed by ClangASTContext. It ignored the ISA pointer and only counted fields. We now correctly count the ISA in the size of an object. <rdar://problem/12315386> llvm-svn: 164333
* Show the size of what we are dematerializing in the output log for "lldb expr".Greg Clayton2012-09-201-1/+1
| | | | llvm-svn: 164327
* Stop using the "%z" size_t modifier and cast all size_t values to uint64_t. ↵Greg Clayton2012-09-182-3/+3
| | | | | | Some platforms don't support this modification. llvm-svn: 164148
* Making ClangExpression hold on to a WP to the Process instead of a SP. This ↵Enrico Granata2012-09-183-14/+30
| | | | | | fix should enable us to have per-process maps of ClangExpressions without fear of keeping the process alive forever llvm-svn: 164082
* Fixed the #defines for YES and NO, and centralizedSean Callanan2012-09-131-33/+35
| | | | | | | | | them in one place rather than having them replicated across all the potential function wrappers. <rdar://problem/12293880> llvm-svn: 163857
* This patch is part of ongoing work to extract typeSean Callanan2012-09-111-136/+259
| | | | | | | | | | | | | | | | | | | | | | | | | | | information from the Objective-C runtime. This patch takes the old AppleObjCSymbolVendor and replaces it with an AppleObjCTypeVendor, which is much more lightweight. Specifically, the SymbolVendor needs to pretend that there is a backing symbol file for the Types it vends, whereas a TypeVendor only vends bare ClangASTTypes. These ClangASTTypes only need to exist in an ASTContext. The ClangASTSource now falls back to the runtime's TypeVendor (if one exists) if the debug information doesn't find a complete type for a particular Objective-C interface. The runtime's TypeVendor maintains an ASTContext full of types it knows about, and re-uses the ISA-based type query information used by the ValueObjects. Currently, the runtime's TypeVendor doesn't provide useful answers because we haven't yet implemented a way to iterate across all ISAs contained in the target process's runtime. That's the next step. llvm-svn: 163651
* Some more typing-related fixes.Filipe Cabecinhas2012-09-112-2/+2
| | | | llvm-svn: 163641
* Disable the "pretty stack trace" signal handler,Sean Callanan2012-09-061-0/+2
| | | | | | | which can conflict with accurate crash reporting in multithreaded contexts. llvm-svn: 163282
* <rdar://problem/11757916>Greg Clayton2012-08-292-0/+2
| | | | | | | | | | | | Make breakpoint setting by file and line much more efficient by only looking for inlined breakpoint locations if we are setting a breakpoint in anything but a source implementation file. Implementing this complex for a many reasons. Turns out that parsing compile units lazily had some issues with respect to how we need to do things with DWARF in .o files. So the fixes in the checkin for this makes these changes: - Add a new setting called "target.inline-breakpoint-strategy" which can be set to "never", "always", or "headers". "never" will never try and set any inlined breakpoints (fastest). "always" always looks for inlined breakpoint locations (slowest, but most accurate). "headers", which is the default setting, will only look for inlined breakpoint locations if the breakpoint is set in what are consudered to be header files, which is realy defined as "not in an implementation source file". - modify the breakpoint setting by file and line to check the current "target.inline-breakpoint-strategy" setting and act accordingly - Modify compile units to be able to get their language and other info lazily. This allows us to create compile units from the debug map and not have to fill all of the details in, and then lazily discover this information as we go on debuggging. This is needed to avoid parsing all .o files when setting breakpoints in implementation only files (no inlines). Otherwise we would need to parse the .o file, the object file (mach-o in our case) and the symbol file (DWARF in the object file) just to see what the compile unit was. - modify the "SymbolFileDWARFDebugMap" to subclass lldb_private::Module so that the virtual "GetObjectFile()" and "GetSymbolVendor()" functions can be intercepted when the .o file contenst are later lazilly needed. Prior to this fix, when we first instantiated the "SymbolFileDWARFDebugMap" class, we would also make modules, object files and symbol files for every .o file in the debug map because we needed to fix up the sections in the .o files with information that is in the executable debug map. Now we lazily do this in the DebugMapModule::GetObjectFile() Cleaned up header includes a bit as well. llvm-svn: 162860
* Fix missing braces from the python-GIL merge.Johnny Chen2012-08-181-1/+4
| | | | llvm-svn: 162162
* Merge python-GIL bracnh (by filcab) back into trunk!Johnny Chen2012-08-181-1/+4
| | | | llvm-svn: 162161
* Fixed a crash when incomplete expression variablesSean Callanan2012-08-161-0/+6
| | | | | | | | are materialized. <rdar://problem/12105013> llvm-svn: 162046
* <rdar://problem/11791234>Greg Clayton2012-08-111-1/+6
| | | | | | Remember to copy the address byte size and the byte order when copying data into a DWARF location object, or things will go wrong. llvm-svn: 161721
* Add explicit casts to bool in "shared pointer is valid" constructs that ↵Jim Ingham2012-08-112-2/+2
| | | | | | return bool. llvm-svn: 161719
* <rdar://problem/11791234>Greg Clayton2012-08-101-0/+7
| | | | | | Fixed an issue that could cause references the shared data for an object file to stay around longer than intended and could cause memory bloat when debugging multiple times. llvm-svn: 161716
* Removed explicit NULL checks for shared pointersSean Callanan2012-08-095-6/+6
| | | | | | | | | and instead made us use implicit casts to bool. This generated a warning in C++11. <rdar://problem/11930775> llvm-svn: 161559
* <rdar://problem/12027563> Making sure that some class of stop-hook commands ↵Enrico Granata2012-08-031-7/+17
| | | | | | that involve po'ing objects do not cause an endless recursion llvm-svn: 161271
* Instructions generated by a disassembler can nowSean Callanan2012-08-011-1/+1
| | | | | | | | | | | | | | | | | | keep a shared pointer to their disassembler. This is important for the LLVM-C disassembler because it needs to lock its parent in order to disassemble itself. This means that every interface that returned a Disassembler* needs to return a DisassemblerSP, so that the instructions and any external owners share the same reference count on the object. I changed all clients to use this shared pointer, which also plugged a few leaks. <rdar://problem/12002822> llvm-svn: 161123
* Fixed the expression parser to ignore C++ andSean Callanan2012-07-281-2/+18
| | | | | | | | | | Objective-C method names when looking for functions in the top level or a namespace. Method names should only be found via FindExternalLexicalDecls. <rdar://problem/11711679> llvm-svn: 160907
* Changed the IRForTarget pass to ensure that allSean Callanan2012-07-271-0/+5
| | | | | | | | | | | | | | sel_getName() calls are generated for all Objective-C selectors before static literals are moved to the static allocation. This prevents errors of the form Internal error [IRForTarget]: Couldn't change a static reference to an Objective-C selector to a dynamic reference <rdar://problem/11331906> llvm-svn: 160887
* Added a fix that allows newly-constructed objectsSean Callanan2012-07-211-0/+55
| | | | | | | | | | | | | | to returned by expressions, by removing the __cxa_atexit call that would normally cause these objects to be destroyed. This also prevents many errors of the form Couldn't rewrite one of the arguments of a function call error: Couldn't materialize struct: Structure hasn't been laid out yet <rdar://problem/11309402> llvm-svn: 160596
* <rdar://problem/10998370>Greg Clayton2012-07-181-9/+17
| | | | | | | | Improved the error message when we can find a function in the current program by printing the demangled name. Also added the ability to create lldb_private::Mangled instances with a ConstString when we already have a ConstString for a mangled or demangled name. Also added the ability to call SetValue with a ConstString and also without a boolean to indicate if the string is mangled where we will now auto-detect if the string is mangled. llvm-svn: 160450
OpenPOWER on IntegriCloud