diff options
| author | Jim Ingham <jingham@apple.com> | 2013-03-15 23:09:19 +0000 |
|---|---|---|
| committer | Jim Ingham <jingham@apple.com> | 2013-03-15 23:09:19 +0000 |
| commit | e7b849e4fb7e13a5be299b701d53896168345b15 (patch) | |
| tree | 42ff6b7639f09dc5a3e559807ee78132b3728bf0 /lldb | |
| parent | a4a361df5b4cac952e725792938f0b4ef823393b (diff) | |
| download | bcm5719-llvm-e7b849e4fb7e13a5be299b701d53896168345b15.tar.gz bcm5719-llvm-e7b849e4fb7e13a5be299b701d53896168345b15.zip | |
Convert the -a option in "image lookup" to a address-expression, and pass the context
in the -a address expression lookup in "image list" so that it actually works.
llvm-svn: 177200
Diffstat (limited to 'lldb')
| -rw-r--r-- | lldb/source/Commands/CommandObjectTarget.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp index 15c05dc27c6..3869efb08b9 100644 --- a/lldb/source/Commands/CommandObjectTarget.cpp +++ b/lldb/source/Commands/CommandObjectTarget.cpp @@ -3038,7 +3038,8 @@ public: } else if (short_option == 'a') { - m_module_addr = Args::StringToAddress(NULL, option_arg, LLDB_INVALID_ADDRESS, &error); + ExecutionContext exe_ctx (m_interpreter.GetExecutionContext()); + m_module_addr = Args::StringToAddress(&exe_ctx, option_arg, LLDB_INVALID_ADDRESS, &error); } else { @@ -3713,10 +3714,11 @@ public: switch (short_option) { case 'a': - m_type = eLookupTypeAddress; - m_addr = Args::StringToUInt64(option_arg, LLDB_INVALID_ADDRESS); - if (m_addr == LLDB_INVALID_ADDRESS) - error.SetErrorStringWithFormat ("invalid address string '%s'", option_arg); + { + m_type = eLookupTypeAddress; + ExecutionContext exe_ctx (m_interpreter.GetExecutionContext()); + m_addr = Args::StringToAddress(&exe_ctx, option_arg, LLDB_INVALID_ADDRESS, &error); + } break; case 'o': @@ -4107,7 +4109,7 @@ protected: OptionDefinition CommandObjectTargetModulesLookup::CommandOptions::g_option_table[] = { - { LLDB_OPT_SET_1, true, "address", 'a', required_argument, NULL, 0, eArgTypeAddress, "Lookup an address in one or more target modules."}, + { LLDB_OPT_SET_1, true, "address", 'a', required_argument, NULL, 0, eArgTypeAddressOrExpression, "Lookup an address in one or more target modules."}, { LLDB_OPT_SET_1, false, "offset", 'o', required_argument, NULL, 0, eArgTypeOffset, "When looking up an address subtract <offset> from any addresses before doing the lookup."}, { LLDB_OPT_SET_2| LLDB_OPT_SET_4 | LLDB_OPT_SET_5 /* FIXME: re-enable this for types when the LookupTypeInModule actually uses the regex option: | LLDB_OPT_SET_6 */ , |

