summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2010-12-08 05:08:21 +0000
committerGreg Clayton <gclayton@apple.com>2010-12-08 05:08:21 +0000
commit10177aa05ee6d38abb4575e3ba0bc9faff2dbca9 (patch)
tree1b5c886e2ba286dd80675db5a6468a5a84338b92 /lldb/source/Plugins
parentbc5cad6c6bcaaf95405337c9e57e96b66d736663 (diff)
downloadbcm5719-llvm-10177aa05ee6d38abb4575e3ba0bc9faff2dbca9.tar.gz
bcm5719-llvm-10177aa05ee6d38abb4575e3ba0bc9faff2dbca9.zip
Added the ability to dump sections to a certain depth (for when sections
have children sections). Modified SectionLoadList to do it's own multi-threaded protected on its map. The ThreadSafeSTLMap class was difficult to deal with and wasn't providing much utility, it was only getting in the way. Make sure when the communication read thread is about to exit, it clears the thread in the main class. Fixed the ModuleList to correctly ignore architectures and UUIDs if they aren't valid when searching for a matching module. If we specified a file with no arch, and then modified the file and loaded it again, it would not match on subsequent searches if the arch was invalid since it would compare an invalid architecture to the one that was found or selected within the shared library or executable. This was causing stale modules to stay around in the global module list when they should have been removed. Removed deprecated functions from the DynamicLoaderMacOSXDYLD class. Modified "ProcessGDBRemote::IsAlive" to check if we are connected to a gdb server and also make sure our process hasn't exited. llvm-svn: 121236
Diffstat (limited to 'lldb/source/Plugins')
-rw-r--r--lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp22
-rw-r--r--lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h12
-rw-r--r--lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp2
-rw-r--r--lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp2
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp2
5 files changed, 4 insertions, 36 deletions
diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
index 227a981b809..f0477e85208 100644
--- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
+++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
@@ -1019,33 +1019,13 @@ DynamicLoaderMacOSXDYLD::PutToLog(Log *log) const
}
}
-//----------------------------------------------------------------------
-// Static callback function that gets called when the process state
-// changes.
-//----------------------------------------------------------------------
-void
-DynamicLoaderMacOSXDYLD::Initialize(void *baton, Process *process)
-{
- ((DynamicLoaderMacOSXDYLD*)baton)->PrivateInitialize(process);
-}
-
void
DynamicLoaderMacOSXDYLD::PrivateInitialize(Process *process)
{
DEBUG_PRINTF("DynamicLoaderMacOSXDYLD::%s() process state = %s\n", __FUNCTION__, StateAsCString(m_process->GetState()));
Clear(true);
m_process = process;
-}
-
-
-//----------------------------------------------------------------------
-// Static callback function that gets called when the process state
-// changes.
-//----------------------------------------------------------------------
-void
-DynamicLoaderMacOSXDYLD::ProcessStateChanged(void *baton, Process *process, StateType state)
-{
- ((DynamicLoaderMacOSXDYLD*)baton)->PrivateProcessStateChanged(process, state);
+ m_process->GetTarget().GetSectionLoadList().Clear();
}
bool
diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h
index d8dbe711b3d..f4101eea45d 100644
--- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h
+++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h
@@ -62,18 +62,6 @@ public:
virtual void
DidLaunch ();
- //------------------------------------------------------------------
- // Process::Notifications callback functions
- //------------------------------------------------------------------
- static void
- Initialize (void *baton,
- lldb_private::Process *process);
-
- static void
- ProcessStateChanged (void *baton,
- lldb_private::Process *process,
- lldb::StateType state);
-
virtual lldb::ThreadPlanSP
GetStepThroughTrampolinePlan (lldb_private::Thread &thread,
bool stop_others);
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index 85c337f7ae1..3f6dd20fa95 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -684,7 +684,7 @@ ObjectFileELF::Dump(Stream *s)
s->EOL();
SectionList *section_list = GetSectionList();
if (section_list)
- section_list->Dump(s, NULL, true);
+ section_list->Dump(s, NULL, true, UINT32_MAX);
Symtab *symtab = GetSymtab();
if (symtab)
symtab->Dump(s, NULL, lldb::eSortOrderNone);
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index 51914f469b1..0e82a15f391 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -1346,7 +1346,7 @@ ObjectFileMachO::Dump (Stream *s)
*s << ", file = '" << m_file << "', arch = " << header_arch.AsCString() << "\n";
if (m_sections_ap.get())
- m_sections_ap->Dump(s, NULL, true);
+ m_sections_ap->Dump(s, NULL, true, UINT32_MAX);
if (m_symtab_ap.get())
m_symtab_ap->Dump(s, NULL, eSortOrderNone);
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 4cc5382dca9..bb36cee5735 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -1242,7 +1242,7 @@ ProcessGDBRemote::DoDestroy ()
bool
ProcessGDBRemote::IsAlive ()
{
- return m_gdb_comm.IsConnected();
+ return m_gdb_comm.IsConnected() && m_private_state.GetValue() != eStateExited;
}
addr_t
OpenPOWER on IntegriCloud