diff options
author | Dawn Perchik <dawn@burble.org> | 2015-07-21 22:05:07 +0000 |
---|---|---|
committer | Dawn Perchik <dawn@burble.org> | 2015-07-21 22:05:07 +0000 |
commit | 23b1decbe763783c630763c0ae9b7b20773131c8 (patch) | |
tree | fdd11d22d8a0ab885562f2a07d7aa9720293bc19 /lldb/source/Interpreter/OptionValueProperties.cpp | |
parent | f836c89c4953d9ca5e390b41e0ebc84c903a46c0 (diff) | |
download | bcm5719-llvm-23b1decbe763783c630763c0ae9b7b20773131c8.tar.gz bcm5719-llvm-23b1decbe763783c630763c0ae9b7b20773131c8.zip |
Add support for specifying a language to use when parsing breakpoints.
Target and breakpoints options were added:
breakpoint set --language lang --name func
settings set target.language pascal
These specify the Language to use when interpreting the breakpoint's
expression (note: currently only implemented for breakpoints on
identifiers). If the breakpoint language is not set, the target.language
setting is used.
This support is required by Pascal, for example, to set breakpoint at 'ns.foo'
for function 'foo' in namespace 'ns'.
Tests on the language were also added to Module::PrepareForFunctionNameLookup
for efficiency.
Reviewed by: clayborg
Subscribers: jingham, lldb-commits
Differential Revision: http://reviews.llvm.org/D11119
llvm-svn: 242844
Diffstat (limited to 'lldb/source/Interpreter/OptionValueProperties.cpp')
-rw-r--r-- | lldb/source/Interpreter/OptionValueProperties.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/source/Interpreter/OptionValueProperties.cpp b/lldb/source/Interpreter/OptionValueProperties.cpp index e8d870a99cf..a3c28f70270 100644 --- a/lldb/source/Interpreter/OptionValueProperties.cpp +++ b/lldb/source/Interpreter/OptionValueProperties.cpp @@ -311,6 +311,15 @@ OptionValueProperties::GetPropertyAtIndexAsOptionValueArch (const ExecutionConte return nullptr; } +OptionValueLanguage * +OptionValueProperties::GetPropertyAtIndexAsOptionValueLanguage (const ExecutionContext *exe_ctx, uint32_t idx) const +{ + const Property *property = GetPropertyAtIndex (exe_ctx, false, idx); + if (property) + return property->GetValue()->GetAsLanguage(); + return nullptr; +} + bool OptionValueProperties::GetPropertyAtIndexAsArgs (const ExecutionContext *exe_ctx, uint32_t idx, Args &args) const { |