diff options
Diffstat (limited to 'lldb/source/Plugins')
4 files changed, 5 insertions, 89 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp index fbb72baf13e..cb2e1f96f6e 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp @@ -708,27 +708,6 @@ GDBRemoteCommunicationServer::Handle_qSpeedTest (StringExtractorGDBRemote &packe return SendErrorResponse (7); } - -static void * -AcceptPortFromInferior (void *arg) -{ - const char *connect_url = (const char *)arg; - ConnectionFileDescriptor file_conn; - Error error; - if (file_conn.Connect (connect_url, &error) == eConnectionStatusSuccess) - { - char pid_str[256]; - ::memset (pid_str, 0, sizeof(pid_str)); - ConnectionStatus status; - const size_t pid_str_len = file_conn.Read (pid_str, sizeof(pid_str), 0, status, NULL); - if (pid_str_len > 0) - { - int pid = atoi (pid_str); - return (void *)(intptr_t)pid; - } - } - return NULL; -} // //static bool //WaitForProcessToSIGSTOP (const lldb::pid_t pid, const int timeout_in_seconds) diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index bc9163f7f71..4e34a9a09a0 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -166,8 +166,6 @@ namespace { } // anonymous namespace end -static bool rand_initialized = false; - // TODO Randomly assigning a port is unsafe. We should get an unused // ephemeral port from the kernel and make sure we reserve it before passing // it to debugserver. @@ -180,19 +178,22 @@ static bool rand_initialized = false; #define HIGH_PORT (49151u) #endif +#if defined(__APPLE__) && defined(__arm__) +static bool rand_initialized = false; + static inline uint16_t get_random_port () { if (!rand_initialized) { time_t seed = time(NULL); - + rand_initialized = true; srand(seed); } return (rand() % (HIGH_PORT - LOW_PORT)) + LOW_PORT; } - +#endif lldb_private::ConstString ProcessGDBRemote::GetPluginNameStatic() diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp index b37bad9e5fb..15e850e9356 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp @@ -213,13 +213,6 @@ DWARFDebugInfo::ContainsCompileUnit (const DWARFCompileUnit *cu) const return false; } - -static bool CompileUnitOffsetLessThan (const DWARFCompileUnitSP& a, const DWARFCompileUnitSP& b) -{ - return a->GetOffset() < b->GetOffset(); -} - - static int CompareDWARFCompileUnitSPOffset (const void *key, const void *arrmem) { @@ -279,15 +272,6 @@ DWARFDebugInfo::GetCompileUnitContainingDIE(dw_offset_t die_offset) } //---------------------------------------------------------------------- -// Compare function DWARFDebugAranges::Range structures -//---------------------------------------------------------------------- -static bool CompareDIEOffset (const DWARFDebugInfoEntry& die1, const DWARFDebugInfoEntry& die2) -{ - return die1.GetOffset() < die2.GetOffset(); -} - - -//---------------------------------------------------------------------- // GetDIE() // // Get the DIE (Debug Information Entry) with the specified offset. @@ -340,40 +324,6 @@ DWARFDebugInfo::GetDIEPtrContainingOffset(dw_offset_t die_offset, DWARFCompileUn } //---------------------------------------------------------------------- -// DWARFDebugInfo_ParseCallback -// -// A callback function for the static DWARFDebugInfo::Parse() function -// that gets parses all compile units and DIE's into an internate -// representation for further modification. -//---------------------------------------------------------------------- - -static dw_offset_t -DWARFDebugInfo_ParseCallback -( - SymbolFileDWARF* dwarf2Data, - DWARFCompileUnitSP& cu_sp, - DWARFDebugInfoEntry* die, - const dw_offset_t next_offset, - const uint32_t curr_depth, - void* userData -) -{ - DWARFDebugInfo* debug_info = (DWARFDebugInfo*)userData; - DWARFCompileUnit* cu = cu_sp.get(); - if (die) - { - cu->AddDIE(*die); - } - else if (cu) - { - debug_info->AddCompileUnit(cu_sp); - } - - // Just return the current offset to parse the next CU or DIE entry - return next_offset; -} - -//---------------------------------------------------------------------- // AddCompileUnit //---------------------------------------------------------------------- void diff --git a/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp b/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp index 9beba517ec8..c0ecd596368 100644 --- a/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp +++ b/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp @@ -366,20 +366,6 @@ SymbolFileSymtab::FindFunctions(const RegularExpression& regex, bool include_inl return 0; } -static int CountMethodArgs(const char *method_signature) -{ - int num_args = 0; - - for (const char *colon_pos = strchr(method_signature, ':'); - colon_pos != NULL; - colon_pos = strchr(colon_pos + 1, ':')) - { - num_args++; - } - - return num_args; -} - uint32_t SymbolFileSymtab::FindTypes (const lldb_private::SymbolContext& sc, const lldb_private::ConstString &name, |

