diff options
author | Greg Clayton <gclayton@apple.com> | 2013-01-11 18:01:02 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2013-01-11 18:01:02 +0000 |
commit | c0e8a85ea8449d2deb9b2508e00ef2610d5bc35a (patch) | |
tree | 4adbff59d21a40d8763013d09057cbd820f289fd /llvm/lib/CodeGen/StackProtector.cpp | |
parent | a40a805f307cafed2a9958234a1d127149c0fc34 (diff) | |
download | llvm-c0e8a85ea8449d2deb9b2508e00ef2610d5bc35a.zip llvm-c0e8a85ea8449d2deb9b2508e00ef2610d5bc35a.tar.gz llvm-c0e8a85ea8449d2deb9b2508e00ef2610d5bc35a.tar.bz2 |
Modified Value.cpp to share the code that gets the values as bytes (Value::GetValueAsData()) so now Value::ResolveValue() doesn't do its own thing by reading memory directly.
Also modified the Value class so that you can evaluate expressions without a process, yet with some sections loaded in the target. This allows casting pointers that are in data sections to types and being able to evaluate expressions in the data. For example:
(lldb) target create a.out
(lldb) target modules load --file a.out --slide 0
... find address of something in data ...
(lldb) script
expr_opts = lldb.SBExpressionOptions()
v = lldb.target.EvaluateExpression('(foo *)0x1230000', expr_opts)
print v
vv = lldb.value(v)
print v.pt.x
Above we were able to cast a pointer to an address which was in a.out's data
section and print out entire structures and navigate to the child ivars of the expression.
llvm-svn: 172227
Diffstat (limited to 'llvm/lib/CodeGen/StackProtector.cpp')
0 files changed, 0 insertions, 0 deletions