summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression
Commit message (Collapse)AuthorAgeFilesLines
...
* Reduce header footprint of Target.hZachary Turner2015-03-032-0/+2
| | | | | | | | | | | | This continues the effort to reduce header footprint and improve build speed by removing clang and other unnecessary headers from Target.h. In one case, some headers were included solely for the purpose of declaring a nested class in Target, which was not needed by anybody outside the class. In this case the definition and implementation of the nested class were isolated in the .cpp file so the header could be removed. llvm-svn: 231107
* Don't #include ClangASTContext.h from Module.hZachary Turner2015-03-031-0/+1
| | | | | | | | | | | | This is part of a larger effort to reduce header file footprints. Combined, these patches reduce the build time of LLDB locally by over 30%. However, they touch many files and make many changes, so will be submitted in small incremental pieces. Reviewed By: Greg Clayton Differential Revision: http://reviews.llvm.org/D8022 llvm-svn: 231097
* Fixed an infinite recursion bug that could happen when using python ↵Greg Clayton2015-02-271-1/+1
| | | | | | | | operating system plug-ins where we would ask the operating system plug-in to update its threads and this would cause the plugin to run an expression which would eventually run IRForTarget::CreateResultVariable() which would try to get the selected thread and cause re-entrant bug. <rdar://problem/19924734> llvm-svn: 230711
* Update for Clang API change in r230123 -- lookup_result was alwaysChandler Carruth2015-02-211-1/+1
| | | | | | | | const, there was never a need for lookup_const_result. Now that vestigal type is gone, so switch LLDB to lookup_result and to use the DeclContextLookupResult rather than the Const variant. llvm-svn: 230126
* Fix build after r229094: replace llvm/PassManager.h -> ↵Ilia K2015-02-131-1/+1
| | | | | | llvm/IR/LegacyPassManager.h llvm-svn: 229100
* Make a more complete fix for always supplying an execution context when ↵Greg Clayton2015-02-121-4/+16
| | | | | | | | | | getting byte sizes from types. There was a test in the test suite that was triggering the backtrace logging output that requested that the client pass an execution context. Sometimes we need the process for Objective C types because our static notion of the type might not align with the reality when being run in a live runtime. Switched from an "ExecutionContext *" to an "ExecutionContextScope *" for greater ease of use. llvm-svn: 228892
* Don't crash when evaluating a DWARF expression has a DW_OP_bra with nothing ↵Greg Clayton2015-02-101-0/+7
| | | | | | | | on the value stack. <rdar://problem/18919125> llvm-svn: 228729
* Get rid of Debugger::FormatPrompt() and replace it with the new FormatEntity ↵Greg Clayton2015-02-041-22/+2
| | | | | | | | | | | | | | | | | | | class. Why? Debugger::FormatPrompt() would run through the format prompt every time and parse it and emit it piece by piece. It also did formatting differently depending on which key/value pair it was parsing. The new code improves on this with the following features: 1 - Allow format strings to be parsed into a FormatEntity::Entry which can contain multiple child FormatEntity::Entry objects. This FormatEntity::Entry is a parsed version of what was previously always done in Debugger::FormatPrompt() so it is more efficient to emit formatted strings using the new parsed FormatEntity::Entry. 2 - Allows errors in format strings to be shown immediately when setting the settings (frame-format, thread-format, disassembly-format 3 - Allows auto completion by implementing a new OptionValueFormatEntity and switching frame-format, thread-format, and disassembly-format settings over to using it. 4 - The FormatEntity::Entry for each of the frame-format, thread-format, disassembly-format settings only replaces the old one if the format parses correctly 5 - Combines all consecutive string values together for efficient output. This means all "${ansi.*}" keys and all desensitized characters like "\n" "\t" "\0721" "\x23" will get combined with their previous strings 6 - ${*.script:} (like "${var.script:mymodule.my_var_function}") have all been switched over to use ${script.*:} "${script.var:mymodule.my_var_function}") to make the format easier to parse as I don't believe anyone was using these format string power user features. 7 - All key values pairs are defined in simple C arrays of entries so it is much easier to add new entries. These changes pave the way for subsequent modifications where we can modify formats to do more (like control the width of value strings can do more and add more functionality more easily like string formatting to control the width, printf formats and more). llvm-svn: 228207
* Fixed bugs in the multi-threaded access in HostInfoBase. Prior to this fix, ↵Greg Clayton2015-02-031-2/+4
| | | | | | | | | | static bool variables were used but this is not sufficient. We now use std::call_once in all places where the previous static bool code was used to try to implement thread safety. This was causing code that opened multiple targets to try and get a path to debugserver from the GDB remote communication class, and it would get the LLDB path and some instances would return empty strings and it would cause debugserver to not be found. <rdar://problem/18756927> llvm-svn: 227935
* Preparatory infrastructural work to support dynamically determining sizes of ↵Enrico Granata2015-01-282-5/+5
| | | | | | | | | | | | ObjC types via the runtime This is necessary because the byte size of an ObjC class type is not reliably statically knowable (e.g. because superclasses sit deep in frameworks that we have no debug info for) The lack of reliable size info is a problem when trying to freeze-dry an ObjC instance (not the pointer, the pointee) This commit lays the foundation for having language runtimes help in figuring out byte sizes, and having ClangASTType ask for runtime help No feature change as no runtime actually implements the logic, and nowhere is an ExecutionContext passed in yet llvm-svn: 227274
* The MCJIT doesn't seem to call getPointerForNamedFunction from the ↵Jim Ingham2015-01-271-0/+141
| | | | | | | | | | | | | MemoryManager anymore, switching to getSymbolAddress, which it does call, and implementing it so that we once again look up external symbols in the JIT. Also juked the error reporting from the JIT a little bit. This resolves: http://llvm.org/bugs/show_bug.cgi?id=22314 llvm-svn: 227217
* Fix the -*-version-min option to not try and use the current OS version for ↵Greg Clayton2015-01-221-1/+1
| | | | | | iOS and the simulator since llvm/clang will assert and kill LLDB. llvm-svn: 226846
* Update ExpressionSourceCode::GetText() to match theJason Molenda2015-01-221-1/+1
| | | | | | | | name of the iOS simulator platform which was changed in r181631. <rdar://problem/19200084> llvm-svn: 226789
* Expression evaluation for functions with unknown signatures on works byKate Stone2015-01-211-0/+4
| | | | | | | | | | | | | | | inferring the function signature. This works well where the ABI doesn't distinguish between variadic and fixed argument lists, but on arm64 the calling conventions differ. The default assumption works for fixed argument lists, but variadic functions require explicit prototypes to be called. By far the most common case where this is an issue is when attempting to use printf(). This change augments the default expression prefix to include a working variadic prototype for the function. <rdar://problem/19024779> llvm-svn: 226744
* Fix build after clang r226128.Nico Weber2015-01-151-1/+0
| | | | llvm-svn: 226180
* In commit clang r226096, DefinitionRequired has been removed. Do the same in ↵Sylvestre Ledru2015-01-152-4/+4
| | | | | | lldb implementation llvm-svn: 226162
* Fix issues with LLDB's interpreter and MS ABI guard variables.Zachary Turner2015-01-091-15/+7
| | | | | | | | | | | MS ABI guard variables end with @4IA, so this patch teaches the interpreter about that. Additionally, there was an issue with TurnGuardLoadIntoZero which was causing some guard uses of a variable to be missed. This fixes that by calling Instruction::replaceAllUsesWith() instead of trying to replicate that function. llvm-svn: 225547
* Added support to the expression parser for findingSean Callanan2014-12-101-20/+162
| | | | | | | | | | | Objective-C types and enums in modules. We now have a three-stage fallback when looking for methods and properties: first the DWARF, second the modules, third the runtime. <rdar://problem/18782288> llvm-svn: 223939
* ClangFunction: Fix destruction order of parser and execution unitDuncan P. N. Exon Smith2014-12-101-1/+1
| | | | | | | | | | | | Fix PR21802 by correcting the destruction order of `ClangExpressionParser` and `IRExecutionUnit` in `ClangFunction`. The former has hooks into the latter -- i.e., `clang::CGDebugInfo` points at the `LLVMContext` -- so it needs to be torn down first. This was exposed by r223802 in LLVM, which started doing work in the `CGDebugInfo` teardown. llvm-svn: 223916
* Fix compilation failures resulting from the llvm Metadata refactor.Zachary Turner2014-12-091-11/+12
| | | | | | Patch by Duncan P. N. Exon Smith llvm-svn: 223844
* Add the ability for an SBValue to create a persisted version of itself.Enrico Granata2014-12-081-0/+11
| | | | | | | | | | | | Such a persisted version is equivalent to evaluating the value via the expression evaluator, and holding on to the $n result of the expression, except this API can be used on SBValues that do not obviously come from an expression (e.g. are the result of a memory lookup) Expose this via SBValue::Persist() in our public API layer, and ValueObject::Persist() in the lldb_private layer Includes testcase Fixes rdar://19136664 llvm-svn: 223711
* Add new-lines after module compiler errors soSean Callanan2014-12-061-0/+1
| | | | | | they are readable. llvm-svn: 223557
* Fix some uninitialized variables in ClangExpressionParser.Zachary Turner2014-12-051-3/+4
| | | | | | Reviewed by: Sean Callanan llvm-svn: 223541
* Fix compilation errors after clang modules checkin.Zachary Turner2014-12-051-2/+3
| | | | llvm-svn: 223484
* Added CMake support so all the Clang modules codeSean Callanan2014-12-051-0/+1
| | | | | | | will at least be built by non-OS X builders. This should head off some build breakage at the pass. llvm-svn: 223437
* Changes to the expression parser to actually useSean Callanan2014-12-052-3/+81
| | | | | | the types that we find in Clang modules. llvm-svn: 223436
* Additional changes required by r223433.Sean Callanan2014-12-051-34/+27
| | | | llvm-svn: 223435
* This is the meat of the code to add Clang modulesSean Callanan2014-12-051-0/+370
| | | | | | | | | | | | | | support to LLDB. It includes the following: - Changed DeclVendor to TypeVendor. - Made the ObjCLanguageRuntime provide a DeclVendor rather than a TypeVendor. - Changed the consumers of TypeVendors to use DeclVendors instead. - Provided a few convenience functions on ClangASTContext to make that easier. llvm-svn: 223433
* Revert "Fix a build breakage. Looks like the LLVM side of this change has ↵David Majnemer2014-12-041-1/+1
| | | | | | | | | been reverted" This reverts commit r223375. We need to use unique_ptr to build with LLVM r223183. llvm-svn: 223388
* Fix a build breakage. Looks like the LLVM side of this change has been revertedEnrico Granata2014-12-041-1/+1
| | | | llvm-svn: 223375
* Update setMCJITMemoryManager call to keep in line with llvm r223183.Jason Molenda2014-12-031-1/+1
| | | | | | Patch from Ryan Goodfellow. llvm-svn: 223196
* Revert "Update for LLVM API change in r221024"Duncan P. N. Exon Smith2014-11-122-2/+2
| | | | | | This reverts commit r221073 to match upstream revert in r221711. llvm-svn: 221749
* Made the expression parser more resilient againstSean Callanan2014-11-111-0/+21
| | | | | | | | | being asked about symbols it doesn't know about. If it's asked about a symbol by mangled name and it finds nothing, then it will try again with the demangled base name. llvm-svn: 221660
* Fix comments to match the current reality.Greg Clayton2014-11-101-2/+2
| | | | llvm-svn: 221633
* Fix selectors not being objc-uniquified in the expression parser after a ↵Greg Clayton2014-11-101-1/+1
| | | | | | recent renaming in clang (clang change for revision 221451). This broke all objective C expressions in LLDB. llvm-svn: 221632
* Fix LLDB build as a result of upstream LLVM changes.Zachary Turner2014-11-051-2/+1
| | | | llvm-svn: 221378
* Update for LLVM API change in r221024Ed Maste2014-11-022-2/+2
| | | | llvm-svn: 221073
* Don't allow the expression parser to magicallySean Callanan2014-10-202-2/+0
| | | | | | | | | look through 'self' at its ivars. It produces surprising results. <rdar://problem/18698760> llvm-svn: 220220
* Don't use mkstemp, as it doesn't exist on Windows.Zachary Turner2014-10-201-5/+6
| | | | | | | Differential Revision: http://reviews.llvm.org/D5849 Reviewed by: Jason Molenda llvm-svn: 220218
* Fixed the expression parser to handle cases whereSean Callanan2014-10-171-1/+1
| | | | | | | | | GetValueForVariableExpressionPath returns NULL and doesn't set an error. <rdar://problem/18682916> llvm-svn: 220070
* Change a use of mktemp() to mkstemp() for better security.Jason Molenda2014-10-161-4/+4
| | | | | | | | We have two more uses of mktemp still in the source base but they'll take a little more consideration. clang static analyzer fixit. llvm-svn: 219983
* Only call RemovePersistentVariable on expr_result if that sharedJason Molenda2014-10-161-1/+1
| | | | | | pointer contains something. llvm-svn: 219966
* Another logical-or vrs. bitwise-or mixup in ClangUserExpression.Jason Molenda2014-10-161-4/+4
| | | | | | clang unreachable code warning. llvm-svn: 219918
* A series of bit-flag values should be bitwise-or'ed not logical-or'ed.Jason Molenda2014-10-161-4/+4
| | | | | | clang unreachable code warning. llvm-svn: 219916
* Ryan Brown's patch to handle DW_OP_call_frame_cfa addressesJason Molenda2014-10-161-1/+1
| | | | | | | as load addreses instead of host addresses. http://reviews.llvm.org/D5735 llvm-svn: 219896
* Ah, accidentally committed a patch I didn't mean to. Jason Molenda2014-10-161-1/+1
| | | | llvm-svn: 219888
* It's possible for long_options[long_options_index].definition to be nullJason Molenda2014-10-161-1/+1
| | | | | | | | from the previous for() loop - check that it is non-null before trying to deref it. clang static analyzer fixit. llvm-svn: 219887
* Check that process is non-null before calling a method in it.Jason Molenda2014-10-161-1/+1
| | | | | | clang static analyzer fixit. llvm-svn: 219886
* Rework the way we pass "run multiple command" options to the various API's thatJim Ingham2014-10-111-0/+2
| | | | | | | | | | | | | | | do that (RunCommandInterpreter, HandleCommands, HandleCommandsFromFile) to gather the options into an options class. Also expose that to the SB API's. Change the way the "-o" options to the lldb driver are processed so: 1) They are run synchronously - didn't really make any sense to run the asynchronously. 2) The stop on error 3) "quit" in one of the -o commands will not quit lldb - not the command interpreter that was running the -o commands. I added an entry to the run options to stop-on-crash, but I haven't implemented that yet. llvm-svn: 219553
* Add a new disassembly-format specification so that the disassemblerJason Molenda2014-10-101-1/+10
| | | | | | | | | | | | | | | | | | | | | output style can be customized. Change the built-in default to be more similar to gdb's disassembly formatting. The disassembly-format for a gdb-like output is ${addr-file-or-load} <${function.name-without-args}${function.concrete-only-addr-offset-no-padding}>: The disassembly-format for the lldb style output is {${function.initial-function}{${module.file.basename}`}{${function.name-without-args}}:\n}{${function.changed}\n{${module.file.basename}`}{${function.name-without-args}}:\n}{${current-pc-arrow} }{${addr-file-or-load}}: The two backticks in the lldb style formatter triggers the sub-expression evaluation in CommandInterpreter::PreprocessCommand() so you can't use that one as-is ... changing to use ' characters instead of ` would work around that. <rdar://problem/9885398> llvm-svn: 219544
OpenPOWER on IntegriCloud