[Lldb-commits] [PATCH] D31138: Add stub for PluginProcessNetBSD
labath added a comment. I like the idea of adding boilerplate first, so that we can than better focus on the important stuff later. However, I think you've have gone a bit too far with it -- you introduce a lot of functions I am pretty sure will not be necessary for your case, or that should be handled differently (software single stepping stuff, handling of linux thread stopping, ...). Could we trim this down to just the functions that are necessary to get this building (basically just virtual overrides -- no private functions or members)? Those can be always added along with the patch that implements them, and then we will be in a better position to review it. Repository: rL LLVM https://reviews.llvm.org/D31138 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D31146: Enable AUXV and QPassSignals in gdb-remote for NetBSD
labath accepted this revision. labath added a comment. This revision is now accepted and ready to land. At one point we will need to come up with a better way to control these features. Repository: rL LLVM https://reviews.llvm.org/D31146 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D31138: Add stub for PluginProcessNetBSD
krytarowski added a comment. In https://reviews.llvm.org/D31138#706216, @labath wrote: > I like the idea of adding boilerplate first, so that we can than better focus > on the important stuff later. However, I think you've have gone a bit too far > with it -- you introduce a lot of functions I am pretty sure will not be > necessary for your case, or that should be handled differently (software > single stepping stuff, handling of linux thread stopping, ...). > > Could we trim this down to just the functions that are necessary to get this > building (basically just virtual overrides -- no private functions or > members)? Those can be always added along with the patch that implements > them, and then we will be in a better position to review it. I will go for it. Your idea is good. I originally planned to trim unneeded chunks afterwards, but this direction is cleaner. Repository: rL LLVM https://reviews.llvm.org/D31138 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D31146: Enable AUXV and QPassSignals in gdb-remote for NetBSD
krytarowski added a comment. I'm still evaluating whether to implement on the kernel side `PT_SET_SIGPASS`/`PT_GET_SIGPASS`. Some software like floating point can use it heavily. Repository: rL LLVM https://reviews.llvm.org/D31146 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D31129: Remove remaining platform specific code from FileSpec
labath added a comment. In https://reviews.llvm.org/D31129#705597, @zturner wrote: > See what you think about this. I've created a folder called `Mocks` under > `Utility`, and created a new target out of it. `UtilityTests` links against > it, and so does `InterpreterTests`. To do this I had to add the lldb project > root as an include directory, this way you can write `#include > "unittests/Utility/Mocks/MockTildeExpressionResolver.h"`. Another > possibility would be to create `lldb/unittests/Mocks/Mocks/Utility`, and then > add `lldb/unittests/Mocks` as an include folder. This way you could write > `#include "Mocks/Utility/MockTildeExpressionResolver.h"`. I don't have a > strong preference either way. > > I explicitly chose NOT to make one single target for all mocks (although > there is only one right now obviously), because then you would have > `UtilityTests` bringing in mocks from projects it doesn't depend on, and thus > it would link against those projects as well, breaking the library layering. It's not exactly the pinnacle of elegance, but I think this is better (and I don't know how I would improve it). The only thing I am not sure about is the `Mocks` folder name. I am thinking that we may run into the situation where we have some other test-only code we want to share, but it is not strictly a "mock". The only function that comes to mind right now is the `CreateConnectedSockets` from SocketTest.cpp -- I could have to reused this in gdb-remote tests, although I eventually opted for reimplementing it, as I could make it a lot simpler for this special case. (Although in this case it may have made sense to add a function like that to the regular codebase). I don't really have a good suggestion for a name though, so maybe we can leave this until a real case for it comes up. https://reviews.llvm.org/D31129 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D31146: Enable AUXV and QPassSignals in gdb-remote for NetBSD
labath added a comment. In https://reviews.llvm.org/D31146#706249, @krytarowski wrote: > I'm still evaluating whether to implement on the kernel side > `PT_SET_SIGPASS`/`PT_GET_SIGPASS`. Some software like floating point can use > it heavily. Also there are programs which use SIGALRM or realtime signals very extensively, and those can get very much slowed down by a debugger. I think this would be a great addition, particularly as stopping a process is a much heavier operation on netbsd. I wish linux had that. Repository: rL LLVM https://reviews.llvm.org/D31146 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r298375 - Replace std::ofstream with llvm::raw_fd_ostream
Author: labath Date: Tue Mar 21 08:49:50 2017 New Revision: 298375 URL: http://llvm.org/viewvc/llvm-project?rev=298375&view=rev Log: Replace std::ofstream with llvm::raw_fd_ostream Summary: ofstream does not handle paths with non-ascii characters correctly on windows, so I am switching these to llvm streams to fix that. Reviewers: zturner, eugene Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D31079 Modified: lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp lldb/trunk/source/Target/Platform.cpp lldb/trunk/tools/lldb-server/lldb-platform.cpp Modified: lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp?rev=298375&r1=298374&r2=298375&view=diff == --- lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp (original) +++ lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp Tue Mar 21 08:49:50 2017 @@ -402,13 +402,14 @@ Error AdbClient::ShellToFile(const char return error; const auto output_filename = output_file_spec.GetPath(); - std::ofstream dst(output_filename, std::ios::out | std::ios::binary); - if (!dst.is_open()) + std::error_code EC; + llvm::raw_fd_ostream dst(output_filename, EC, llvm::sys::fs::F_None); + if (EC) return Error("Unable to open local file %s", output_filename.c_str()); dst.write(&output_buffer[0], output_buffer.size()); dst.close(); - if (!dst) + if (dst.has_error()) return Error("Failed to write file %s", output_filename.c_str()); return Error(); } @@ -428,8 +429,9 @@ Error AdbClient::SyncService::internalPu const auto local_file_path = local_file.GetPath(); llvm::FileRemover local_file_remover(local_file_path); - std::ofstream dst(local_file_path, std::ios::out | std::ios::binary); - if (!dst.is_open()) + std::error_code EC; + llvm::raw_fd_ostream dst(local_file_path, EC, llvm::sys::fs::F_None); + if (EC) return Error("Unable to open local file %s", local_file_path.c_str()); const auto remote_file_path = remote_file.GetPath(false); @@ -447,6 +449,9 @@ Error AdbClient::SyncService::internalPu if (!eof) dst.write(&chunk[0], chunk.size()); } + dst.close(); + if (dst.has_error()) +return Error("Failed to write file %s", local_file_path.c_str()); local_file_remover.releaseFile(); return error; Modified: lldb/trunk/source/Target/Platform.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Platform.cpp?rev=298375&r1=298374&r2=298375&view=diff == --- lldb/trunk/source/Target/Platform.cpp (original) +++ lldb/trunk/source/Target/Platform.cpp Tue Mar 21 08:49:50 2017 @@ -1645,8 +1645,9 @@ Error Platform::DownloadModuleSlice(cons const FileSpec &dst_file_spec) { Error error; - std::ofstream dst(dst_file_spec.GetPath(), std::ios::out | std::ios::binary); - if (!dst.is_open()) { + std::error_code EC; + llvm::raw_fd_ostream dst(dst_file_spec.GetPath(), EC, llvm::sys::fs::F_None); + if (EC) { error.SetErrorStringWithFormat("unable to open destination file: %s", dst_file_spec.GetPath().c_str()); return error; Modified: lldb/trunk/tools/lldb-server/lldb-platform.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-server/lldb-platform.cpp?rev=298375&r1=298374&r2=298375&view=diff == --- lldb/trunk/tools/lldb-server/lldb-platform.cpp (original) +++ lldb/trunk/tools/lldb-server/lldb-platform.cpp Tue Mar 21 08:49:50 2017 @@ -106,23 +106,25 @@ static Error save_socket_id_to_file(cons return Error("Failed to create directory %s: %s", temp_file_spec.GetCString(), error.AsCString()); - llvm::SmallString temp_file_path; + llvm::SmallString<64> temp_file_path; temp_file_spec.AppendPathComponent("port-file.%%"); - auto err_code = llvm::sys::fs::createUniqueFile(temp_file_spec.GetCString(), + int FD; + auto err_code = llvm::sys::fs::createUniqueFile(temp_file_spec.GetPath(), FD, temp_file_path); if (err_code) return Error("Failed to create temp file: %s", err_code.message().c_str()); - llvm::FileRemover tmp_file_remover(temp_file_path.c_str()); + llvm::FileRemover tmp_file_remover(temp_file_path); { -std::ofstream temp_file(temp_file_path.c_str(), std::ios::out); -if (!temp_file.is_open()) - return Error("Failed to open temp file %s", temp_file_path.c_str()); +llvm::raw_fd_ostream temp_file(FD, true); temp_file << socket_id; +temp_file.close(); +if (temp_file.has_error()) + return Error("Failed to write to port file."); } - err_code = llvm::sys::fs::rename(temp_file_path
[Lldb-commits] [lldb] r298374 - Remove ProcFileReader
Author: labath Date: Tue Mar 21 08:49:45 2017 New Revision: 298374 URL: http://llvm.org/viewvc/llvm-project?rev=298374&view=rev Log: Remove ProcFileReader This removes the last usage of ProcFileReader from NativeProcessLinux and then deletes the class itself. Removed: lldb/trunk/source/Plugins/Process/Linux/ProcFileReader.cpp lldb/trunk/source/Plugins/Process/Linux/ProcFileReader.h Modified: lldb/trunk/source/Plugins/Process/Linux/CMakeLists.txt lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp Modified: lldb/trunk/source/Plugins/Process/Linux/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/CMakeLists.txt?rev=298374&r1=298373&r2=298374&view=diff == --- lldb/trunk/source/Plugins/Process/Linux/CMakeLists.txt (original) +++ lldb/trunk/source/Plugins/Process/Linux/CMakeLists.txt Tue Mar 21 08:49:45 2017 @@ -11,7 +11,6 @@ add_lldb_library(lldbPluginProcessLinux NativeRegisterContextLinux_mips64.cpp NativeRegisterContextLinux_s390x.cpp NativeThreadLinux.cpp - ProcFileReader.cpp SingleStepCheck.cpp LINK_LIBS Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp?rev=298374&r1=298373&r2=298374&view=diff == --- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp (original) +++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp Tue Mar 21 08:49:45 2017 @@ -46,7 +46,6 @@ #include "NativeThreadLinux.h" #include "Plugins/Process/POSIX/ProcessPOSIXLog.h" -#include "ProcFileReader.h" #include "Procfs.h" #include "llvm/Support/FileSystem.h" @@ -1432,11 +1431,11 @@ Error NativeProcessLinux::Kill() { } static Error -ParseMemoryRegionInfoFromProcMapsLine(const std::string &maps_line, +ParseMemoryRegionInfoFromProcMapsLine(llvm::StringRef &maps_line, MemoryRegionInfo &memory_region_info) { memory_region_info.Clear(); - StringExtractor line_extractor(maps_line.c_str()); + StringExtractor line_extractor(maps_line); // Format: {address_start_hex}-{address_end_hex} perms offset dev inode // pathname @@ -1597,36 +1596,36 @@ Error NativeProcessLinux::PopulateMemory return Error(); } - Error error = ProcFileReader::ProcessLineByLine( - GetID(), "maps", [&](const std::string &line) -> bool { -MemoryRegionInfo info; -const Error parse_error = -ParseMemoryRegionInfoFromProcMapsLine(line, info); -if (parse_error.Success()) { - m_mem_region_cache.emplace_back( - info, FileSpec(info.GetName().GetCString(), true)); - return true; -} else { - LLDB_LOG(log, "failed to parse proc maps line '{0}': {1}", line, - parse_error); - return false; -} - }); - - // If we had an error, we'll mark unsupported. - if (error.Fail()) { + auto BufferOrError = getProcFile(GetID(), "maps"); + if (!BufferOrError) { m_supports_mem_region = LazyBool::eLazyBoolNo; -return error; - } else if (m_mem_region_cache.empty()) { +return BufferOrError.getError(); + } + StringRef Rest = BufferOrError.get()->getBuffer(); + while (! Rest.empty()) { +StringRef Line; +std::tie(Line, Rest) = Rest.split('\n'); +MemoryRegionInfo info; +const Error parse_error = ParseMemoryRegionInfoFromProcMapsLine(Line, info); +if (parse_error.Fail()) { + LLDB_LOG(log, "failed to parse proc maps line '{0}': {1}", Line, + parse_error); + m_supports_mem_region = LazyBool::eLazyBoolNo; + return parse_error; +} +m_mem_region_cache.emplace_back( +info, FileSpec(info.GetName().GetCString(), true)); + } + + if (m_mem_region_cache.empty()) { // No entries after attempting to read them. This shouldn't happen if // /proc/{pid}/maps is supported. Assume we don't support map entries // via procfs. +m_supports_mem_region = LazyBool::eLazyBoolNo; LLDB_LOG(log, "failed to find any procfs maps entries, assuming no support " "for memory region metadata retrieval"); -m_supports_mem_region = LazyBool::eLazyBoolNo; -error.SetErrorString("not supported"); -return error; +return Error("not supported"); } LLDB_LOG(log, "read {0} memory region entries from /proc/{1}/maps", Removed: lldb/trunk/source/Plugins/Process/Linux/ProcFileReader.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/ProcFileReader.cpp?rev=298373&view=auto == --- lldb/trunk/source/Plugins/Process/Linux/ProcFileReader.cpp (original) +++ lldb/trunk/source/Plugins/Process/Linux/ProcFi
[Lldb-commits] [PATCH] D31079: Replace std::ofstream with llvm::raw_fd_ostream
This revision was automatically updated to reflect the committed changes. Closed by commit rL298375: Replace std::ofstream with llvm::raw_fd_ostream (authored by labath). Changed prior to commit: https://reviews.llvm.org/D31079?vs=92144&id=92484#toc Repository: rL LLVM https://reviews.llvm.org/D31079 Files: lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp lldb/trunk/source/Target/Platform.cpp lldb/trunk/tools/lldb-server/lldb-platform.cpp Index: lldb/trunk/source/Target/Platform.cpp === --- lldb/trunk/source/Target/Platform.cpp +++ lldb/trunk/source/Target/Platform.cpp @@ -1645,8 +1645,9 @@ const FileSpec &dst_file_spec) { Error error; - std::ofstream dst(dst_file_spec.GetPath(), std::ios::out | std::ios::binary); - if (!dst.is_open()) { + std::error_code EC; + llvm::raw_fd_ostream dst(dst_file_spec.GetPath(), EC, llvm::sys::fs::F_None); + if (EC) { error.SetErrorStringWithFormat("unable to open destination file: %s", dst_file_spec.GetPath().c_str()); return error; Index: lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp === --- lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp +++ lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp @@ -402,13 +402,14 @@ return error; const auto output_filename = output_file_spec.GetPath(); - std::ofstream dst(output_filename, std::ios::out | std::ios::binary); - if (!dst.is_open()) + std::error_code EC; + llvm::raw_fd_ostream dst(output_filename, EC, llvm::sys::fs::F_None); + if (EC) return Error("Unable to open local file %s", output_filename.c_str()); dst.write(&output_buffer[0], output_buffer.size()); dst.close(); - if (!dst) + if (dst.has_error()) return Error("Failed to write file %s", output_filename.c_str()); return Error(); } @@ -428,8 +429,9 @@ const auto local_file_path = local_file.GetPath(); llvm::FileRemover local_file_remover(local_file_path); - std::ofstream dst(local_file_path, std::ios::out | std::ios::binary); - if (!dst.is_open()) + std::error_code EC; + llvm::raw_fd_ostream dst(local_file_path, EC, llvm::sys::fs::F_None); + if (EC) return Error("Unable to open local file %s", local_file_path.c_str()); const auto remote_file_path = remote_file.GetPath(false); @@ -447,6 +449,9 @@ if (!eof) dst.write(&chunk[0], chunk.size()); } + dst.close(); + if (dst.has_error()) +return Error("Failed to write file %s", local_file_path.c_str()); local_file_remover.releaseFile(); return error; Index: lldb/trunk/tools/lldb-server/lldb-platform.cpp === --- lldb/trunk/tools/lldb-server/lldb-platform.cpp +++ lldb/trunk/tools/lldb-server/lldb-platform.cpp @@ -106,23 +106,25 @@ return Error("Failed to create directory %s: %s", temp_file_spec.GetCString(), error.AsCString()); - llvm::SmallString temp_file_path; + llvm::SmallString<64> temp_file_path; temp_file_spec.AppendPathComponent("port-file.%%"); - auto err_code = llvm::sys::fs::createUniqueFile(temp_file_spec.GetCString(), + int FD; + auto err_code = llvm::sys::fs::createUniqueFile(temp_file_spec.GetPath(), FD, temp_file_path); if (err_code) return Error("Failed to create temp file: %s", err_code.message().c_str()); - llvm::FileRemover tmp_file_remover(temp_file_path.c_str()); + llvm::FileRemover tmp_file_remover(temp_file_path); { -std::ofstream temp_file(temp_file_path.c_str(), std::ios::out); -if (!temp_file.is_open()) - return Error("Failed to open temp file %s", temp_file_path.c_str()); +llvm::raw_fd_ostream temp_file(FD, true); temp_file << socket_id; +temp_file.close(); +if (temp_file.has_error()) + return Error("Failed to write to port file."); } - err_code = llvm::sys::fs::rename(temp_file_path.c_str(), file_spec.GetPath()); + err_code = llvm::sys::fs::rename(temp_file_path, file_spec.GetPath()); if (err_code) return Error("Failed to rename file %s to %s: %s", temp_file_path.c_str(), file_spec.GetPath().c_str(), err_code.message().c_str()); Index: lldb/trunk/source/Target/Platform.cpp === --- lldb/trunk/source/Target/Platform.cpp +++ lldb/trunk/source/Target/Platform.cpp @@ -1645,8 +1645,9 @@ const FileSpec &dst_file_spec) { Error error; - std::ofstream dst(dst_file_spec.GetPath(), std::ios::out | std::ios::binary); - if (!dst.is_open()) { + std::error_code EC; + llvm::raw_fd_ostream dst(dst_file_spec.GetPath(), EC, llvm::sys::fs::F_None); + if (EC) { error.SetErrorStringWithFormat("unable to open destination file:
[Lldb-commits] [PATCH] D31131: [LLDB] OpenBSD support
krytarowski added inline comments. Comment at: source/Host/openbsd/HostInfoOpenBSD.cpp:20 + +uint32_t HostInfoOpenBSD::GetMaxThreadNameLength() { return 16; } + The need for this has been removed in trunk. Repository: rL LLVM https://reviews.llvm.org/D31131 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D31138: Add stub for PluginProcessNetBSD
krytarowski updated this revision to Diff 92492. krytarowski added a comment. Style fix. Repository: rL LLVM https://reviews.llvm.org/D31138 Files: source/Plugins/Process/CMakeLists.txt source/Plugins/Process/NetBSD/CMakeLists.txt source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp source/Plugins/Process/NetBSD/NativeProcessNetBSD.h source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.cpp source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp source/Plugins/Process/NetBSD/NativeThreadNetBSD.h tools/lldb-server/CMakeLists.txt Index: tools/lldb-server/CMakeLists.txt === --- tools/lldb-server/CMakeLists.txt +++ tools/lldb-server/CMakeLists.txt @@ -17,6 +17,7 @@ if ( CMAKE_SYSTEM_NAME MATCHES "NetBSD" ) include_directories( ../../../../llvm/include + ../../source/Plugins/Process/NetBSD ../../source/Plugins/Process/POSIX ) endif () Index: source/Plugins/Process/NetBSD/NativeThreadNetBSD.h === --- /dev/null +++ source/Plugins/Process/NetBSD/NativeThreadNetBSD.h @@ -0,0 +1,31 @@ +//===-- NativeThreadNetBSD.h -- -*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===--===// + +#ifndef liblldb_NativeThreadNetBSD_H_ +#define liblldb_NativeThreadNetBSD_H_ + +#include "lldb/Host/common/NativeThreadProtocol.h" + +namespace lldb_private { +namespace process_netbsd { + +class NativeProcessNetBSD; + +class NativeThreadNetBSD : public NativeThreadProtocol { + friend class NativeProcessNetBSD; + +public: + NativeThreadNetBSD(NativeProcessNetBSD *process, lldb::tid_t tid); +}; + +typedef std::shared_ptr NativeThreadNetBSDSP; +} // namespace process_netbsd +} // namespace lldb_private + +#endif // #ifndef liblldb_NativeThreadNetBSD_H_ Index: source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp === --- /dev/null +++ source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp @@ -0,0 +1,21 @@ +//===-- NativeThreadNetBSD.cpp -*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===--===// + +#include "NativeThreadNetBSD.h" +#include "NativeRegisterContextNetBSD.h" + +#include "NativeProcessNetBSD.h" + +using namespace lldb; +using namespace lldb_private; +using namespace lldb_private::process_netbsd; + +NativeThreadNetBSD::NativeThreadNetBSD(NativeProcessNetBSD *process, + lldb::tid_t tid) +: NativeThreadProtocol(process, tid) {} Index: source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h === --- /dev/null +++ source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h @@ -0,0 +1,41 @@ +//===-- NativeRegisterContextNetBSD.h ---*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===--===// + +#ifndef lldb_NativeRegisterContextNetBSD_h +#define lldb_NativeRegisterContextNetBSD_h + +#include "lldb/Host/common/NativeRegisterContextRegisterInfo.h" +#include "lldb/Host/common/NativeThreadProtocol.h" + +#include "Plugins/Process/NetBSD/NativeProcessNetBSD.h" + +namespace lldb_private { +namespace process_netbsd { + +class NativeRegisterContextNetBSD : public NativeRegisterContextRegisterInfo { +public: + NativeRegisterContextNetBSD(NativeThreadProtocol &native_thread, + uint32_t concrete_frame_idx, + RegisterInfoInterface *reg_info_interface_p); + + // This function is implemented in the NativeRegisterContextNetBSD_* + // subclasses to create a new instance of the host specific + // NativeRegisterContextNetBSD. The implementations can't collide as only one + // NativeRegisterContextNetBSD_* variant should be compiled into the final + // executable. + static NativeRegisterContextNetBSD * + CreateHostNativeRegisterContextNetBSD(const ArchSpec &target_arch, +NativeThreadProtocol &native_thread, +uint32_t concrete_frame_idx); +}; + +} // namespace process_netbsd +} // namespace lldb_private + +#endif // #ifndef lldb_NativeRegisterContextNetBSD_h Index: source/Plugin
[Lldb-commits] [PATCH] D31138: Add stub for PluginProcessNetBSD
krytarowski updated this revision to Diff 92490. krytarowski edited the summary of this revision. krytarowski added a comment. Cut down the unused functions from the Native Process NetBSD Plugin. Repository: rL LLVM https://reviews.llvm.org/D31138 Files: source/Plugins/Process/CMakeLists.txt source/Plugins/Process/NetBSD/CMakeLists.txt source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp source/Plugins/Process/NetBSD/NativeProcessNetBSD.h source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.cpp source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp source/Plugins/Process/NetBSD/NativeThreadNetBSD.h tools/lldb-server/CMakeLists.txt Index: tools/lldb-server/CMakeLists.txt === --- tools/lldb-server/CMakeLists.txt +++ tools/lldb-server/CMakeLists.txt @@ -17,6 +17,7 @@ if ( CMAKE_SYSTEM_NAME MATCHES "NetBSD" ) include_directories( ../../../../llvm/include + ../../source/Plugins/Process/NetBSD ../../source/Plugins/Process/POSIX ) endif () Index: source/Plugins/Process/NetBSD/NativeThreadNetBSD.h === --- /dev/null +++ source/Plugins/Process/NetBSD/NativeThreadNetBSD.h @@ -0,0 +1,31 @@ +//===-- NativeThreadNetBSD.h -- -*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===--===// + +#ifndef liblldb_NativeThreadNetBSD_H_ +#define liblldb_NativeThreadNetBSD_H_ + +#include "lldb/Host/common/NativeThreadProtocol.h" + +namespace lldb_private { +namespace process_netbsd { + +class NativeProcessNetBSD; + +class NativeThreadNetBSD : public NativeThreadProtocol { + friend class NativeProcessNetBSD; + +public: + NativeThreadNetBSD(NativeProcessNetBSD *process, lldb::tid_t tid); +}; + +typedef std::shared_ptr NativeThreadNetBSDSP; +} // namespace process_netbsd +} // namespace lldb_private + +#endif // #ifndef liblldb_NativeThreadNetBSD_H_ Index: source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp === --- /dev/null +++ source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp @@ -0,0 +1,21 @@ +//===-- NativeThreadNetBSD.cpp -*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===--===// + +#include "NativeThreadNetBSD.h" +#include "NativeRegisterContextNetBSD.h" + +#include "NativeProcessNetBSD.h" + +using namespace lldb; +using namespace lldb_private; +using namespace lldb_private::process_netbsd; + +NativeThreadNetBSD::NativeThreadNetBSD(NativeProcessNetBSD *process, + lldb::tid_t tid) +: NativeThreadProtocol(process, tid) {} Index: source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h === --- /dev/null +++ source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h @@ -0,0 +1,41 @@ +//===-- NativeRegisterContextNetBSD.h ---*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===--===// + +#ifndef lldb_NativeRegisterContextNetBSD_h +#define lldb_NativeRegisterContextNetBSD_h + +#include "lldb/Host/common/NativeRegisterContextRegisterInfo.h" +#include "lldb/Host/common/NativeThreadProtocol.h" + +#include "Plugins/Process/NetBSD/NativeProcessNetBSD.h" + +namespace lldb_private { +namespace process_netbsd { + +class NativeRegisterContextNetBSD : public NativeRegisterContextRegisterInfo { +public: + NativeRegisterContextNetBSD(NativeThreadProtocol &native_thread, + uint32_t concrete_frame_idx, + RegisterInfoInterface *reg_info_interface_p); + + // This function is implemented in the NativeRegisterContextNetBSD_* + // subclasses to create a new instance of the host specific + // NativeRegisterContextNetBSD. The implementations can't collide as only one + // NativeRegisterContextNetBSD_* variant should be compiled into the final + // executable. + static NativeRegisterContextNetBSD * + CreateHostNativeRegisterContextNetBSD(const ArchSpec &target_arch, +NativeThreadProtocol &native_thread, +uint32_t concrete_frame_idx); +}; + +} // namespace process_netbs
[Lldb-commits] [PATCH] D31191: Enable ProcessPOSIXLog on NetBSD
krytarowski created this revision. krytarowski added a project: LLDB. NetBSD can share the same logging functionality with Linux and FreeBSD. Sponsored by Repository: rL LLVM https://reviews.llvm.org/D31191 Files: source/Initialization/SystemInitializerCommon.cpp Index: source/Initialization/SystemInitializerCommon.cpp === --- source/Initialization/SystemInitializerCommon.cpp +++ source/Initialization/SystemInitializerCommon.cpp @@ -26,7 +26,7 @@ #include "Plugins/ObjectFile/Mach-O/ObjectFileMachO.h" #endif -#if defined(__linux__) || defined(__FreeBSD__) +#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) #include "Plugins/Process/POSIX/ProcessPOSIXLog.h" #endif @@ -93,7 +93,7 @@ #if defined(__APPLE__) ObjectFileMachO::Initialize(); #endif -#if defined(__linux__) || defined(__FreeBSD__) +#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) ProcessPOSIXLog::Initialize(); #endif #if defined(_MSC_VER) Index: source/Initialization/SystemInitializerCommon.cpp === --- source/Initialization/SystemInitializerCommon.cpp +++ source/Initialization/SystemInitializerCommon.cpp @@ -26,7 +26,7 @@ #include "Plugins/ObjectFile/Mach-O/ObjectFileMachO.h" #endif -#if defined(__linux__) || defined(__FreeBSD__) +#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) #include "Plugins/Process/POSIX/ProcessPOSIXLog.h" #endif @@ -93,7 +93,7 @@ #if defined(__APPLE__) ObjectFileMachO::Initialize(); #endif -#if defined(__linux__) || defined(__FreeBSD__) +#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) ProcessPOSIXLog::Initialize(); #endif #if defined(_MSC_VER) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D31138: Add stub for PluginProcessNetBSD
labath accepted this revision. labath added a comment. This revision is now accepted and ready to land. Heh... I did not expect it would get this small, but ok. :) Repository: rL LLVM https://reviews.llvm.org/D31138 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D31192: Create instance of DynamicLoaderPOSIXDYLD on NetBSD
krytarowski created this revision. krytarowski added a project: LLDB. NetBSD is a modern ELF UNIX-like system. There is requires DynamicLoaderPOSIXDYLD e.g. for ELF AUXV reading from the client. Sponsored by Repository: rL LLVM https://reviews.llvm.org/D31192 Files: source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp Index: source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp === --- source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp +++ source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp @@ -63,8 +63,9 @@ if (!create) { const llvm::Triple &triple_ref = process->GetTarget().GetArchitecture().GetTriple(); -if (triple_ref.getOS() == llvm::Triple::Linux || -triple_ref.getOS() == llvm::Triple::FreeBSD) +if (triple_ref.getOS() == llvm::Triple::FreeBSD || +triple_ref.getOS() == llvm::Triple::Linux || +triple_ref.getOS() == llvm::Triple::NetBSD) create = true; } Index: source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp === --- source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp +++ source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp @@ -63,8 +63,9 @@ if (!create) { const llvm::Triple &triple_ref = process->GetTarget().GetArchitecture().GetTriple(); -if (triple_ref.getOS() == llvm::Triple::Linux || -triple_ref.getOS() == llvm::Triple::FreeBSD) +if (triple_ref.getOS() == llvm::Triple::FreeBSD || +triple_ref.getOS() == llvm::Triple::Linux || +triple_ref.getOS() == llvm::Triple::NetBSD) create = true; } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D31192: Create instance of DynamicLoaderPOSIXDYLD on NetBSD
labath accepted this revision. labath added a comment. This revision is now accepted and ready to land. I think you should group these "add netbsd to a list" type of changes into single diff. There's not point in reviewing each separately. Repository: rL LLVM https://reviews.llvm.org/D31192 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D31172: Move stop info override callback code from ArchSpec into Process
jingham requested changes to this revision. jingham added a comment. This revision now requires changes to proceed. It looks like you are bundling two changes into one patch, one to move the StopInfoOverrideCallback from ArchSpec to Process, and one to change how the help for the list of architectures is computed. Are these linked in some way I'm missing? I don't have a strong opinion about whether this callback belongs in ArchSpec, but I don't think it belongs in Process. We've been trying hard to keep the algorithms in Process architecture independent, and that seems a worthy goal since otherwise it's going to be too easy to let little architecture specific hacks creep in and make the logic harder to follow. If you have some strong reason to take this out of ArchSpec then maybe we need another container for architecture specific algorithms. But I don't think Process is the right place for this. https://reviews.llvm.org/D31172 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r298399 - Update for LLVM API rename of AttributeSet -> AttributeList
Author: rnk Date: Tue Mar 21 12:09:20 2017 New Revision: 298399 URL: http://llvm.org/viewvc/llvm-project?rev=298399&view=rev Log: Update for LLVM API rename of AttributeSet -> AttributeList Modified: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp Modified: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp?rev=298399&r1=298398&r2=298399&view=diff == --- lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp (original) +++ lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp Tue Mar 21 12:09:20 2017 @@ -248,7 +248,7 @@ bool fixupRSAllocationStructByValCalls(l rs_functions.insert(call_inst->getCalledFunction()); // get the function attributes -llvm::AttributeSet call_attribs = call_inst->getAttributes(); +llvm::AttributeList call_attribs = call_inst->getAttributes(); // iterate over the argument attributes for (size_t i = 1; i <= call_attribs.getNumSlots(); ++i) { @@ -261,15 +261,12 @@ bool fixupRSAllocationStructByValCalls(l } } - llvm::AttributeSet attr_byval = - llvm::AttributeSet::get(module.getContext(), 1u, llvm::Attribute::ByVal); - // for all called function decls for (auto func : rs_functions) { // inspect all of the arguments in the call for (auto &arg : func->args()) { if (arg.hasByValAttr()) { -arg.removeAttr(attr_byval); +arg.removeAttr(llvm::Attribute::ByVal)); changed = true; } } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D31172: Move stop info override callback code from ArchSpec into Process
zturner added a comment. The architecture help change snuck in, I already removed it locally but didn't re-upload. As for why I'm trying to get this out of `ArchSpec`, it turns out `ArchSpec` is one of the biggest causes of dependency cycles. It's used all over the place, which triggers a dependency from Everywhere -> Core, and then it depends on Target, a couple of Plugins, and Host. There's only a very small amount of code in `ArchSpec` that accounts for all of these dependencies though. The first is this code that I'm attempting to move, the second is the code to set the triple given a Platform. So I wanted to tackle these one at a time. One option would be to make `lldb/Process/StopInfoOverride.h` and cpp, and put the code there. Thoughts? https://reviews.llvm.org/D31172 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r298402 - Remove stray paren that got in while attempting to fix the build for AttributeList
Author: rnk Date: Tue Mar 21 12:15:50 2017 New Revision: 298402 URL: http://llvm.org/viewvc/llvm-project?rev=298402&view=rev Log: Remove stray paren that got in while attempting to fix the build for AttributeList Modified: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp Modified: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp?rev=298402&r1=298401&r2=298402&view=diff == --- lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp (original) +++ lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp Tue Mar 21 12:15:50 2017 @@ -266,7 +266,7 @@ bool fixupRSAllocationStructByValCalls(l // inspect all of the arguments in the call for (auto &arg : func->args()) { if (arg.hasByValAttr()) { -arg.removeAttr(llvm::Attribute::ByVal)); +arg.removeAttr(llvm::Attribute::ByVal); changed = true; } } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r298405 - Add NetBSD case in Entry::Type::ThreadID
Author: kamil Date: Tue Mar 21 12:25:47 2017 New Revision: 298405 URL: http://llvm.org/viewvc/llvm-project?rev=298405&view=rev Log: Add NetBSD case in Entry::Type::ThreadID Summary: NetBSD native threads are printed as 64-bit unsigned integers. The underlying system type of a thread identity is lwpid_t of type int32_t. For consistency with Linux and FreeBSD share the 64-bit unsigned integer type. Sponsored by Reviewers: labath, kettenis, joerg, emaste Reviewed By: labath, emaste Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D31132 Modified: lldb/trunk/source/Core/FormatEntity.cpp Modified: lldb/trunk/source/Core/FormatEntity.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/FormatEntity.cpp?rev=298405&r1=298404&r2=298405&view=diff == --- lldb/trunk/source/Core/FormatEntity.cpp (original) +++ lldb/trunk/source/Core/FormatEntity.cpp Tue Mar 21 12:25:47 2017 @@ -1187,7 +1187,8 @@ bool FormatEntity::Format(const Entry &e ? arch.GetTriple().getOS() : llvm::Triple::UnknownOS; if ((ostype == llvm::Triple::FreeBSD) || -(ostype == llvm::Triple::Linux)) { +(ostype == llvm::Triple::Linux) || +(ostype == llvm::Triple::NetBSD)) { format = "%" PRIu64; } } else { ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r298406 - Enable ProcessPOSIXLog on NetBSD
Author: kamil Date: Tue Mar 21 12:26:55 2017 New Revision: 298406 URL: http://llvm.org/viewvc/llvm-project?rev=298406&view=rev Log: Enable ProcessPOSIXLog on NetBSD Summary: NetBSD can share the same logging functionality with Linux and FreeBSD. Sponsored by Reviewers: labath, emaste, joerg, kettenis Reviewed By: labath, emaste Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D31191 Modified: lldb/trunk/source/Initialization/SystemInitializerCommon.cpp Modified: lldb/trunk/source/Initialization/SystemInitializerCommon.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Initialization/SystemInitializerCommon.cpp?rev=298406&r1=298405&r2=298406&view=diff == --- lldb/trunk/source/Initialization/SystemInitializerCommon.cpp (original) +++ lldb/trunk/source/Initialization/SystemInitializerCommon.cpp Tue Mar 21 12:26:55 2017 @@ -26,7 +26,7 @@ #include "Plugins/ObjectFile/Mach-O/ObjectFileMachO.h" #endif -#if defined(__linux__) || defined(__FreeBSD__) +#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) #include "Plugins/Process/POSIX/ProcessPOSIXLog.h" #endif @@ -93,7 +93,7 @@ void SystemInitializerCommon::Initialize #if defined(__APPLE__) ObjectFileMachO::Initialize(); #endif -#if defined(__linux__) || defined(__FreeBSD__) +#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) ProcessPOSIXLog::Initialize(); #endif #if defined(_MSC_VER) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r298407 - Enable AUXV and QPassSignals in gdb-remote for NetBSD
Author: kamil Date: Tue Mar 21 12:27:59 2017 New Revision: 298407 URL: http://llvm.org/viewvc/llvm-project?rev=298407&view=rev Log: Enable AUXV and QPassSignals in gdb-remote for NetBSD Summary: NetBSD is an ELF platform and it uses Elf Auxiliary Vector like Linux and other modern BSDs. While there enable QPassSignals for the NetBSD port as well. Sponsored by Reviewers: labath, kettenis, joerg, emaste Reviewed By: labath Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D31146 Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp?rev=298407&r1=298406&r2=298407&view=diff == --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp (original) +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp Tue Mar 21 12:27:59 2017 @@ -840,7 +840,7 @@ GDBRemoteCommunicationServerCommon::Hand response.PutCString(";QThreadSuffixSupported+"); response.PutCString(";QListThreadsInStopReply+"); response.PutCString(";qEcho+"); -#if defined(__linux__) +#if defined(__linux__) || defined(__NetBSD__) response.PutCString(";QPassSignals+"); response.PutCString(";qXfer:auxv:read+"); #endif Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp?rev=298407&r1=298406&r2=298407&view=diff == --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp (original) +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp Tue Mar 21 12:27:59 2017 @@ -2665,7 +2665,7 @@ GDBRemoteCommunication::PacketResult GDBRemoteCommunicationServerLLGS::Handle_qXfer_auxv_read( StringExtractorGDBRemote &packet) { // *BSD impls should be able to do this too. -#if defined(__linux__) +#if defined(__linux__) || defined(__NetBSD__) Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS)); // Parse out the offset. ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r298408 - Add stub for PluginProcessNetBSD
Author: kamil Date: Tue Mar 21 12:30:47 2017 New Revision: 298408 URL: http://llvm.org/viewvc/llvm-project?rev=298408&view=rev Log: Add stub for PluginProcessNetBSD Summary: This is the base for introduction of further features to support Process Tracing on NetBSD, in local and remote setup. This code is also a starting point to synchronize the development with other BSDs. Currently NetBSD is ahead and other systems can catch up. Sponsored by Reviewers: emaste, joerg, kettenis, labath Reviewed By: labath Subscribers: mgorny, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D31138 Added: lldb/trunk/source/Plugins/Process/NetBSD/ lldb/trunk/source/Plugins/Process/NetBSD/CMakeLists.txt lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h lldb/trunk/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.cpp lldb/trunk/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h lldb/trunk/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp lldb/trunk/source/Plugins/Process/NetBSD/NativeThreadNetBSD.h Modified: lldb/trunk/source/Plugins/Process/CMakeLists.txt lldb/trunk/tools/lldb-server/CMakeLists.txt Modified: lldb/trunk/source/Plugins/Process/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/CMakeLists.txt?rev=298408&r1=298407&r2=298408&view=diff == --- lldb/trunk/source/Plugins/Process/CMakeLists.txt (original) +++ lldb/trunk/source/Plugins/Process/CMakeLists.txt Tue Mar 21 12:30:47 2017 @@ -5,6 +5,7 @@ elseif (CMAKE_SYSTEM_NAME MATCHES "FreeB add_subdirectory(FreeBSD) add_subdirectory(POSIX) elseif (CMAKE_SYSTEM_NAME MATCHES "NetBSD") + add_subdirectory(NetBSD) add_subdirectory(POSIX) elseif (CMAKE_SYSTEM_NAME MATCHES "Windows") add_subdirectory(Windows/Common) Added: lldb/trunk/source/Plugins/Process/NetBSD/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/NetBSD/CMakeLists.txt?rev=298408&view=auto == --- lldb/trunk/source/Plugins/Process/NetBSD/CMakeLists.txt (added) +++ lldb/trunk/source/Plugins/Process/NetBSD/CMakeLists.txt Tue Mar 21 12:30:47 2017 @@ -0,0 +1,20 @@ +include_directories(.) +include_directories(../POSIX) +include_directories(../Utility) + +add_lldb_library(lldbPluginProcessNetBSD PLUGIN + NativeProcessNetBSD.cpp + NativeRegisterContextNetBSD.cpp + NativeThreadNetBSD.cpp + + LINK_LIBS +lldbCore +lldbHost +lldbSymbol +lldbTarget +lldbUtility +lldbPluginProcessPOSIX +lldbPluginProcessUtility + LINK_COMPONENTS +Support + ) Added: lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp?rev=298408&view=auto == --- lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp (added) +++ lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp Tue Mar 21 12:30:47 2017 @@ -0,0 +1,51 @@ +//===-- NativeProcessNetBSD.cpp --- -*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===--===// + +#include "NativeProcessNetBSD.h" + +// C Includes + +// C++ Includes + +// Other libraries and framework includes + +#include "Plugins/Process/POSIX/ProcessPOSIXLog.h" + +// System includes - They have to be included after framework includes because +// they define some +// macros which collide with variable names in other modules + +using namespace lldb; +using namespace lldb_private; +using namespace lldb_private::process_netbsd; +using namespace llvm; + +// - +// Public Static Methods +// - + +Error NativeProcessProtocol::Launch( +ProcessLaunchInfo &launch_info, +NativeProcessProtocol::NativeDelegate &native_delegate, MainLoop &mainloop, +NativeProcessProtocolSP &native_process_sp) { + return Error(); +} + +Error NativeProcessProtocol::Attach( +lldb::pid_t pid, NativeProcessProtocol::NativeDelegate &native_delegate, +MainLoop &mainloop, NativeProcessProtocolSP &native_process_sp) { + return Error(); +} + +// - +// Public Instance Methods +// - + +NativeProcessNetBSD::NativeProcessNetBSD() +: NativeProcessPr
[Lldb-commits] [PATCH] D31192: Create instance of DynamicLoaderPOSIXDYLD on NetBSD
krytarowski added a comment. This approach is easier for my to understand each change and make sure that it's actually needed and correct (or looking like a proper solution). There are 2 similar changes left I don't fully understand and code interfering with the OpenBSD platform addition that I will hold on a while. I expect that FreeBSD/OpenBSD (and perhaps DragonflyBSD at some point) will have the job clearer. Repository: rL LLVM https://reviews.llvm.org/D31192 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r298409 - Create instance of DynamicLoaderPOSIXDYLD on NetBSD
Author: kamil Date: Tue Mar 21 12:39:15 2017 New Revision: 298409 URL: http://llvm.org/viewvc/llvm-project?rev=298409&view=rev Log: Create instance of DynamicLoaderPOSIXDYLD on NetBSD Summary: NetBSD is a modern ELF UNIX-like system. There is requires DynamicLoaderPOSIXDYLD e.g. for ELF AUXV reading from the client. Sponsored by Reviewers: labath, joerg, kettenis Reviewed By: labath Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D31192 Modified: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp Modified: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp?rev=298409&r1=298408&r2=298409&view=diff == --- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp (original) +++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp Tue Mar 21 12:39:15 2017 @@ -63,8 +63,9 @@ DynamicLoader *DynamicLoaderPOSIXDYLD::C if (!create) { const llvm::Triple &triple_ref = process->GetTarget().GetArchitecture().GetTriple(); -if (triple_ref.getOS() == llvm::Triple::Linux || -triple_ref.getOS() == llvm::Triple::FreeBSD) +if (triple_ref.getOS() == llvm::Triple::FreeBSD || +triple_ref.getOS() == llvm::Triple::Linux || +triple_ref.getOS() == llvm::Triple::NetBSD) create = true; } ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D31172: Move stop info override callback code from ArchSpec into Process
jingham added a comment. None of this isn't modeling the situation particularly clearly, since we have "architecture specific modifications to general behaviors" that aren't coming in through plugins so that it would be easy to modify the behavior for new architectures. Instead, we're requiring new architectures to go in and edit supposedly generic code. We put off that abstraction because it was unclear what we would need it to do, and because of that for the most part we just put these architecture specific behaviors inline in various places. Then this one callback had nowhere to go but ArchSpec which is the only logical place for architecture specific code to accumulate. It doesn't seem like we should gate cleaning up ArchSpec on that larger issue, however. Rather than introducing another file, it seems simpler to make this part of StopInfo, since it is logically modifying the StopInfo for a thread. It isn't right there, but it's any worse, and StopInfo is closer to the machine (though so far mostly closer to the Platform) than Process should be. And StopInfo's already have to know about pretty much all the details of Process/Thread/etc... so you wouldn't be adding knowledge to them that isn't appropriate. I'd also suggest removing the "callback" name from it since it really isn't a general purpose callback, it is absolutely determined by the ArchSpec. For instance if you were to use anything but the ARM one for ARM debugging you would break debugging. It's not optional... Instead I'd call it something like InvokeStopInfoArchOverride. That will also make it clear that this is a target for gathering up into some "ArchSpec specific behaviors" if/when we get around to that. https://reviews.llvm.org/D31172 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D31172: Move stop info override callback code from ArchSpec into Process
Thanks for the suggestions! Not sure if I'll be able to make those changes before tomorrow EOD, and after that I will be out for ~2 weeks, so if time doesn't permit, I may not follow up with another patch until after I get back. On Tue, Mar 21, 2017 at 11:19 AM Jim Ingham via Phabricator < revi...@reviews.llvm.org> wrote: > jingham added a comment. > > None of this isn't modeling the situation particularly clearly, since we > have "architecture specific modifications to general behaviors" that aren't > coming in through plugins so that it would be easy to modify the behavior > for new architectures. Instead, we're requiring new architectures to go in > and edit supposedly generic code. We put off that abstraction because it > was unclear what we would need it to do, and because of that for the most > part we just put these architecture specific behaviors inline in various > places. Then this one callback had nowhere to go but ArchSpec which is the > only logical place for architecture specific code to accumulate. It > doesn't seem like we should gate cleaning up ArchSpec on that larger issue, > however. > > Rather than introducing another file, it seems simpler to make this part > of StopInfo, since it is logically modifying the StopInfo for a thread. It > isn't right there, but it's any worse, and StopInfo is closer to the > machine (though so far mostly closer to the Platform) than Process should > be. And StopInfo's already have to know about pretty much all the details > of Process/Thread/etc... so you wouldn't be adding knowledge to them that > isn't appropriate. > > I'd also suggest removing the "callback" name from it since it really > isn't a general purpose callback, it is absolutely determined by the > ArchSpec. For instance if you were to use anything but the ARM one for ARM > debugging you would break debugging. It's not optional... Instead I'd > call it something like InvokeStopInfoArchOverride. That will also make it > clear that this is a target for gathering up into some "ArchSpec specific > behaviors" if/when we get around to that. > > > https://reviews.llvm.org/D31172 > > > > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D31129: Remove remaining platform specific code from FileSpec
eugene accepted this revision. eugene added a comment. This revision is now accepted and ready to land. I like how much code you deleted. https://reviews.llvm.org/D31129 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r298412 - Move StringList from Core -> Utility.
Author: zturner Date: Tue Mar 21 13:25:04 2017 New Revision: 298412 URL: http://llvm.org/viewvc/llvm-project?rev=298412&view=rev Log: Move StringList from Core -> Utility. Added: lldb/trunk/include/lldb/Utility/StringList.h lldb/trunk/source/Utility/StringList.cpp Removed: lldb/trunk/include/lldb/Core/StringList.h lldb/trunk/source/Core/StringList.cpp Modified: lldb/trunk/include/lldb/Breakpoint/Breakpoint.h lldb/trunk/include/lldb/Breakpoint/BreakpointOptions.h lldb/trunk/include/lldb/Breakpoint/WatchpointOptions.h lldb/trunk/include/lldb/Core/IOHandler.h lldb/trunk/include/lldb/Core/UserSettingsController.h lldb/trunk/include/lldb/Host/Host.h lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h lldb/trunk/include/lldb/Interpreter/CommandObject.h lldb/trunk/source/API/SBStringList.cpp lldb/trunk/source/Breakpoint/BreakpointOptions.cpp lldb/trunk/source/Breakpoint/WatchpointOptions.cpp lldb/trunk/source/Commands/CommandObjectCommands.cpp lldb/trunk/source/Commands/CommandObjectType.cpp lldb/trunk/source/Core/ArchSpec.cpp lldb/trunk/source/Core/CMakeLists.txt lldb/trunk/source/Host/common/Editline.cpp lldb/trunk/source/Host/common/FileSpec.cpp lldb/trunk/source/Interpreter/OptionValue.cpp lldb/trunk/source/Interpreter/OptionValueBoolean.cpp lldb/trunk/source/Interpreter/OptionValueChar.cpp lldb/trunk/source/Interpreter/OptionValueEnumeration.cpp lldb/trunk/source/Interpreter/OptionValueFormatEntity.cpp lldb/trunk/source/Interpreter/OptionValueProperties.cpp lldb/trunk/source/Interpreter/OptionValueUUID.cpp lldb/trunk/source/Interpreter/ScriptInterpreter.cpp lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h lldb/trunk/source/Plugins/ScriptInterpreter/None/ScriptInterpreterNone.cpp lldb/trunk/source/Utility/CMakeLists.txt lldb/trunk/unittests/Editline/EditlineTest.cpp lldb/trunk/unittests/Interpreter/TestCompletion.cpp Modified: lldb/trunk/include/lldb/Breakpoint/Breakpoint.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/Breakpoint.h?rev=298412&r1=298411&r2=298412&view=diff == --- lldb/trunk/include/lldb/Breakpoint/Breakpoint.h (original) +++ lldb/trunk/include/lldb/Breakpoint/Breakpoint.h Tue Mar 21 13:25:04 2017 @@ -26,8 +26,8 @@ #include "lldb/Breakpoint/Stoppoint.h" #include "lldb/Core/Event.h" #include "lldb/Core/SearchFilter.h" -#include "lldb/Core/StringList.h" #include "lldb/Core/StructuredData.h" +#include "lldb/Utility/StringList.h" namespace lldb_private { Modified: lldb/trunk/include/lldb/Breakpoint/BreakpointOptions.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/BreakpointOptions.h?rev=298412&r1=298411&r2=298412&view=diff == --- lldb/trunk/include/lldb/Breakpoint/BreakpointOptions.h (original) +++ lldb/trunk/include/lldb/Breakpoint/BreakpointOptions.h Tue Mar 21 13:25:04 2017 @@ -17,9 +17,9 @@ // Other libraries and framework includes // Project includes -#include "lldb/Core/StringList.h" #include "lldb/Core/StructuredData.h" #include "lldb/Utility/Baton.h" +#include "lldb/Utility/StringList.h" #include "lldb/lldb-private.h" namespace lldb_private { Modified: lldb/trunk/include/lldb/Breakpoint/WatchpointOptions.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/WatchpointOptions.h?rev=298412&r1=298411&r2=298412&view=diff == --- lldb/trunk/include/lldb/Breakpoint/WatchpointOptions.h (original) +++ lldb/trunk/include/lldb/Breakpoint/WatchpointOptions.h Tue Mar 21 13:25:04 2017 @@ -17,8 +17,8 @@ // Other libraries and framework includes // Project includes -#include "lldb/Core/StringList.h" #include "lldb/Utility/Baton.h" +#include "lldb/Utility/StringList.h" #include "lldb/lldb-private.h" namespace lldb_private { Modified: lldb/trunk/include/lldb/Core/IOHandler.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/IOHandler.h?rev=298412&r1=298411&r2=298412&view=diff == --- lldb/trunk/include/lldb/Core/IOHandler.h (original) +++ lldb/trunk/include/lldb/Core/IOHandler.h Tue Mar 21 13:25:04 2017 @@ -23,12 +23,12 @@ // Project includes #include "lldb/Utility/Flags.h" -#include "lldb/Core/StringList.h" #include "lldb/Core/ValueObjectList.h" #include "lldb/Host/Predicate.h" #include "lldb/Utility/ConstString.h" #include "lldb/Utility/Error.h" #include "lldb/Utility/Stream.h" +#include "lldb/Utility/StringList.h" #include "lldb/lldb-enumerations.h" #include "ll
[Lldb-commits] [lldb] r298419 - Fix build broken by StringList move.
Author: zturner Date: Tue Mar 21 13:45:42 2017 New Revision: 298419 URL: http://llvm.org/viewvc/llvm-project?rev=298419&view=rev Log: Fix build broken by StringList move. Modified: lldb/trunk/include/lldb/Utility/StringList.h lldb/trunk/source/Symbol/Symtab.cpp Modified: lldb/trunk/include/lldb/Utility/StringList.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/StringList.h?rev=298419&r1=298418&r2=298419&view=diff == --- lldb/trunk/include/lldb/Utility/StringList.h (original) +++ lldb/trunk/include/lldb/Utility/StringList.h Tue Mar 21 13:45:42 2017 @@ -15,6 +15,7 @@ // C++ Includes #include +#include // Other libraries and framework includes #include "llvm/ADT/StringRef.h" Modified: lldb/trunk/source/Symbol/Symtab.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Symtab.cpp?rev=298419&r1=298418&r2=298419&view=diff == --- lldb/trunk/source/Symbol/Symtab.cpp (original) +++ lldb/trunk/source/Symbol/Symtab.cpp Tue Mar 21 13:45:42 2017 @@ -14,6 +14,7 @@ #include "Plugins/Language/ObjC/ObjCLanguage.h" #include "lldb/Core/Module.h" #include "lldb/Core/Section.h" +#include "lldb/Core/STLUtils.h" #include "lldb/Core/Timer.h" #include "lldb/Symbol/ObjectFile.h" #include "lldb/Symbol/Symbol.h" ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r298451 - Mirror CMake changes from r298412 to Xcode project
Author: penryu Date: Tue Mar 21 17:08:16 2017 New Revision: 298451 URL: http://llvm.org/viewvc/llvm-project?rev=298451&view=rev Log: Mirror CMake changes from r298412 to Xcode project Mlldb.xcodeproj/project.pbxproj Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=298451&r1=298450&r2=298451&view=diff == --- lldb/trunk/lldb.xcodeproj/project.pbxproj (original) +++ lldb/trunk/lldb.xcodeproj/project.pbxproj Tue Mar 21 17:08:16 2017 @@ -2793,8 +2793,8 @@ 9A22A160135E30370024DDC3 /* EmulationStateARM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EmulationStateARM.h; sourceTree = ""; }; 9A357582116CFDEE00E8ED2F /* SBValueList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBValueList.h; path = include/lldb/API/SBValueList.h; sourceTree = ""; }; 9A35758D116CFE0F00E8ED2F /* SBValueList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBValueList.cpp; path = source/API/SBValueList.cpp; sourceTree = ""; }; - 9A35765E116E76A700E8ED2F /* StringList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StringList.h; path = include/lldb/Core/StringList.h; sourceTree = ""; }; - 9A35765F116E76B900E8ED2F /* StringList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringList.cpp; path = source/Core/StringList.cpp; sourceTree = ""; }; + 9A35765E116E76A700E8ED2F /* StringList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StringList.h; path = include/lldb/Utility/StringList.h; sourceTree = ""; }; + 9A35765F116E76B900E8ED2F /* StringList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringList.cpp; path = source/Utility/StringList.cpp; sourceTree = ""; }; 9A357670116E7B5200E8ED2F /* SBStringList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBStringList.h; path = include/lldb/API/SBStringList.h; sourceTree = ""; }; 9A357672116E7B6400E8ED2F /* SBStringList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBStringList.cpp; path = source/API/SBStringList.cpp; sourceTree = ""; }; 9A3576A7116E9AB700E8ED2F /* SBHostOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBHostOS.h; path = include/lldb/API/SBHostOS.h; sourceTree = ""; }; @@ -4235,6 +4235,8 @@ 2676A093119C93C8008A98EF /* StringExtractorGDBRemote.cpp */, 94380B8019940B0300BFE4A8 /* StringLexer.h */, 94380B8119940B0A00BFE4A8 /* StringLexer.cpp */, + 9A35765E116E76A700E8ED2F /* StringList.h */, + 9A35765F116E76B900E8ED2F /* StringList.cpp */, 94BA8B6E176F8CA0005A91B5 /* Range.h */, 94BA8B6C176F8C9B005A91B5 /* Range.cpp */, 6DEC6F3A1BD66D950091ABA6 /* TaskPool.h */, @@ -4729,8 +4731,6 @@ 2623096E13D0EFFB006381D9 /* StreamBuffer.h */, 26BC7D7A10F1B77400F91463 /* StreamFile.h */, 26BC7E9210F1B85900F91463 /* StreamFile.cpp */, - 9A35765E116E76A700E8ED2F /* StringList.h */, - 9A35765F116E76B900E8ED2F /* StringList.cpp */, 26F2F8FD1B156678007857DE /* StructuredData.h */, AFEC3361194A8ABA00FF05C6 /* StructuredData.cpp */, 26B167A41123BF5500DC7B4F /* ThreadSafeValue.h */, ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r298455 - [deps script] Sort cycles by the difficulty of breaking.
Author: zturner Date: Tue Mar 21 17:46:46 2017 New Revision: 298455 URL: http://llvm.org/viewvc/llvm-project?rev=298455&view=rev Log: [deps script] Sort cycles by the difficulty of breaking. When passing --discover-cycles and --show-counts, it displays the number of dependencies between each hop of the cycle, and sorts by the sum. Dependencies at the top of the list should be the easiest to break. Modified: lldb/trunk/scripts/analyze-project-deps.py Modified: lldb/trunk/scripts/analyze-project-deps.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/analyze-project-deps.py?rev=298455&r1=298454&r2=298455&view=diff == --- lldb/trunk/scripts/analyze-project-deps.py (original) +++ lldb/trunk/scripts/analyze-project-deps.py Tue Mar 21 17:46:46 2017 @@ -1,6 +1,8 @@ import argparse +import itertools import os import re +import sys from use_lldb_suite import lldb_root @@ -22,7 +24,7 @@ src_map = {} include_regex = re.compile('#include \"((lldb|Plugins|clang)(.*/)+).*\"') def is_sublist(small, big): -it = iter(big) +it = iter(big) return all(c in it for c in small) def normalize_host(str): @@ -102,9 +104,7 @@ def expand(path_queue, path_lengths, cyc continue next_len = path_lengths.pop(0) + 1 - last_component = cur_path[-1] - for item in src_map[last_component]: if item.startswith("clang"): continue @@ -143,6 +143,19 @@ for (path, deps) in items: for dep in sorted_deps: print "\t{}".format(dep[0]) +def iter_cycles(cycles): +global src_map +for cycle in cycles: +cycle.append(cycle[0]) +zipper = list(zip(cycle[0:-1], cycle[1:])) +result = [(x, src_map[x][y], y) for (x,y) in zipper] +total = 0 +smallest = result[0][1] +for (first, value, last) in result: +total += value +smallest = min(smallest, value) +yield (total, smallest, result) + if args.discover_cycles: print "Analyzing cycles..." @@ -151,8 +164,18 @@ if args.discover_cycles: average = sum([len(x)+1 for x in cycles]) / len(cycles) print "Found {} cycles. Average cycle length = {}.".format(len(cycles), average) -for cycle in cycles: -cycle.append(cycle[0]) -print " -> ".join(cycle) - +if args.show_counts: +counted = list(iter_cycles(cycles)) +counted.sort(lambda A, B: cmp(A[0], B[0])) +for (total, smallest, cycle) in counted: +sys.stdout.write("{} deps to break: ".format(total)) +sys.stdout.write(cycle[0][0]) +for (first, count, last) in cycle: +sys.stdout.write(" [{}->] {}".format(count, last)) +sys.stdout.write("\n") +else: +for cycle in cycles: +cycle.append(cycle[0]) +print " -> ".join(cycle) +sys.stdout.flush() pass \ No newline at end of file ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r298465 - Delete the remainder of platform specific code in FileSpec.
Author: zturner Date: Tue Mar 21 19:27:24 2017 New Revision: 298465 URL: http://llvm.org/viewvc/llvm-project?rev=298465&view=rev Log: Delete the remainder of platform specific code in FileSpec. Differential Revision: https://reviews.llvm.org/D31129 Added: lldb/trunk/unittests/Utility/Mocks/ lldb/trunk/unittests/Utility/Mocks/CMakeLists.txt lldb/trunk/unittests/Utility/Mocks/MockTildeExpressionResolver.cpp lldb/trunk/unittests/Utility/Mocks/MockTildeExpressionResolver.h lldb/trunk/unittests/Utility/TildeExpressionResolverTest.cpp Modified: lldb/trunk/include/lldb/Host/FileSpec.h lldb/trunk/include/lldb/Utility/TildeExpressionResolver.h lldb/trunk/source/API/SBDeclaration.cpp lldb/trunk/source/API/SBFileSpec.cpp lldb/trunk/source/API/SBFileSpecList.cpp lldb/trunk/source/API/SBLineEntry.cpp lldb/trunk/source/Host/common/FileSpec.cpp lldb/trunk/source/Host/windows/FileSystem.cpp lldb/trunk/source/Host/windows/HostInfoWindows.cpp lldb/trunk/source/Target/TargetList.cpp lldb/trunk/source/Utility/TildeExpressionResolver.cpp lldb/trunk/unittests/CMakeLists.txt lldb/trunk/unittests/Interpreter/CMakeLists.txt lldb/trunk/unittests/Interpreter/TestCompletion.cpp lldb/trunk/unittests/Utility/CMakeLists.txt Modified: lldb/trunk/include/lldb/Host/FileSpec.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/FileSpec.h?rev=298465&r1=298464&r2=298465&view=diff == --- lldb/trunk/include/lldb/Host/FileSpec.h (original) +++ lldb/trunk/include/lldb/Host/FileSpec.h Tue Mar 21 19:27:24 2017 @@ -17,7 +17,6 @@ // Other libraries and framework includes // Project includes -#include "lldb/Host/PosixApi.h" #include "lldb/Utility/ConstString.h" #include "lldb/lldb-private.h" @@ -539,26 +538,6 @@ public: ConstString GetLastPathComponent() const; - //-- - /// Resolves the user name at the beginning of \a src_path, and writes the - /// output - /// to \a dst_path. Note, \a src_path can contain other path components after - /// the - /// user name, they will be copied over, and if the path doesn't start with - /// "~" it - /// will also be copied over to \a dst_path. - /// - /// @param[in] src_path - /// Input path to be resolved. - /// - /// @param[in] dst_path - /// Buffer to store the resolved path. - //-- - static void ResolveUsername(llvm::SmallVectorImpl &path); - - static size_t ResolvePartialUsername(llvm::StringRef partial_name, - StringList &matches); - enum EnumerateDirectoryResult { eEnumerateDirectoryResultNext, // Enumerate next entry in the current // directory Modified: lldb/trunk/include/lldb/Utility/TildeExpressionResolver.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/TildeExpressionResolver.h?rev=298465&r1=298464&r2=298465&view=diff == --- lldb/trunk/include/lldb/Utility/TildeExpressionResolver.h (original) +++ lldb/trunk/include/lldb/Utility/TildeExpressionResolver.h Tue Mar 21 19:27:24 2017 @@ -44,6 +44,11 @@ public: /// \returns true if there were any matches, false otherwise. virtual bool ResolvePartial(llvm::StringRef Expr, llvm::StringSet<> &Output) = 0; + + /// \brief Resolve an entire path that begins with a tilde expression, + /// replacing the username portion with the matched result. + bool ResolveFullPath(llvm::StringRef Expr, + llvm::SmallVectorImpl &Output); }; class StandardTildeExpressionResolver : public TildeExpressionResolver { Modified: lldb/trunk/source/API/SBDeclaration.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBDeclaration.cpp?rev=298465&r1=298464&r2=298465&view=diff == --- lldb/trunk/source/API/SBDeclaration.cpp (original) +++ lldb/trunk/source/API/SBDeclaration.cpp Tue Mar 21 19:27:24 2017 @@ -1,5 +1,4 @@ -//===-- SBDeclaration.cpp -*- C++ -//-*-===// +//===-- SBDeclaration.cpp *- C++-*-===// // // The LLVM Compiler Infrastructure // @@ -10,6 +9,7 @@ #include "lldb/API/SBDeclaration.h" #include "lldb/API/SBStream.h" +#include "lldb/Host/PosixApi.h" #include "lldb/Symbol/Declaration.h" #include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" Modified: lldb/trunk/source/API/SBFileSpec.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBFileSpec.cpp?rev=298465&r1=298464&r2=298465&view=diff ==
[Lldb-commits] [lldb] r298466 - Break the cycle between Host and PluginProcessUtility.
Author: zturner Date: Tue Mar 21 19:27:54 2017 New Revision: 298466 URL: http://llvm.org/viewvc/llvm-project?rev=298466&view=rev Log: Break the cycle between Host and PluginProcessUtility. There are only two users of NativeRegisterContextRegisterInfo, and both are in process plugins. Moving this code from Host to Plugins/Process/Utility thus makes sense, and as it is the only dependency from Host -> PluginProcessUtility, it also breaks this cycle, reducing LLDB's overall cycle count from 45 to 44. Added: lldb/trunk/source/Plugins/Process/Utility/NativeRegisterContextRegisterInfo.cpp lldb/trunk/source/Plugins/Process/Utility/NativeRegisterContextRegisterInfo.h Removed: lldb/trunk/include/lldb/Host/common/NativeRegisterContextRegisterInfo.h lldb/trunk/source/Host/common/NativeRegisterContextRegisterInfo.cpp Modified: lldb/trunk/source/Host/CMakeLists.txt lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux.h lldb/trunk/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h lldb/trunk/source/Plugins/Process/Utility/CMakeLists.txt Removed: lldb/trunk/include/lldb/Host/common/NativeRegisterContextRegisterInfo.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/common/NativeRegisterContextRegisterInfo.h?rev=298465&view=auto == --- lldb/trunk/include/lldb/Host/common/NativeRegisterContextRegisterInfo.h (original) +++ lldb/trunk/include/lldb/Host/common/NativeRegisterContextRegisterInfo.h (removed) @@ -1,42 +0,0 @@ -//===-- NativeRegisterContextRegisterInfo.h --*- C++ -//-*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===--===// - -#ifndef lldb_NativeRegisterContextRegisterInfo_h -#define lldb_NativeRegisterContextRegisterInfo_h - -#include - -#include "NativeRegisterContext.h" -#include "Plugins/Process/Utility/RegisterInfoInterface.h" - -namespace lldb_private { -class NativeRegisterContextRegisterInfo : public NativeRegisterContext { -public: - /// - /// Construct a NativeRegisterContextRegisterInfo, taking ownership - /// of the register_info_interface pointer. - /// - NativeRegisterContextRegisterInfo( - NativeThreadProtocol &thread, uint32_t concrete_frame_idx, - RegisterInfoInterface *register_info_interface); - - uint32_t GetRegisterCount() const override; - - uint32_t GetUserRegisterCount() const override; - - const RegisterInfo *GetRegisterInfoAtIndex(uint32_t reg_index) const override; - - const RegisterInfoInterface &GetRegisterInfoInterface() const; - -private: - std::unique_ptr m_register_info_interface_up; -}; -} -#endif Modified: lldb/trunk/source/Host/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/CMakeLists.txt?rev=298466&r1=298465&r2=298466&view=diff == --- lldb/trunk/source/Host/CMakeLists.txt (original) +++ lldb/trunk/source/Host/CMakeLists.txt Tue Mar 21 19:27:54 2017 @@ -22,7 +22,6 @@ add_host_subdirectory(common common/NativeWatchpointList.cpp common/NativeProcessProtocol.cpp common/NativeRegisterContext.cpp - common/NativeRegisterContextRegisterInfo.cpp common/NativeThreadProtocol.cpp common/OptionParser.cpp common/PipeBase.cpp Removed: lldb/trunk/source/Host/common/NativeRegisterContextRegisterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/NativeRegisterContextRegisterInfo.cpp?rev=298465&view=auto == --- lldb/trunk/source/Host/common/NativeRegisterContextRegisterInfo.cpp (original) +++ lldb/trunk/source/Host/common/NativeRegisterContextRegisterInfo.cpp (removed) @@ -1,43 +0,0 @@ -//===-- NativeRegisterContextRegisterInfo.cpp ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===--===// - -#include "lldb/Host/common/NativeRegisterContextRegisterInfo.h" -#include "lldb/lldb-private-forward.h" -#include "lldb/lldb-types.h" - -using namespace lldb_private; - -NativeRegisterContextRegisterInfo::NativeRegisterContextRegisterInfo( -NativeThreadProtocol &thread, uint32_t concrete_frame_idx, -RegisterInfoInterface *register_info_interface) -: NativeRegisterContext(thread, concrete_frame_idx), - m_register_info_interface_up(register_info_interface) { - assert(register_info_interface && "null register_info_interface"); -} - -uint32_t NativeRegisterContextRegisterInfo::GetRegisterCount() const { - re
[Lldb-commits] [PATCH] D31129: Remove remaining platform specific code from FileSpec
This revision was automatically updated to reflect the committed changes. Closed by commit rL298465: Delete the remainder of platform specific code in FileSpec. (authored by zturner). Changed prior to commit: https://reviews.llvm.org/D31129?vs=92373&id=92577#toc Repository: rL LLVM https://reviews.llvm.org/D31129 Files: lldb/trunk/include/lldb/Host/FileSpec.h lldb/trunk/include/lldb/Utility/TildeExpressionResolver.h lldb/trunk/source/API/SBDeclaration.cpp lldb/trunk/source/API/SBFileSpec.cpp lldb/trunk/source/API/SBFileSpecList.cpp lldb/trunk/source/API/SBLineEntry.cpp lldb/trunk/source/Host/common/FileSpec.cpp lldb/trunk/source/Host/windows/FileSystem.cpp lldb/trunk/source/Host/windows/HostInfoWindows.cpp lldb/trunk/source/Target/TargetList.cpp lldb/trunk/source/Utility/TildeExpressionResolver.cpp lldb/trunk/unittests/CMakeLists.txt lldb/trunk/unittests/Interpreter/CMakeLists.txt lldb/trunk/unittests/Interpreter/TestCompletion.cpp lldb/trunk/unittests/Utility/CMakeLists.txt lldb/trunk/unittests/Utility/Mocks/CMakeLists.txt lldb/trunk/unittests/Utility/Mocks/MockTildeExpressionResolver.cpp lldb/trunk/unittests/Utility/Mocks/MockTildeExpressionResolver.h lldb/trunk/unittests/Utility/TildeExpressionResolverTest.cpp Index: lldb/trunk/include/lldb/Host/FileSpec.h === --- lldb/trunk/include/lldb/Host/FileSpec.h +++ lldb/trunk/include/lldb/Host/FileSpec.h @@ -17,7 +17,6 @@ // Other libraries and framework includes // Project includes -#include "lldb/Host/PosixApi.h" #include "lldb/Utility/ConstString.h" #include "lldb/lldb-private.h" @@ -539,26 +538,6 @@ ConstString GetLastPathComponent() const; - //-- - /// Resolves the user name at the beginning of \a src_path, and writes the - /// output - /// to \a dst_path. Note, \a src_path can contain other path components after - /// the - /// user name, they will be copied over, and if the path doesn't start with - /// "~" it - /// will also be copied over to \a dst_path. - /// - /// @param[in] src_path - /// Input path to be resolved. - /// - /// @param[in] dst_path - /// Buffer to store the resolved path. - //-- - static void ResolveUsername(llvm::SmallVectorImpl &path); - - static size_t ResolvePartialUsername(llvm::StringRef partial_name, - StringList &matches); - enum EnumerateDirectoryResult { eEnumerateDirectoryResultNext, // Enumerate next entry in the current // directory Index: lldb/trunk/include/lldb/Utility/TildeExpressionResolver.h === --- lldb/trunk/include/lldb/Utility/TildeExpressionResolver.h +++ lldb/trunk/include/lldb/Utility/TildeExpressionResolver.h @@ -44,6 +44,11 @@ /// \returns true if there were any matches, false otherwise. virtual bool ResolvePartial(llvm::StringRef Expr, llvm::StringSet<> &Output) = 0; + + /// \brief Resolve an entire path that begins with a tilde expression, + /// replacing the username portion with the matched result. + bool ResolveFullPath(llvm::StringRef Expr, + llvm::SmallVectorImpl &Output); }; class StandardTildeExpressionResolver : public TildeExpressionResolver { Index: lldb/trunk/unittests/Interpreter/CMakeLists.txt === --- lldb/trunk/unittests/Interpreter/CMakeLists.txt +++ lldb/trunk/unittests/Interpreter/CMakeLists.txt @@ -4,6 +4,7 @@ LINK_LIBS lldbInterpreter +lldbUtilityMocks ) target_link_libraries(InterpreterTests Index: lldb/trunk/unittests/Interpreter/TestCompletion.cpp === --- lldb/trunk/unittests/Interpreter/TestCompletion.cpp +++ lldb/trunk/unittests/Interpreter/TestCompletion.cpp @@ -8,7 +8,6 @@ //===--===// #include "gtest/gtest.h" - #include "lldb/Interpreter/CommandCompletions.h" #include "lldb/Utility/StringList.h" #include "lldb/Utility/TildeExpressionResolver.h" @@ -18,6 +17,8 @@ #include "llvm/Support/Path.h" #include "llvm/Support/raw_ostream.h" +#include "unittests/Utility/Mocks/MockTildeExpressionResolver.h" + namespace fs = llvm::sys::fs; namespace path = llvm::sys::path; using namespace llvm; @@ -36,74 +37,6 @@ namespace { -class MockTildeExpressionResolver : public TildeExpressionResolver { - StringRef CurrentUser; - StringMap UserDirectories; - -public: - explicit MockTildeExpressionResolver(StringRef CurrentUser, StringRef HomeDir) - : CurrentUser(CurrentUser) { -UserDirectories.insert(std::make_pair(CurrentUser, HomeDir)); - } - - void AddKnownUser(StringRef
[Lldb-commits] Buildbot numbers for the week of 03/05/2017 - 03/11/2017
Hello everyone, Below are some buildbot numbers for the week of 03/05/2017 - 03/11/2017. Please see the same data in attached csv files: The longest time each builder was red during the last week; "Status change ratio" by active builder (percent of builds that changed the builder status from greed to red or from red to green); Count of commits by project; Number of completed builds, failed builds and average build time for successful builds per active builder; Average waiting time for a revision to get build result per active builder (response time). Thanks Galina The longest time each builder was red during the last week: buildername | was_red +-- clang-bpf-build| 132:35:47 clang-x86-windows-msvc2015 | 102:23:37 clang-lld-x86_64-2stage| 80:38:29 sanitizer-x86_64-linux-fast| 51:15:06 clang-cmake-aarch64-lld| 50:56:29 sanitizer-x86_64-linux-bootstrap | 48:22:47 clang-cmake-mipsel | 44:13:26 clang-ppc64le-linux-multistage | 39:58:29 lldb-x86-windows-msvc2015 | 39:52:30 clang-ppc64le-linux| 39:11:59 sanitizer-x86_64-linux | 36:25:13 clang-ppc64le-linux-lnt| 36:07:38 lldb-windows7-android | 35:13:43 sanitizer-ppc64le-linux| 35:08:56 lldb-x86_64-ubuntu-14.04-android | 32:03:01 lldb-x86_64-darwin-13.4| 31:37:06 lldb-x86_64-ubuntu-14.04-cmake | 31:33:08 libcxx-libcxxabi-x86_64-linux-ubuntu-msan | 17:53:02 perf-x86_64-penryn-O3-polly-before-vectorizer | 16:39:21 llvm-clang-x86_64-expensive-checks-win | 13:51:22 clang-cmake-armv7-a15-selfhost-neon| 10:41:11 clang-cmake-armv7-a15-selfhost | 10:27:10 clang-with-thin-lto-ubuntu | 10:01:08 perf-x86_64-penryn-O3-polly-before-vectorizer-detect-only | 09:16:35 sanitizer-ppc64be-linux| 08:46:00 clang-x86_64-debian-fast | 08:41:18 clang-with-lto-ubuntu | 08:20:38 clang-cmake-mips | 08:03:57 llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast | 07:09:51 clang-cmake-aarch64-full | 06:30:01 clang-3stage-ubuntu| 06:22:09 lld-x86_64-darwin13| 05:54:50 polly-amd64-linux | 04:46:29 perf-x86_64-penryn-O3-polly-parallel-fast | 04:24:41 clang-s390x-linux | 04:14:21 libcxx-libcxxabi-libunwind-aarch64-linux | 04:10:47 clang-x86_64-linux-selfhost-modules-2 | 04:09:15 sanitizer-windows | 03:51:36 clang-cmake-thumbv7-a15-full-sh| 03:50:56 perf-x86_64-penryn-O3-polly-unprofitable | 03:36:02 clang-x86_64-linux-selfhost-modules| 03:11:39 clang-cmake-thumbv7-a15| 02:54:48 lld-x86_64-freebsd | 02:51:07 perf-x86_64-penryn-O3-polly-before-vectorizer-unprofitable | 02:46:45 clang-ppc64be-linux-lnt| 02:38:54 clang-cmake-armv7-a15 | 02:38:54 sanitizer-x86_64-linux-fuzzer | 02:29:45 clang-ppc64be-linux| 02:21:44 clang-cmake-armv7-a15-full | 01:59:38 clang-cmake-aarch64-39vma | 01:49:13 clang-ppc64be-linux-multistage | 01:48:31 llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast | 01:46:08 clang-cuda-build | 01:44:36 clang-hexagon-elf | 01:40:48 clang-cmake-aarch64-quick | 01:30:09 lldb-amd64-ninja-netbsd7 | 01:21:06 polly-arm-linux| 01:20:07 clang-cmake-aarch64-42vma | 00:59:38 clang-atom-d525-fedora-rel | 00:57:23 lldb-x86_64-ubuntu-14.04-
[Lldb-commits] Buildbot numbers for the week of 03/12/2017 - 03/18/2017
Hello everyone, Below are some buildbot numbers for the last week of 03/12/2017 - 03/18/2017. Please see the same data in attached csv files: The longest time each builder was red during the last week; "Status change ratio" by active builder (percent of builds that changed the builder status from greed to red or from red to green); Count of commits by project; Number of completed builds, failed builds and average build time for successful builds per active builder; Average waiting time for a revision to get build result per active builder (response time). Thanks Galina The longest time each builder was red during the last week: buildername | was_red +- sanitizer-x86_64-linux | 61:48:26 sanitizer-windows | 38:12:04 clang-cmake-mipsel | 38:03:10 clang-x86-windows-msvc2015 | 37:58:47 perf-x86_64-penryn-O3-polly-before-vectorizer | 25:00:41 clang-cmake-aarch64-lld| 23:59:46 clang-s390x-linux | 23:07:48 clang-lld-x86_64-2stage| 20:07:59 perf-x86_64-penryn-O3 | 19:04:33 clang-cmake-armv7-a15-selfhost-neon| 18:27:27 llvm-clang-x86_64-expensive-checks-win | 18:14:44 perf-x86_64-penryn-O3-polly-before-vectorizer-detect-only | 18:14:14 sanitizer-ppc64be-linux| 17:17:10 clang-cmake-armv7-a15 | 16:40:31 clang-with-thin-lto-ubuntu | 16:13:12 sanitizer-ppc64le-linux| 15:51:09 clang-cmake-mips | 15:46:41 clang-cmake-aarch64-full | 15:39:30 clang-with-lto-ubuntu | 15:30:43 clang-ppc64be-linux-lnt| 15:19:24 perf-x86_64-penryn-O3-polly-parallel-fast | 14:51:42 clang-native-arm-lnt | 14:45:39 clang-ppc64be-linux-multistage | 14:41:51 perf-x86_64-penryn-O3-polly-unprofitable | 14:39:51 clang-bpf-build| 14:33:46 lldb-x86_64-ubuntu-14.04-buildserver | 14:27:23 lldb-amd64-ninja-netbsd7 | 14:26:45 perf-x86_64-penryn-O3-polly| 14:25:25 clang-ppc64le-linux-multistage | 14:24:48 clang-cmake-armv7-a15-selfhost | 14:23:26 clang-cmake-thumbv7-a15-full-sh| 14:11:28 clang-cmake-aarch64-quick | 14:09:20 clang-ppc64be-linux| 14:09:05 llvm-mips-linux| 14:07:30 clang-cmake-armv7-a15-full | 14:07:08 clang-x86_64-linux-selfhost-modules-2 | 14:03:30 clang-cmake-aarch64-39vma | 14:03:17 clang-atom-d525-fedora-rel | 14:02:10 sanitizer-x86_64-linux-bootstrap | 14:01:46 clang-cmake-aarch64-42vma | 14:00:21 clang-x86_64-linux-selfhost-modules| 13:59:52 lldb-x86-windows-msvc2015 | 13:59:01 clang-hexagon-elf | 13:56:33 clang-ppc64le-linux| 13:55:16 polly-amd64-linux | 13:52:16 clang-ppc64le-linux-lnt| 13:49:21 lld-x86_64-freebsd | 13:46:54 lld-x86_64-darwin13| 13:46:18 clang-cuda-build | 13:44:58 lld-x86_64-win7| 13:43:40 clang-x86_64-linux-abi-test| 13:41:21 llvm-hexagon-elf | 13:41:13 llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast | 13:41:06 llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast | 13:39:03 sanitizer-x86_64-linux-fast| 13:36:57 polly-arm-linux| 13:35:42 clang-x86_64-debian-fast | 13:26:42 lldb-amd64-ninja-freebsd11 | 13:20:26 perf-x86_64-penryn-O3-polly-before-vectorizer-unprofitable | 12:49:29 clang-cmake-thumbv7-a15
[Lldb-commits] [PATCH] D31231: Reuse appropriate Launch and Attach on NetBSD
krytarowski created this revision. krytarowski added a project: LLDB. Herald added a subscriber: mgorny. NetBSD ships with NativeProcessNetBSD inherited from NativeProcessProtocol. Link Plugins/Process/gdb-remote with lldbPluginProcessNetBSD in order to resolve correctly the linking to Launch and Attach from the NetBSD plugin. Sponsored by Repository: rL LLVM https://reviews.llvm.org/D31231 Files: source/Host/common/NativeProcessProtocol.cpp source/Plugins/Process/gdb-remote/CMakeLists.txt Index: source/Plugins/Process/gdb-remote/CMakeLists.txt === --- source/Plugins/Process/gdb-remote/CMakeLists.txt +++ source/Plugins/Process/gdb-remote/CMakeLists.txt @@ -11,6 +11,10 @@ list(APPEND LLDB_PLUGINS lldbPluginProcessLinux) endif() +if(CMAKE_SYSTEM_NAME MATCHES "NetBSD") + list(APPEND LLDB_PLUGINS lldbPluginProcessNetBSD) +endif() + add_lldb_library(lldbPluginProcessGDBRemote PLUGIN GDBRemoteClientBase.cpp GDBRemoteCommunication.cpp Index: source/Host/common/NativeProcessProtocol.cpp === --- source/Host/common/NativeProcessProtocol.cpp +++ source/Host/common/NativeProcessProtocol.cpp @@ -504,7 +504,7 @@ return Error("failed to retrieve a valid architecture from the exe module"); } -#ifndef __linux__ +#if !defined(__linux__) && !defined(__NetBSD__) // These need to be implemented to support lldb-gdb-server on a given platform. // Stubs are // provided to make the rest of the code link on non-supported platforms. Index: source/Plugins/Process/gdb-remote/CMakeLists.txt === --- source/Plugins/Process/gdb-remote/CMakeLists.txt +++ source/Plugins/Process/gdb-remote/CMakeLists.txt @@ -11,6 +11,10 @@ list(APPEND LLDB_PLUGINS lldbPluginProcessLinux) endif() +if(CMAKE_SYSTEM_NAME MATCHES "NetBSD") + list(APPEND LLDB_PLUGINS lldbPluginProcessNetBSD) +endif() + add_lldb_library(lldbPluginProcessGDBRemote PLUGIN GDBRemoteClientBase.cpp GDBRemoteCommunication.cpp Index: source/Host/common/NativeProcessProtocol.cpp === --- source/Host/common/NativeProcessProtocol.cpp +++ source/Host/common/NativeProcessProtocol.cpp @@ -504,7 +504,7 @@ return Error("failed to retrieve a valid architecture from the exe module"); } -#ifndef __linux__ +#if !defined(__linux__) && !defined(__NetBSD__) // These need to be implemented to support lldb-gdb-server on a given platform. // Stubs are // provided to make the rest of the code link on non-supported platforms. ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits