<rdar://problem/12820334>
authorGreg Clayton <gclayton@apple.com>
Thu, 6 Dec 2012 22:49:16 +0000 (22:49 +0000)
committerGreg Clayton <gclayton@apple.com>
Thu, 6 Dec 2012 22:49:16 +0000 (22:49 +0000)
commitb9d5df58d4312bb7d9602b870df13a0713509f94
tree5fd570e84261278d1173cf0358f84581b14854a9
parent39dd38c06185542e44e82f938824e041685b95c6
<rdar://problem/12820334>

I modified the "Args::StringtoAddress(...)" function to be able to evaluate address expressions. This is now used for any command line arguments or options that takes addresses like:

memory read <addr> [<end-addr>]
memory write <addr>
breakpoint set --address <addr>
disassemble --start-address <addr> --end-address <addr>

It calls the expression parser to evaluate the address expression and will also work around the issue where the compiler doesn't like to add offsets to function pointers (which is what happens when you try to evaluate "main + 12"). So there is a temp fix in the Args::StringtoAddress() to work around this until we can get special compiler support for debug expressions with function pointers.

llvm-svn: 169556
lldb/include/lldb/Interpreter/Args.h
lldb/source/Commands/CommandObjectBreakpoint.cpp
lldb/source/Commands/CommandObjectDisassemble.cpp
lldb/source/Commands/CommandObjectMemory.cpp
lldb/source/Commands/CommandObjectTarget.cpp
lldb/source/Interpreter/Args.cpp
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp