[Lldb-commits] [lldb] r108957 - in /lldb/trunk: include/lldb/Core/ source/Commands/ source/Core/ source/Expression/ source/Interpreter/ source/Plugins/Process/MacOSX-User/source/ source/Plugins/Process/gdb-remote/ source/Plugins/SymbolFile/DWARF/ source/Symbol/ source/Target/
Greg Clayton
gclayton at apple.com
Tue Jul 20 15:52:08 PDT 2010
Author: gclayton
Date: Tue Jul 20 17:52:08 2010
New Revision: 108957
URL: http://llvm.org/viewvc/llvm-project?rev=108957&view=rev
Log:
Remove use of STL collection class use of the "data()" method since it isn't
part of C++'98. Most of these were "std::vector<T>::data()" and
"std::string::data()".
Modified:
lldb/trunk/include/lldb/Core/UniqueCStringMap.h
lldb/trunk/source/Commands/CommandObjectMemory.cpp
lldb/trunk/source/Commands/CommandObjectThread.cpp
lldb/trunk/source/Core/Address.cpp
lldb/trunk/source/Core/Communication.cpp
lldb/trunk/source/Core/Debugger.cpp
lldb/trunk/source/Core/Event.cpp
lldb/trunk/source/Core/RegularExpression.cpp
lldb/trunk/source/Core/ValueObject.cpp
lldb/trunk/source/Core/ValueObjectChild.cpp
lldb/trunk/source/Expression/ClangFunction.cpp
lldb/trunk/source/Interpreter/Args.cpp
lldb/trunk/source/Interpreter/Options.cpp
lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/trunk/source/Symbol/ClangASTContext.cpp
lldb/trunk/source/Symbol/Symtab.cpp
lldb/trunk/source/Symbol/Type.cpp
lldb/trunk/source/Target/ObjCObjectPrinter.cpp
lldb/trunk/source/Target/Process.cpp
Modified: lldb/trunk/include/lldb/Core/UniqueCStringMap.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/UniqueCStringMap.h?rev=108957&r1=108956&r2=108957&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/UniqueCStringMap.h (original)
+++ lldb/trunk/include/lldb/Core/UniqueCStringMap.h Tue Jul 20 17:52:08 2010
@@ -157,13 +157,16 @@
const Entry *
FindNextValueForName (const char *unique_cstr, const Entry *entry_ptr) const
{
- const Entry *first_entry = m_map.data();
- const Entry *after_last_entry = first_entry + m_map.size();
- const Entry *next_entry = entry_ptr + 1;
- if (first_entry <= next_entry && next_entry < after_last_entry)
+ if (!m_map.empty())
{
- if (next_entry->cstring == unique_cstr)
- return next_entry;
+ const Entry *first_entry = &m_map[0];
+ const Entry *after_last_entry = first_entry + m_map.size();
+ const Entry *next_entry = entry_ptr + 1;
+ if (first_entry <= next_entry && next_entry < after_last_entry)
+ {
+ if (next_entry->cstring == unique_cstr)
+ return next_entry;
+ }
}
return NULL;
}
Modified: lldb/trunk/source/Commands/CommandObjectMemory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectMemory.cpp?rev=108957&r1=108956&r2=108957&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectMemory.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectMemory.cpp Tue Jul 20 17:52:08 2010
@@ -647,7 +647,7 @@
if (!buffer.GetString().empty())
{
Error error;
- if (process->WriteMemory (addr, buffer.GetString().data(), buffer.GetString().size(), error) == buffer.GetString().size())
+ if (process->WriteMemory (addr, buffer.GetString().c_str(), buffer.GetString().size(), error) == buffer.GetString().size())
return true;
else
{
Modified: lldb/trunk/source/Commands/CommandObjectThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectThread.cpp?rev=108957&r1=108956&r2=108957&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectThread.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectThread.cpp Tue Jul 20 17:52:08 2010
@@ -1028,7 +1028,7 @@
index_ptr++;
}
- new_plan = thread->QueueThreadPlanForStepUntil (abort_other_plans, address_list.data(), address_list.size(), m_options.m_stop_others);
+ new_plan = thread->QueueThreadPlanForStepUntil (abort_other_plans, &address_list.front(), address_list.size(), m_options.m_stop_others);
new_plan->SetOkayToDiscard(false);
}
else
Modified: lldb/trunk/source/Core/Address.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Address.cpp?rev=108957&r1=108956&r2=108957&view=diff
==============================================================================
--- lldb/trunk/source/Core/Address.cpp (original)
+++ lldb/trunk/source/Core/Address.cpp Tue Jul 20 17:52:08 2010
@@ -167,7 +167,7 @@
static bool
DumpUInt (ExecutionContextScope *exe_scope, const Address &address, uint32_t byte_size, Stream* strm)
{
- if (exe_scope == NULL)
+ if (exe_scope == NULL || byte_size == 0)
return 0;
std::vector<uint8_t> buf(byte_size, 0);
@@ -177,7 +177,7 @@
uint32_t addr_size = 0;
if (GetByteOrderAndAddressSize (exe_scope, address, byte_order, addr_size))
{
- DataExtractor data (buf.data(), buf.size(), byte_order, addr_size);
+ DataExtractor data (&buf.front(), buf.size(), byte_order, addr_size);
data.Dump (strm,
0, // Start offset in "data"
Modified: lldb/trunk/source/Core/Communication.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Communication.cpp?rev=108957&r1=108956&r2=108957&view=diff
==============================================================================
--- lldb/trunk/source/Core/Communication.cpp (original)
+++ lldb/trunk/source/Core/Communication.cpp Tue Jul 20 17:52:08 2010
@@ -248,7 +248,7 @@
const size_t len = std::min<size_t>(dst_len, m_bytes.size());
- ::memcpy (dst, m_bytes.data(), len);
+ ::memcpy (dst, m_bytes.c_str(), len);
m_bytes.erase(m_bytes.begin(), m_bytes.begin() + len);
return len;
Modified: lldb/trunk/source/Core/Debugger.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Debugger.cpp?rev=108957&r1=108956&r2=108957&view=diff
==============================================================================
--- lldb/trunk/source/Core/Debugger.cpp (original)
+++ lldb/trunk/source/Core/Debugger.cpp Tue Jul 20 17:52:08 2010
@@ -337,7 +337,7 @@
if (!reader_sp)
break;
- size_t bytes_handled = reader_sp->HandleRawBytes (m_input_reader_data.data(),
+ size_t bytes_handled = reader_sp->HandleRawBytes (m_input_reader_data.c_str(),
m_input_reader_data.size());
if (bytes_handled)
{
Modified: lldb/trunk/source/Core/Event.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Event.cpp?rev=108957&r1=108956&r2=108957&view=diff
==============================================================================
--- lldb/trunk/source/Core/Event.cpp (original)
+++ lldb/trunk/source/Core/Event.cpp Tue Jul 20 17:52:08 2010
@@ -169,10 +169,10 @@
{
s->Printf("\"%s\"", m_bytes.c_str());
}
- else
+ else if (m_bytes.size() > 0)
{
DataExtractor data;
- data.SetData(m_bytes.data(), m_bytes.size(), eByteOrderHost);
+ data.SetData(&m_bytes[0], m_bytes.size(), eByteOrderHost);
data.Dump(s, 0, eFormatBytes, 1, m_bytes.size(), 32, LLDB_INVALID_ADDRESS, 0, 0);
}
}
@@ -182,7 +182,7 @@
{
if (m_bytes.empty())
return NULL;
- return m_bytes.data();
+ return &m_bytes[0];
}
size_t
Modified: lldb/trunk/source/Core/RegularExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/RegularExpression.cpp?rev=108957&r1=108956&r2=108957&view=diff
==============================================================================
--- lldb/trunk/source/Core/RegularExpression.cpp (original)
+++ lldb/trunk/source/Core/RegularExpression.cpp Tue Jul 20 17:52:08 2010
@@ -100,7 +100,7 @@
match_result = ::regexec (&m_preg,
s,
m_matches.size(),
- const_cast<regmatch_t *>(m_matches.data()),
+ &m_matches.front(),
execute_flags);
}
return match_result == 0;
Modified: lldb/trunk/source/Core/ValueObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObject.cpp?rev=108957&r1=108956&r2=108957&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObject.cpp (original)
+++ lldb/trunk/source/Core/ValueObject.cpp Tue Jul 20 17:52:08 2010
@@ -395,8 +395,8 @@
// Resize the formatted buffer in case every character
// uses the "\xXX" format and one extra byte for a NULL
cstr_buffer.resize(data_buffer.size() * 4 + 1);
- data.SetData (data_buffer.data(), data_buffer.size(), eByteOrderHost);
- bytes_read = process->ReadMemory (cstr_address, data_buffer.data(), fixed_length, error);
+ data.SetData (&data_buffer.front(), data_buffer.size(), eByteOrderHost);
+ bytes_read = process->ReadMemory (cstr_address, &data_buffer.front(), fixed_length, error);
if (bytes_read > 0)
{
sstr << '"';
@@ -423,11 +423,11 @@
// "\xXX" format and one extra byte for a NULL
cstr_buffer.resize (k_max_buf_size * 4 + 1);
- data.SetData (data_buffer.data(), data_buffer.size(), eByteOrderHost);
+ data.SetData (&data_buffer.front(), data_buffer.size(), eByteOrderHost);
size_t total_cstr_len = 0;
- while ((bytes_read = process->ReadMemory (cstr_address, data_buffer.data(), k_max_buf_size, error)) > 0)
+ while ((bytes_read = process->ReadMemory (cstr_address, &data_buffer.front(), k_max_buf_size, error)) > 0)
{
- size_t len = strlen(data_buffer.data());
+ size_t len = strlen(&data_buffer.front());
if (len == 0)
break;
if (len > bytes_read)
Modified: lldb/trunk/source/Core/ValueObjectChild.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectChild.cpp?rev=108957&r1=108956&r2=108957&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectChild.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectChild.cpp Tue Jul 20 17:52:08 2010
@@ -112,8 +112,8 @@
if (clang_type_name)
{
std::vector<char> bitfield_type_name (strlen(clang_type_name) + 32, 0);
- ::snprintf (bitfield_type_name.data(), bitfield_type_name.size(), "%s:%u", clang_type_name, m_bitfield_bit_size);
- m_type_name.SetCString(bitfield_type_name.data());
+ ::snprintf (&bitfield_type_name.front(), bitfield_type_name.size(), "%s:%u", clang_type_name, m_bitfield_bit_size);
+ m_type_name.SetCString(&bitfield_type_name.front());
}
}
}
Modified: lldb/trunk/source/Expression/ClangFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangFunction.cpp?rev=108957&r1=108956&r2=108957&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangFunction.cpp (original)
+++ lldb/trunk/source/Expression/ClangFunction.cpp Tue Jul 20 17:52:08 2010
@@ -358,8 +358,8 @@
buffer.resize(byte_size);
DataExtractor value_data;
arg_scalar.GetData (value_data);
- value_data.ExtractBytes(0, byte_size, process->GetByteOrder(), buffer.data());
- process->WriteMemory(args_addr_ref + offset, buffer.data(), byte_size, error);
+ value_data.ExtractBytes(0, byte_size, process->GetByteOrder(), &buffer.front());
+ process->WriteMemory(args_addr_ref + offset, &buffer.front(), byte_size, error);
}
return true;
@@ -417,7 +417,7 @@
data_buffer.resize(m_return_size);
Process *process = exc_context.process;
Error error;
- size_t bytes_read = process->ReadMemory(args_addr + m_return_offset/8, data_buffer.data(), m_return_size, error);
+ size_t bytes_read = process->ReadMemory(args_addr + m_return_offset/8, &data_buffer.front(), m_return_size, error);
if (bytes_read == 0)
{
@@ -427,7 +427,7 @@
if (bytes_read < m_return_size)
return false;
- DataExtractor data(data_buffer.data(), m_return_size, process->GetByteOrder(), process->GetAddressByteSize());
+ DataExtractor data(&data_buffer.front(), m_return_size, process->GetByteOrder(), process->GetAddressByteSize());
// FIXME: Assuming an integer scalar for now:
uint32_t offset = 0;
Modified: lldb/trunk/source/Interpreter/Args.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/Args.cpp?rev=108957&r1=108956&r2=108957&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/Args.cpp (original)
+++ lldb/trunk/source/Interpreter/Args.cpp Tue Jul 20 17:52:08 2010
@@ -1008,7 +1008,7 @@
int long_options_index = -1;
val = ::getopt_long (dummy_vec.size() - 1,
- (char *const *) dummy_vec.data(),
+ (char *const *) &dummy_vec.front(),
sstr.GetData(),
long_options,
&long_options_index);
Modified: lldb/trunk/source/Interpreter/Options.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/Options.cpp?rev=108957&r1=108956&r2=108957&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/Options.cpp (original)
+++ lldb/trunk/source/Interpreter/Options.cpp Tue Jul 20 17:52:08 2010
@@ -285,7 +285,10 @@
m_getopt_table[j].val = 0;
}
- return m_getopt_table.data();
+ if (m_getopt_table.empty())
+ return NULL;
+
+ return &m_getopt_table.front();
}
Modified: lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp?rev=108957&r1=108956&r2=108957&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-User/source/ProcessMacOSX.cpp Tue Jul 20 17:52:08 2010
@@ -943,13 +943,13 @@
ProcessMacOSXLog::LogIf (PD_LOG_PROCESS, "ProcessMacOSX::%s (&%p[%u]) ...", __FUNCTION__, buf, buf_size);
if (bytes_available > buf_size)
{
- memcpy(buf, m_stdout_data.data(), buf_size);
+ memcpy(buf, m_stdout_data.c_str(), buf_size);
m_stdout_data.erase(0, buf_size);
bytes_available = buf_size;
}
else
{
- memcpy(buf, m_stdout_data.data(), bytes_available);
+ memcpy(buf, m_stdout_data.c_str(), bytes_available);
m_stdout_data.clear();
//ResetEventBits(eBroadcastBitSTDOUT);
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp?rev=108957&r1=108956&r2=108957&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp Tue Jul 20 17:52:08 2010
@@ -267,7 +267,7 @@
m_async_response.Clear();
if (!m_async_packet.empty())
{
- SendPacketAndWaitForResponse (m_async_packet.data(),
+ SendPacketAndWaitForResponse (&m_async_packet[0],
m_async_packet.size(),
m_async_response,
m_async_timeout,
@@ -483,7 +483,7 @@
if (m_send_acks)
{
char packet_checksum = strtol (&packet_data[packet_size-2], NULL, 16);
- char actual_checksum = CalculcateChecksum (response_str.data(), response_str.size());
+ char actual_checksum = CalculcateChecksum (&response_str[0], response_str.size());
checksum_error = packet_checksum != actual_checksum;
// Send the ack or nack if needed
if (checksum_error)
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp?rev=108957&r1=108956&r2=108957&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp Tue Jul 20 17:52:08 2010
@@ -379,7 +379,7 @@
return false;
response.GetStringRef().insert(0, 1, 'G');
- data_sp.reset (new DataBufferHeap(response.GetStringRef().data(),
+ data_sp.reset (new DataBufferHeap(response.GetStringRef().c_str(),
response.GetStringRef().size()));
return true;
}
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=108957&r1=108956&r2=108957&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Tue Jul 20 17:52:08 2010
@@ -1313,13 +1313,13 @@
ProcessGDBRemoteLog::LogIf (GDBR_LOG_PROCESS, "ProcessGDBRemote::%s (&%p[%u]) ...", __FUNCTION__, buf, buf_size);
if (bytes_available > buf_size)
{
- memcpy(buf, m_stdout_data.data(), buf_size);
+ memcpy(buf, m_stdout_data.c_str(), buf_size);
m_stdout_data.erase(0, buf_size);
bytes_available = buf_size;
}
else
{
- memcpy(buf, m_stdout_data.data(), bytes_available);
+ memcpy(buf, m_stdout_data.c_str(), bytes_available);
m_stdout_data.clear();
//ResetEventBits(eBroadcastBitSTDOUT);
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=108957&r1=108956&r2=108957&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Tue Jul 20 17:52:08 2010
@@ -2878,17 +2878,18 @@
{
// This is a class and all members that didn't have
// their access specified are private.
- type_list->GetClangASTContext().SetDefaultAccessForRecordFields (clang_type, clang::AS_private, member_accessibilities.data(), member_accessibilities.size());
+ type_list->GetClangASTContext().SetDefaultAccessForRecordFields (clang_type, clang::AS_private, &member_accessibilities.front(), member_accessibilities.size());
}
if (!base_classes.empty())
{
- type_list->GetClangASTContext().SetBaseClassesForClassType (clang_type, base_classes.data(), base_classes.size());
+ type_list->GetClangASTContext().SetBaseClassesForClassType (clang_type, &base_classes.front(), base_classes.size());
+
+ // Clang will copy each CXXBaseSpecifier in "base_classes"
+ // so we have to free them all.
+ ClangASTContext::DeleteBaseClassSpecifiers (&base_classes.front(), base_classes.size());
}
- // Clang will copy each CXXBaseSpecifier in "base_classes"
- // so we have to free them all.
- ClangASTContext::DeleteBaseClassSpecifiers (base_classes.data(), base_classes.size());
}
type_list->GetClangASTContext().CompleteTagDeclarationDefinition (clang_type);
}
@@ -3069,7 +3070,7 @@
assert (function_decl);
m_die_to_decl_ctx[die] = function_decl;
if (!function_param_decls.empty())
- type_list->GetClangASTContext().SetFunctionParameters (function_decl, function_param_decls.data(), function_param_decls.size());
+ type_list->GetClangASTContext().SetFunctionParameters (function_decl, &function_param_decls.front(), function_param_decls.size());
}
type_sp.reset( new Type(die->GetOffset(), this, type_name_dbstr, 0, NULL, LLDB_INVALID_UID, Type::eIsTypeWithUID, &decl, clang_type));
Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=108957&r1=108956&r2=108957&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Tue Jul 20 17:52:08 2010
@@ -1944,7 +1944,7 @@
// TODO: Detect calling convention in DWARF?
return ast_context->getFunctionType(QualType::getFromOpaquePtr(result_type),
- qual_type_args.data(),
+ qual_type_args.empty() ? NULL : &qual_type_args.front(),
qual_type_args.size(),
isVariadic,
TypeQuals,
Modified: lldb/trunk/source/Symbol/Symtab.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Symtab.cpp?rev=108957&r1=108956&r2=108957&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Symtab.cpp (original)
+++ lldb/trunk/source/Symbol/Symtab.cpp Tue Jul 20 17:52:08 2010
@@ -503,8 +503,11 @@
size_t
Symtab::CalculateSymbolSize (Symbol *symbol)
{
+ if (m_symbols.empty())
+ return 0;
+
// Make sure this symbol is from this symbol table...
- if (symbol < m_symbols.data() || symbol >= m_symbols.data() + m_symbols.size())
+ if (symbol < &m_symbols.front() || symbol > &m_symbols.back())
return 0;
// See if this symbol already has a byte size?
@@ -523,7 +526,7 @@
if (m_addr_indexes.empty())
InitAddressIndexes();
const size_t num_addr_indexes = m_addr_indexes.size();
- SymbolSearchInfo info = FindIndexPtrForSymbolContainingAddress(this, symbol->GetAddressRangePtr()->GetBaseAddress().GetFileAddress(), m_addr_indexes.data(), num_addr_indexes);
+ SymbolSearchInfo info = FindIndexPtrForSymbolContainingAddress(this, symbol->GetAddressRangePtr()->GetBaseAddress().GetFileAddress(), &m_addr_indexes.front(), num_addr_indexes);
if (info.match_index_ptr != NULL)
{
const lldb::addr_t curr_file_addr = symbol->GetAddressRangePtr()->GetBaseAddress().GetFileAddress();
@@ -531,7 +534,7 @@
// last one by taking the delta between the current symbol and
// the next symbol
- for (uint32_t addr_index = info.match_index_ptr - m_addr_indexes.data() + 1;
+ for (uint32_t addr_index = info.match_index_ptr - &m_addr_indexes.front() + 1;
addr_index < num_addr_indexes;
++addr_index)
{
Modified: lldb/trunk/source/Symbol/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Type.cpp?rev=108957&r1=108956&r2=108957&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Type.cpp (original)
+++ lldb/trunk/source/Symbol/Type.cpp Tue Jul 20 17:52:08 2010
@@ -399,14 +399,14 @@
else
buf.resize (256);
- lldb_private::DataExtractor cstr_data(buf.data(), buf.size(), exe_ctx->process->GetByteOrder(), 4);
+ lldb_private::DataExtractor cstr_data(&buf.front(), buf.size(), exe_ctx->process->GetByteOrder(), 4);
buf.back() = '\0';
size_t bytes_read;
size_t total_cstr_len = 0;
Error error;
- while ((bytes_read = exe_ctx->process->ReadMemory (pointer_addresss, buf.data(), buf.size(), error)) > 0)
+ while ((bytes_read = exe_ctx->process->ReadMemory (pointer_addresss, &buf.front(), buf.size(), error)) > 0)
{
- const size_t len = strlen((const char *)buf.data());
+ const size_t len = strlen((const char *)&buf.front());
if (len == 0)
break;
if (total_cstr_len == 0)
Modified: lldb/trunk/source/Target/ObjCObjectPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ObjCObjectPrinter.cpp?rev=108957&r1=108956&r2=108957&view=diff
==============================================================================
--- lldb/trunk/source/Target/ObjCObjectPrinter.cpp (original)
+++ lldb/trunk/source/Target/ObjCObjectPrinter.cpp Tue Jul 20 17:52:08 2010
@@ -86,7 +86,7 @@
if (!desc.empty())
{
- str.SetCString(desc.data());
+ str.SetCString(&desc.front());
return true;
}
return false;
Modified: lldb/trunk/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=108957&r1=108956&r2=108957&view=diff
==============================================================================
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Tue Jul 20 17:52:08 2010
@@ -989,7 +989,12 @@
exec_path_plus_argv.push_back(NULL);
// Now launch using these arguments.
- error = DoLaunch (exe_module, exec_path_plus_argv.data(), envp, stdin_path, stdout_path, stderr_path);
+ error = DoLaunch (exe_module,
+ exec_path_plus_argv.empty() ? NULL : &exec_path_plus_argv.front(),
+ envp,
+ stdin_path,
+ stdout_path,
+ stderr_path);
if (error.Fail())
{
More information about the lldb-commits
mailing list