diff options
Diffstat (limited to 'lldb/source/Commands')
-rw-r--r-- | lldb/source/Commands/CommandObjectImage.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Commands/CommandObjectMemory.cpp | 10 | ||||
-rw-r--r-- | lldb/source/Commands/CommandObjectProcess.cpp | 19 |
3 files changed, 26 insertions, 5 deletions
diff --git a/lldb/source/Commands/CommandObjectImage.cpp b/lldb/source/Commands/CommandObjectImage.cpp index cef305f910f..4843e4ff21a 100644 --- a/lldb/source/Commands/CommandObjectImage.cpp +++ b/lldb/source/Commands/CommandObjectImage.cpp @@ -342,7 +342,7 @@ DumpSymbolContextList (CommandInterpreter &interpreter, Stream &strm, SymbolCont int addr_size = sizeof (addr_t); Process *process = interpreter.GetDebugger().GetExecutionContext().process; if (process) - addr_size = process->GetAddressByteSize(); + addr_size = process->GetTarget().GetArchitecture().GetAddressByteSize(); if (vm_addr != LLDB_INVALID_ADDRESS) strm.Address (vm_addr, addr_size); else diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp index 949cadca352..4a66dd65c16 100644 --- a/lldb/source/Commands/CommandObjectMemory.cpp +++ b/lldb/source/Commands/CommandObjectMemory.cpp @@ -260,7 +260,7 @@ public: if (item_byte_size == 0) { if (m_options.m_format == eFormatPointer) - item_byte_size = process->GetAddressByteSize(); + item_byte_size = process->GetTarget().GetArchitecture().GetAddressByteSize(); else item_byte_size = 1; } @@ -334,7 +334,9 @@ public: result.AppendWarningWithFormat("Not all bytes (%u/%u) were able to be read from 0x%llx.\n", bytes_read, total_byte_size, addr); result.SetStatus(eReturnStatusSuccessFinishResult); - DataExtractor data(data_sp, process->GetByteOrder(), process->GetAddressByteSize()); + DataExtractor data (data_sp, + process->GetTarget().GetArchitecture().GetByteOrder(), + process->GetTarget().GetArchitecture().GetAddressByteSize()); StreamFile outfile_stream; Stream *output_stream = NULL; @@ -616,8 +618,8 @@ public: } StreamString buffer (Stream::eBinary, - process->GetAddressByteSize(), - process->GetByteOrder()); + process->GetTarget().GetArchitecture().GetAddressByteSize(), + process->GetTarget().GetArchitecture().GetByteOrder()); size_t item_byte_size = m_options.m_byte_size; diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp index 181012d12f0..7329ccbb1d9 100644 --- a/lldb/source/Commands/CommandObjectProcess.cpp +++ b/lldb/source/Commands/CommandObjectProcess.cpp @@ -328,6 +328,10 @@ public: if (synchronous_execution) { state = process->WaitForProcessToStop (NULL); + if (!StateIsStoppedState(state)); + { + result.AppendErrorWithFormat ("Process isn't stopped: %s", StateAsCString(state)); + } result.SetDidChangeProcessState (true); result.SetStatus (eReturnStatusSuccessFinishResult); } @@ -336,9 +340,24 @@ public: result.SetStatus (eReturnStatusSuccessContinuingNoResult); } } + else + { + result.AppendErrorWithFormat ("Process resume at entry point failed: %s", error.AsCString()); + result.SetStatus (eReturnStatusFailed); + } } + else + { + result.AppendErrorWithFormat ("Initial process state wasn't stopped: %s", StateAsCString(state)); + result.SetStatus (eReturnStatusFailed); + } } } + else + { + result.AppendErrorWithFormat ("Process launch failed: %s", error.AsCString()); + result.SetStatus (eReturnStatusFailed); + } return result.Succeeded(); } |