<rdar://problem/13069948>

Major fixed to allow reading files that are over 4GB. The main problems were that the DataExtractor was using 32 bit offsets as a data cursor, and since we mmap all of our object files we could run into cases where if we had a very large core file that was over 4GB, we were running into the 4GB boundary.

So I defined a new "lldb::offset_t" which should be used for all file offsets.

After making this change, I enabled warnings for data loss and for enexpected implicit conversions temporarily and found a ton of things that I fixed.

Any functions that take an index internally, should use "size_t" for any indexes and also should return "size_t" for any sizes of collections.

llvm-svn: 173463
This commit is contained in:
Greg Clayton
2013-01-25 18:06:21 +00:00
parent d0ed6c249d
commit c7bece56fa
248 changed files with 1676 additions and 1817 deletions

View File

@@ -215,30 +215,33 @@ OperatingSystemPython::CreateThreadFromThreadInfo (PythonDictionary &thread_dict
if (thread_dict)
{
PythonString tid_pystr("tid");
PythonString name_pystr("name");
PythonString queue_pystr("queue");
PythonString state_pystr("state");
PythonString stop_reason_pystr("stop_reason");
PythonString reg_data_addr_pystr ("register_data_addr");
const tid_t tid = thread_dict.GetItemForKeyAsInteger (tid_pystr, LLDB_INVALID_THREAD_ID);
const addr_t reg_data_addr = thread_dict.GetItemForKeyAsInteger (reg_data_addr_pystr, LLDB_INVALID_ADDRESS);
const char *name = thread_dict.GetItemForKeyAsString (name_pystr);
const char *queue = thread_dict.GetItemForKeyAsString (queue_pystr);
//const char *state = thread_dict.GetItemForKeyAsString (state_pystr);
//const char *stop_reason = thread_dict.GetItemForKeyAsString (stop_reason_pystr);
if (old_thread_list_ptr)
thread_sp = old_thread_list_ptr->FindThreadByID (tid, false);
if (!thread_sp)
if (tid != LLDB_INVALID_THREAD_ID)
{
if (did_create_ptr)
*did_create_ptr = true;
thread_sp.reset (new ThreadMemory (*m_process,
tid,
name,
queue,
reg_data_addr));
PythonString name_pystr("name");
PythonString queue_pystr("queue");
PythonString state_pystr("state");
PythonString stop_reason_pystr("stop_reason");
PythonString reg_data_addr_pystr ("register_data_addr");
const addr_t reg_data_addr = thread_dict.GetItemForKeyAsInteger (reg_data_addr_pystr, LLDB_INVALID_ADDRESS);
const char *name = thread_dict.GetItemForKeyAsString (name_pystr);
const char *queue = thread_dict.GetItemForKeyAsString (queue_pystr);
//const char *state = thread_dict.GetItemForKeyAsString (state_pystr);
//const char *stop_reason = thread_dict.GetItemForKeyAsString (stop_reason_pystr);
if (old_thread_list_ptr)
thread_sp = old_thread_list_ptr->FindThreadByID (tid, false);
if (!thread_sp)
{
if (did_create_ptr)
*did_create_ptr = true;
thread_sp.reset (new ThreadMemory (*m_process,
tid,
name,
queue,
reg_data_addr));
}
}
}
return thread_sp;