Author: zturner Date: Sun Nov 18 12:48:25 2018 New Revision: 347174 URL: http://llvm.org/viewvc/llvm-project?rev=347174&view=rev Log: Revert "Implement basic DidAttach and DidLaunch for DynamicLoaderWindowsDYLD"
This breaks many tests on Windows, which now all fail with an error such as "Unable to read memory at address <xxxxxxxx>". Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/windows_dyld/ Modified: lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules lldb/trunk/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp Modified: lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules?rev=347174&r1=347173&r2=347174&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules (original) +++ lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules Sun Nov 18 12:48:25 2018 @@ -535,7 +535,7 @@ EXE = $(DYLIB_FILENAME) endif else $(EXE) : $(OBJECTS) $(ARCHIVE_NAME) - "$(LD)" $(OBJECTS) $(LDFLAGS) $(ARCHIVE_NAME) -o "$(EXE)" + $(LD) $(OBJECTS) $(LDFLAGS) $(ARCHIVE_NAME) -o "$(EXE)" ifneq "$(CODESIGN)" "" $(CODESIGN) -s - "$(EXE)" endif @@ -592,7 +592,7 @@ ifneq "$(DS)" "" endif endif else - "$(LD)" $(DYLIB_OBJECTS) $(LDFLAGS) -shared -o "$(DYLIB_FILENAME)" + $(LD) $(DYLIB_OBJECTS) $(LDFLAGS) -shared -o "$(DYLIB_FILENAME)" ifeq "$(SPLIT_DEBUG_SYMBOLS)" "YES" $(OBJCOPY) --only-keep-debug "$(DYLIB_FILENAME)" "$(DYLIB_FILENAME).debug" $(OBJCOPY) --strip-debug --add-gnu-debuglink="$(DYLIB_FILENAME).debug" "$(DYLIB_FILENAME)" "$(DYLIB_FILENAME)" Modified: lldb/trunk/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp?rev=347174&r1=347173&r2=347174&view=diff ============================================================================== --- lldb/trunk/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp (original) +++ lldb/trunk/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp Sun Nov 18 12:48:25 2018 @@ -10,14 +10,12 @@ #include "DynamicLoaderWindowsDYLD.h" -#include "lldb/Core/Module.h" #include "lldb/Core/PluginManager.h" #include "lldb/Target/ExecutionContext.h" #include "lldb/Target/Process.h" #include "lldb/Target/RegisterContext.h" #include "lldb/Target/Target.h" #include "lldb/Target/ThreadPlanStepInstruction.h" -#include "lldb/Utility/Log.h" #include "llvm/ADT/Triple.h" @@ -62,49 +60,9 @@ DynamicLoader *DynamicLoaderWindowsDYLD: return nullptr; } -void DynamicLoaderWindowsDYLD::DidAttach() { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER)); - if (log) - log->Printf("DynamicLoaderWindowsDYLD::%s()", __FUNCTION__); +void DynamicLoaderWindowsDYLD::DidAttach() {} - DidLaunch(); - - m_process->LoadModules(); -} - -void DynamicLoaderWindowsDYLD::DidLaunch() { - Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER)); - if (log) - log->Printf("DynamicLoaderWindowsDYLD::%s()", __FUNCTION__); - - ModuleSP executable = GetTargetExecutable(); - - if (!executable.get()) - return; - - // Try to fetch the load address of the file from the process, since there - // could be randomization of the load address. - - // It might happen that the remote has a different dir for the file, so we - // only send the basename of the executable in the query. I think this is safe - // because I doubt that two executables with the same basenames are loaded in - // memory... - FileSpec file_spec( - executable->GetPlatformFileSpec().GetFilename().GetCString()); - bool is_loaded; - addr_t base_addr = 0; - lldb::addr_t load_addr; - Status error = m_process->GetFileLoadAddress(file_spec, is_loaded, load_addr); - if (error.Success() && is_loaded) { - base_addr = load_addr; - } - - UpdateLoadedSections(executable, LLDB_INVALID_ADDRESS, base_addr, false); - - ModuleList module_list; - module_list.Append(executable); - m_process->GetTarget().ModulesDidLoad(module_list); -} +void DynamicLoaderWindowsDYLD::DidLaunch() {} Status DynamicLoaderWindowsDYLD::CanLoadImage() { return Status(); } _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits