diff options
author | emaste <emaste@FreeBSD.org> | 2015-02-06 21:38:51 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2015-02-06 21:38:51 +0000 |
commit | 0c2019f4ca6b2dc6d710f6bb16a0e3ed10271531 (patch) | |
tree | 09bc83f73246ee3c7a779605cd0122093d2a8a19 /source/Interpreter/Args.cpp | |
parent | 01ee1789d6aa7294e5966a97f8d29387f6f81699 (diff) | |
download | FreeBSD-src-0c2019f4ca6b2dc6d710f6bb16a0e3ed10271531.zip FreeBSD-src-0c2019f4ca6b2dc6d710f6bb16a0e3ed10271531.tar.gz |
Import LLDB as of upstream SVN r225923 (git 2b588ecd)
This corresponds with the branchpoint for the 3.6 release.
A number of files not required for the FreeBSD build have been removed.
Sponsored by: DARPA, AFRL
Diffstat (limited to 'source/Interpreter/Args.cpp')
-rw-r--r-- | source/Interpreter/Args.cpp | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/source/Interpreter/Args.cpp b/source/Interpreter/Args.cpp index 4831eaa..9393380 100644 --- a/source/Interpreter/Args.cpp +++ b/source/Interpreter/Args.cpp @@ -685,7 +685,7 @@ Args::ParseOptions (Options &options) } } // Call the callback with the option - if (long_options_index >= 0) + if (long_options_index >= 0 && long_options[long_options_index].definition) { const OptionDefinition *def = long_options[long_options_index].definition; CommandInterpreter &interpreter = options.GetInterpreter(); @@ -829,15 +829,18 @@ Args::StringToAddress (const ExecutionContext *exe_ctx, const char *s, lldb::add options.SetTryAllThreads(true); ExpressionResults expr_result = target->EvaluateExpression(s, - exe_ctx->GetFramePtr(), - valobj_sp, - options); + exe_ctx->GetFramePtr(), + valobj_sp, + options); bool success = false; if (expr_result == eExpressionCompleted) { + if (valobj_sp) + valobj_sp = valobj_sp->GetQualifiedRepresentationIfAvailable(valobj_sp->GetDynamicValueType(), true); // Get the address to watch. - addr = valobj_sp->GetValueAsUnsigned(fail_value, &success); + if (valobj_sp) + addr = valobj_sp->GetValueAsUnsigned(fail_value, &success); if (success) { if (error_ptr) @@ -966,6 +969,26 @@ Args::StringToBoolean (const char *s, bool fail_value, bool *success_ptr) return fail_value; } +char +Args::StringToChar(const char *s, char fail_value, bool *success_ptr) +{ + bool success = false; + char result = fail_value; + + if (s) + { + size_t length = strlen(s); + if (length == 1) + { + success = true; + result = s[0]; + } + } + if (success_ptr) + *success_ptr = success; + return result; +} + const char * Args::StringToVersion (const char *s, uint32_t &major, uint32_t &minor, uint32_t &update) { |