summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/ClangExpressionParser.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Added support for locating and importing functionsSean Callanan2015-05-011-0/+3
| | | | | | | | | | | | (including inline functions) from modules in the expression parser. We now have to retain a reference to the code generator in ClangExpressionDeclMap so that any imported function bodies can be appropriately sent to that code generator. <rdar://problem/19883002> llvm-svn: 236297
* This patch implements several improvements to theSean Callanan2015-04-201-13/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | module-loading support for the expression parser. - It adds support for auto-loading modules referred to by a compile unit. These references are currently in the form of empty translation units. This functionality is gated by the setting target.auto-import-clang-modules (boolean) = false - It improves and corrects support for loading macros from modules, currently by textually pasting all #defines into the user's expression. The improvements center around including only those modules that are relevant to the current context - hand-loaded modules and the modules that are imported from the current compile unit. - It adds an "opt-in" mechanism for all of this functionality. Modules have to be explicitly imported (via @import) or auto-loaded (by enabling the above setting) to enable any of this functionality. It also adds support to the compile unit and symbol file code to deal with empty translation units that indicate module imports, and plumbs this through to the CompileUnit interface. Finally, it makes the following changes to the test suite: - It adds a testcase that verifies that modules are automatically loaded when the appropriate setting is enabled (lang/objc/modules-auto-import); and - It modifies lanb/objc/modules-incomplete to test the case where a module #undefs something that is #defined in another module. <rdar://problem/20299554> llvm-svn: 235313
* Fix type detection for 'char' variablesTamas Berghammer2015-03-311-0/+3
| | | | | | | | | | | | A char can have signed and unsigned encoding but previously lldb always assumed it is signed. This CL adds a logic to detect the encoding of 'char' types based on the default encoding on the target architecture. It fixes variable printing and expression evaluation on architectures where 'char' is signed by default. Differential revision: http://reviews.llvm.org/D8636 llvm-svn: 233682
* Don't #include FormatManager.h from Debugger.hZachary Turner2015-03-031-0/+1
| | | | | | | | Debugger.h is a huge file that gets included everywhere, and FormatManager.h brings in a ton of unnecessary stuff and doesn't even use anything from it in the header. llvm-svn: 231161
* Fix build after clang r226128.Nico Weber2015-01-151-1/+0
| | | | llvm-svn: 226180
* Fix some uninitialized variables in ClangExpressionParser.Zachary Turner2014-12-051-3/+4
| | | | | | Reviewed by: Sean Callanan llvm-svn: 223541
* Changes to the expression parser to actually useSean Callanan2014-12-051-3/+58
| | | | | | the types that we find in Clang modules. llvm-svn: 223436
* 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
* 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
* 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
* Reverse out r219169 related to quote handling.Todd Fiala2014-10-101-6/+0
| | | | | | | | | Addresses pr/21190 (http://llvm.org/bugs/show_bug.cgi?id=21190). r219169 implemented this change list: http://reviews.llvm.org/D5472 for more details. llvm-svn: 219461
* Add "target.expr-parser-compiler-args" setting.Todd Fiala2014-10-061-0/+6
| | | | | | | | | | | | | This setting contains the following: A list containing all the arguments to be passed to the expression parser compiler. This change also ensures quoted arguments are handled appropriately. See http://reviews.llvm.org/D5472 for more details. Change by Tong Shen. llvm-svn: 219169
* Fixed a build problem dueo to changes in theSean Callanan2014-08-301-1/+1
| | | | | | | way ownership of memory buffers is handled in clang's SourceManager. llvm-svn: 216810
* Update for LLVM API change.Rafael Espindola2014-08-271-2/+2
| | | | llvm-svn: 216603
* Initialize LLVM when LLDB is initialized, andSean Callanan2014-08-231-10/+0
| | | | | | | | install a crash handler. <rdar://problem/18083226> llvm-svn: 216309
* Fixes a few more places where we were manually setting the filename.Zachary Turner2014-08-211-1/+1
| | | | llvm-svn: 216247
* Move Host::GetLLDBPath to HostInfo.Zachary Turner2014-08-211-1/+2
| | | | | | | | This continues the effort to get Host code moved over to HostInfo, and removes many more instances of preprocessor defines along the way. llvm-svn: 216195
* Fixed the build broken by the r215046.Hafiz Abid Qadeer2014-08-071-2/+2
| | | | llvm-svn: 215107
* (no commit message)Greg Clayton2014-07-301-1/+1
| | | | llvm-svn: 214319
* remove trailing whitespace + remove some useless commentsSylvestre Ledru2014-07-061-77/+77
| | | | llvm-svn: 212411
* Update lldb code to match the change in clang r212386Sylvestre Ledru2014-07-061-1/+1
| | | | llvm-svn: 212410
* Track changes from clang r212388Alp Toker2014-07-061-3/+3
| | | | llvm-svn: 212391
* Don't truncate the target triple when initializing clang.Zachary Turner2014-06-271-13/+0
| | | | | | | | Reviewed by: Sean Callanan Differential Revision: http://reviews.llvm.org/D4282 llvm-svn: 211968
* Don't set the ABI to apcs-gnu for non-ARM iOS targets (i.e., theSean Callanan2014-06-231-2/+3
| | | | | | | | simulator). <rdar://problem/17399406> llvm-svn: 211536
* Track clang changes from r210764Alp Toker2014-06-121-3/+5
| | | | llvm-svn: 210765
* Update for llvm api change in r209266.Rafael Espindola2014-05-211-3/+6
| | | | llvm-svn: 209303
* Track recent changes in clang internalsAlp Toker2014-05-031-3/+2
| | | | llvm-svn: 207913
* lldb arm64 import.Jason Molenda2014-03-291-3/+7
| | | | | | | | | | | | | | | | These changes were written by Greg Clayton, Jim Ingham, Jason Molenda. It builds cleanly against TOT llvm with xcodebuild. I updated the cmake files by visual inspection but did not try a build. I haven't built these sources on any non-Mac platforms - I don't think this patch adds any code that requires darwin, but please let me know if I missed something. In debugserver, MachProcess.cpp and MachTask.cpp were renamed to MachProcess.mm and MachTask.mm as they picked up some new Objective-C code needed to launch processes when running on iOS. llvm-svn: 205113
* JITed functions can now have debug info and be debugged with debug and ↵Greg Clayton2014-03-241-23/+75
| | | | | | | | | | | | | | | | | | | source info: (lldb) b puts (lldb) expr -g -i0 -- (int)puts("hello") First we will stop at the entry point of the expression before it runs, then we can step over a few times and hit the breakpoint in "puts", then we can continue and finishing stepping and fininsh the expression. Main features: - New ObjectFileJIT class that can be easily created for JIT functions - debug info can now be enabled when parsing expressions - source for any function that is run throught the JIT is now saved in LLDB process specific temp directory and cleaned up on exit - "expr -g --" allows you to single step through your expression function with source code <rdar://problem/16382881> llvm-svn: 204682
* cleanup unreferenced functionsSaleem Abdulrasool2014-03-201-81/+0
| | | | | | | | | | | | | This is a mechanical cleanup of unused functions. In the case where the functions are referenced (in comment form), I've simply commented out the functions. A second pass to clean that up is warranted. The functions which are otherwise unused have been removed. Some of these were introduced in the initial commit and not in use prior to that point! NFC llvm-svn: 204310
* Fix expression parsing (on FreeBSD, at least)Ed Maste2014-03-181-0/+1
| | | | | | | This reverts part of r204112 (Expression: cleanup unused include). It looks like MCJIT.h is required to force MCJIT to be linked. llvm-svn: 204170
* Expression: cleanup unused includeSaleem Abdulrasool2014-03-181-5/+0
| | | | | | | | The standard JIT has been discarded in favour of MCJIT. USE_STANDARD_JIT is no longer defined. Furthermore, the execution engine is now built in IRExecutionUnit. Simply remove inclusion of both JIT headers. llvm-svn: 204112
* Update for clang r203213Ben Langmuir2014-03-071-1/+1
| | | | llvm-svn: 203217
* Replace uses of OwningPtr<T> with std::unique_ptr<T>.Ahmed Charles2014-03-071-2/+2
| | | | llvm-svn: 203200
* update the declaration from llvm::OwningPtr to llvm::IntrusiveRefCntPtr to ↵Sylvestre Ledru2014-02-271-1/+1
| | | | | | match the clang update (r202346) on ASTContext llvm-svn: 202376
* Revert "Track Clang virtualFileSystem change (r201618)"Juergen Ributzka2014-02-201-1/+0
| | | | | | This reverts commit r201671, because the clang changes have been reverted. llvm-svn: 201759
* Track Clang virtualFileSystem change (r201618)Ed Maste2014-02-191-0/+1
| | | | | | | Clang now requires calling CompilerInstance::createVirtualFileSystem before CompilerInstance::createFileManager. llvm-svn: 201671
* Merging the iohandler branch back into main. Greg Clayton2014-01-271-1/+2
| | | | | | | | | | | | The many many benefits include: 1 - Input/Output/Error streams are now handled as real streams not a push style input 2 - auto completion in python embedded interpreter 3 - multi-line input for "script" and "expression" commands now allow you to edit previous/next lines using up and down arrow keys and this makes multi-line input actually a viable thing to use 4 - it is now possible to use curses to drive LLDB (please try the "gui" command) We will need to deal with and fix any buildbot failures and tests and arise now that input/output and error are correctly hooked up in all cases. llvm-svn: 200263
* Fix the build failure of lldb wrt clang recent change. Patch by Todd FialaSylvestre Ledru2013-12-051-1/+0
| | | | llvm-svn: 196483
* <rdar://problem/15367406>Greg Clayton2013-11-041-0/+2
| | | | | | | | Fixed a case where on darwin, after recent compiler changes a few months ago, we could not execute dlopen() in an expression, or use "process load". The issue was some compiler option default values changed. We now override these settings to get the old behavior back. llvm-svn: 194012
* It is no longer necessary to opt out of pretty stack traces.Filip Pizlo2013-11-041-2/+0
| | | | llvm-svn: 193972
* Fix build break: clang no longer supports -ast-dump-xml.Richard Smith2013-10-081-1/+0
| | | | llvm-svn: 192155
* Enable MCJIT on FreeBSDEd Maste2013-08-291-4/+0
| | | | | | | | | | | Testing shows it works for at least trivial cases, while the USE_STANDARD_JIT case does not even work for those. Thus, don't define USE_STANDARD_JIT on FreeBSD. I've left the #if block choosing the appropriate #include in case it's useful for testing. llvm-svn: 189611
* Remove unused include.Rafael Espindola2013-06-261-1/+0
| | | | llvm-svn: 184954
* Fix the lldb build.Rafael Espindola2013-06-261-12/+10
| | | | llvm-svn: 184948
* Fix the build. clang/Driver/OptTable.h was removed.Rafael Espindola2013-06-141-1/+0
| | | | llvm-svn: 183991
* Don't depend on the transitive inclusion of PathV1.hRafael Espindola2013-06-131-0/+1
| | | | llvm-svn: 183946
* Fixed a problem where the dynamic checkers (i.e.,Sean Callanan2013-05-181-17/+20
| | | | | | | | | the Objective-C object checker and the pointer checker) were not always installed into expressions. <rdar://problem/13882566> llvm-svn: 182183
* Fixed a few obvious errors pointed out by the static analyzer.Jim Ingham2013-05-151-1/+1
| | | | llvm-svn: 181911
* After discussing with Chris Lattner, we require C++11, so lets get rid of ↵Greg Clayton2013-04-181-4/+4
| | | | | | the macros and just use C++11. llvm-svn: 179805
OpenPOWER on IntegriCloud