#
a9a764e6 |
| 30-Sep-2010 |
Johnny Chen <johnny.chen@apple.com> |
Fixed 'expr' help message.
llvm-svn: 115185
|
#
6c68fb45 |
| 30-Sep-2010 |
Jim Ingham <jingham@apple.com> |
Add "-o" option to "expression" which prints the object description if available.
llvm-svn: 115115
|
Revision tags: llvmorg-2.8.0-rc2 |
|
#
a7015092 |
| 18-Sep-2010 |
Greg Clayton <gclayton@apple.com> |
Fixed the way set/show variables were being accessed to being natively accessed by the objects that own the settings. The previous approach wasn't very usable and made for a lot of unnecessary code
Fixed the way set/show variables were being accessed to being natively accessed by the objects that own the settings. The previous approach wasn't very usable and made for a lot of unnecessary code just to access variables that were already owned by the objects.
While I fixed those things, I saw that CommandObject objects should really have a reference to their command interpreter so they can access the terminal with if they want to output usaage. Fixed up all CommandObjects to take an interpreter and cleaned up the API to not need the interpreter to be passed in.
Fixed the disassemble command to output the usage if no options are passed down and arguments are passed (all disassebmle variants take options, there are no "args only").
llvm-svn: 114252
show more ...
|
#
9e6ed53e |
| 13-Sep-2010 |
Sean Callanan <scallanan@apple.com> |
Bugfixes to the expression parser. Fixes include:
- If you put a semicolon at the end of an expression, this no longer causes the expression parser to error out. This was a two-part fix: fi
Bugfixes to the expression parser. Fixes include:
- If you put a semicolon at the end of an expression, this no longer causes the expression parser to error out. This was a two-part fix: first, ClangExpressionDeclMap::Materialize now handles an empty struct (such as when there is no return value); second, ASTResultSynthesizer walks backward from the end of the ASTs until it reaches something that's not a NullStmt.
- ClangExpressionVariable now properly byte-swaps when printing itself.
- ClangUtilityFunction now cleans up after itself when it's done compiling itself.
- Utility functions can now use external functions just like user expressions.
- If you end your expression with a statement that does not return a value, the expression now runs correctly anyway.
Also, added the beginnings of an Objective-C object validator function, which is neither installed nor used as yet.
llvm-svn: 113789
show more ...
|
#
3f4c09c1 |
| 07-Sep-2010 |
Caroline Tice <ctice@apple.com> |
Small help text fixes, to make it more consistent and accurate.
Temporarily remove -l option from 'expr' command (at Sean's request).
llvm-svn: 113298
|
Revision tags: llvmorg-2.8.0-rc1, llvmorg-2.8.0-rc0 |
|
#
91b9383b |
| 01-Sep-2010 |
Jim Ingham <jingham@apple.com> |
Stream::Printf doesn't add a newline, so it needs to be added to all the error messages in CommandObjectExpression::EvaluateExpression.
llvm-svn: 112731
|
#
6961e878 |
| 01-Sep-2010 |
Sean Callanan <scallanan@apple.com> |
Added support for dynamic sanity checking in expressions. Values used by the expression are checked by validation functions which cause the program to crash if the values are unsafe.
Major changes:
Added support for dynamic sanity checking in expressions. Values used by the expression are checked by validation functions which cause the program to crash if the values are unsafe.
Major changes:
- Added IRDynamicChecks.[ch], which contains the core code related to this feature
- Modified CommandObjectExpression to install the validator functions into the target process.
- Added an accessor to Process that gets/sets the helper functions
llvm-svn: 112690
show more ...
|
#
1a8d4093 |
| 27-Aug-2010 |
Sean Callanan <scallanan@apple.com> |
This is a major refactoring of the expression parser. The goal is to separate the parser's data from the data belonging to the parser's clients. This allows clients to use the parser to obtain (for
This is a major refactoring of the expression parser. The goal is to separate the parser's data from the data belonging to the parser's clients. This allows clients to use the parser to obtain (for example) a JIT compiled function or some DWARF code, and then discard the parser state.
Previously, parser state was held in ClangExpression and used liberally by ClangFunction, which inherited from ClangExpression. The main effects of this refactoring are:
- reducing ClangExpression to an abstract class that declares methods that any client must expose to the expression parser,
- moving the code specific to implementing the "expr" command from ClangExpression and CommandObjectExpression into ClangUserExpression, a new class,
- moving the common parser interaction code from ClangExpression into ClangExpressionParser, a new class, and
- making ClangFunction rely only on ClangExpressionParser and not depend on the internal implementation of ClangExpression.
Side effects include:
- the compiler interaction code has been factored out of ClangFunction and is now in an AST pass (ASTStructExtractor),
- the header file for ClangFunction is now fully documented,
- several bugs that only popped up when Clang was deallocated (which never happened, since the lifetime of the compiler was essentially infinite) are now fixed, and
- the developer-only "call" command has been disabled.
I have tested the expr command and the Objective-C step-into code, which use ClangUserExpression and ClangFunction, respectively, and verified that they work. Please let me know if you encounter bugs or poor documentation.
llvm-svn: 112249
show more ...
|
#
d0ef0eff |
| 20-Aug-2010 |
Sean Callanan <scallanan@apple.com> |
First step of refactoring variable handling in the expression parser. There shouldn't be four separate classes encapsulating a variable.
ClangExpressionVariable is now meant to be the container for
First step of refactoring variable handling in the expression parser. There shouldn't be four separate classes encapsulating a variable.
ClangExpressionVariable is now meant to be the container for all variable information. It has several optional components that hold data for different subsystems.
ClangPersistentVariable has been removed; we now use ClangExpressionVariable instead.
llvm-svn: 111600
show more ...
|
#
fcd43b71 |
| 13-Aug-2010 |
Johnny Chen <johnny.chen@apple.com> |
Modified CommandObjectExpression::EvaluateExpression() so that it takes an additional (ComandReturnObject *) result parameter (default to NULL) and does the right thing in setting the result status.
Modified CommandObjectExpression::EvaluateExpression() so that it takes an additional (ComandReturnObject *) result parameter (default to NULL) and does the right thing in setting the result status.
Also removed used variable ast_context.
llvm-svn: 110992
show more ...
|
#
b269b6ea |
| 13-Aug-2010 |
Sean Callanan <scallanan@apple.com> |
Documented ClangExpression and made parts of it more sane (i.e., removed dead arguments, made sensible defaults, etc.)
llvm-svn: 110990
|
#
d1e5b439 |
| 12-Aug-2010 |
Sean Callanan <scallanan@apple.com> |
Added automatically generated result variables for each expression. It is now possible to do things like this:
(lldb) expr int $i = 5; $i + 1 $0 = (int) 6 (lldb) expr $i + 3 $1 = (int) 8 (lldb) exp
Added automatically generated result variables for each expression. It is now possible to do things like this:
(lldb) expr int $i = 5; $i + 1 $0 = (int) 6 (lldb) expr $i + 3 $1 = (int) 8 (lldb) expr $1 + $0 $2 = (int) 14
As a bonus, this allowed us to move printing of expression results into the ClangPersistentVariable class. This code needs a bit of refactoring -- in particular, ClangExpressionDeclMap has eaten one too many bacteria and needs to undergo mitosis -- but the infrastructure appears to be holding up nicely.
llvm-svn: 110896
show more ...
|
#
2235f32b |
| 11-Aug-2010 |
Sean Callanan <scallanan@apple.com> |
Added support for persistent variables to the expression parser. It is now possible to type:
(lldb) expr int $i = 5; $i + 1 (int) 6 (lldb) expr $i + 2 (int) 7
The skeleton for automatic result var
Added support for persistent variables to the expression parser. It is now possible to type:
(lldb) expr int $i = 5; $i + 1 (int) 6 (lldb) expr $i + 2 (int) 7
The skeleton for automatic result variables is also implemented. The changes affect:
- the process, which now contains a ClangPersistentVariables object that holds persistent variables associated with it - the expression parser, which now uses the persistent variables during variable lookup - TaggedASTType, where I loaded some commonly used tags into a header so that they are interchangeable between different clients of the class
llvm-svn: 110777
show more ...
|
#
fc16cc0a |
| 06-Aug-2010 |
Sean Callanan <scallanan@apple.com> |
Removed the -i option from the expr command, and made IR-based expression evaluation the default.
Also added a new class to hold persistent variables. The class is empty as yet while I write up a de
Removed the -i option from the expr command, and made IR-based expression evaluation the default.
Also added a new class to hold persistent variables. The class is empty as yet while I write up a design document for what it will do. Also the place where it is currently created (by the Expression command) is certainly wrong.
llvm-svn: 110415
show more ...
|
#
4b4b5fce |
| 29-Jul-2010 |
Greg Clayton <gclayton@apple.com> |
Fixed expression result printing to have the expression result type be in parens and to have a space before the value.
Before: (lldb) expr 3 + 1 int4
(lldb) expr 3 + 1 (int) 4
llvm-svn: 109793
|
#
289e07b9 |
| 23-Jul-2010 |
Sean Callanan <scallanan@apple.com> |
Added logging: - When we JIT an expression, we print the disassembly of the generated code - When we put the structure into the target, we print the individual entries in the structure byte for
Added logging: - When we JIT an expression, we print the disassembly of the generated code - When we put the structure into the target, we print the individual entries in the structure byte for byte.
llvm-svn: 109278
show more ...
|
#
ebb84b24 |
| 23-Jul-2010 |
Stephen Wilson <wilsons@start.ca> |
Fix a typo.
llvm-svn: 109271
|
#
6dde30e9 |
| 23-Jul-2010 |
Sean Callanan <scallanan@apple.com> |
Added extensive logging of the code that is actually going to be executed by the inferior. This required explicit support from RecordingMemoryManager for finding the address range belonging to a par
Added extensive logging of the code that is actually going to be executed by the inferior. This required explicit support from RecordingMemoryManager for finding the address range belonging to a particular function.
Also fixed a bug in DisassemblerLLVM where the disassembler assumed there was an AddressRange available even when it was NULL.
llvm-svn: 109209
show more ...
|
#
ebf7707e |
| 23-Jul-2010 |
Sean Callanan <scallanan@apple.com> |
Modified TaggedASTType to inherit from ClangASTType and moved it to its own header file for cleanliness.
Added more logging to ClangFunction so that we can diagnose crashes in the executing expressi
Modified TaggedASTType to inherit from ClangASTType and moved it to its own header file for cleanliness.
Added more logging to ClangFunction so that we can diagnose crashes in the executing expression.
Added code to extract the result of the expression from the struct that is passed to the JIT-compiled code.
llvm-svn: 109199
show more ...
|
#
e1a916a7 |
| 21-Jul-2010 |
Greg Clayton <gclayton@apple.com> |
Change over to using the definitions for mach-o types and defines to the defines that are in "llvm/Support/MachO.h". This should allow ObjectFileMachO and ObjectContainerUniversalMachO to be able to
Change over to using the definitions for mach-o types and defines to the defines that are in "llvm/Support/MachO.h". This should allow ObjectFileMachO and ObjectContainerUniversalMachO to be able to be cross compiled in Linux.
Also did some cleanup on the ASTType by renaming it to ClangASTType and renaming the header file. Moved a lot of "AST * + opaque clang type *" functionality from lldb_private::Type over into ClangASTType.
llvm-svn: 109046
show more ...
|
#
1d180664 |
| 20-Jul-2010 |
Sean Callanan <scallanan@apple.com> |
Added functionality to dematerialize values that were used by the JIT compiled expression, including the result of the expression.
Also added a new class, ASTType, which encapsulates an opaque Clang
Added functionality to dematerialize values that were used by the JIT compiled expression, including the result of the expression.
Also added a new class, ASTType, which encapsulates an opaque Clang type and its associated AST context.
Refactored ClangExpressionDeclMap to use ASTTypes, significantly reducing the possibility of mixups of types from different AST contexts.
llvm-svn: 108965
show more ...
|
#
ea22d428 |
| 16-Jul-2010 |
Sean Callanan <scallanan@apple.com> |
Wrote the code that looks at a context to see if the variables in that context allow a particular JIT compiled expression to run in that context.
llvm-svn: 108485
|
#
7618f4eb |
| 14-Jul-2010 |
Sean Callanan <scallanan@apple.com> |
Fixes to the IR generator in the expression parser to correctly unfold constant-folded global variables. Also added code to JIT the expression. Simple expressions are now JIT compiled successfully.
Fixes to the IR generator in the expression parser to correctly unfold constant-folded global variables. Also added code to JIT the expression. Simple expressions are now JIT compiled successfully.
llvm-svn: 108380
show more ...
|
#
2ab712f2 |
| 03-Jul-2010 |
Sean Callanan <scallanan@apple.com> |
Added the skeleton of an IR transformer that will prepare IR for execution in the target. Wired the expression command to use this IR transformer when conversion to DWARF fails, and wired conversion
Added the skeleton of an IR transformer that will prepare IR for execution in the target. Wired the expression command to use this IR transformer when conversion to DWARF fails, and wired conversion to DWARF to always fail (well, we don't generate any DWARF...)
llvm-svn: 107559
show more ...
|
#
116be534 |
| 01-Jul-2010 |
Sean Callanan <scallanan@apple.com> |
Added a SemaConsumer that transforms the ASTs for an expression, adding code to put the value of the last expression (if there is one) into a variable and write the address of that variable to a glob
Added a SemaConsumer that transforms the ASTs for an expression, adding code to put the value of the last expression (if there is one) into a variable and write the address of that variable to a global pointer.
llvm-svn: 107419
show more ...
|