[Lldb-commits] [lldb] r329844 - Fix a thinko in CommandObjectMemoryRegion.
Jim Ingham via lldb-commits
lldb-commits at lists.llvm.org
Wed Apr 11 12:27:03 PDT 2018
Author: jingham
Date: Wed Apr 11 12:27:03 2018
New Revision: 329844
URL: http://llvm.org/viewvc/llvm-project?rev=329844&view=rev
Log:
Fix a thinko in CommandObjectMemoryRegion.
Don't try to read the first argument till you've checked
that there is one.
Modified:
lldb/trunk/source/Commands/CommandObjectMemory.cpp
Modified: lldb/trunk/source/Commands/CommandObjectMemory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectMemory.cpp?rev=329844&r1=329843&r2=329844&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectMemory.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectMemory.cpp Wed Apr 11 12:27:03 2018
@@ -1710,8 +1710,8 @@ protected:
m_cmd_name.c_str(), m_cmd_syntax.c_str());
result.SetStatus(eReturnStatusFailed);
} else {
- auto load_addr_str = command[0].ref;
if (command.GetArgumentCount() == 1) {
+ auto load_addr_str = command[0].ref;
load_addr = OptionArgParser::ToAddress(&m_exe_ctx, load_addr_str,
LLDB_INVALID_ADDRESS, &error);
if (error.Fail() || load_addr == LLDB_INVALID_ADDRESS) {
More information about the lldb-commits
mailing list