[Lldb-commits] [PATCH] D52532: Pull GetSoftwareBreakpointPCOffset into base class

2018-09-26 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. I was wondering whether we want to normalize this inside the kernel and always advance the Program Counter.. but it's easier to manage it in userland. https://reviews.llvm.org/D52532 ___ lldb-commits mailing list lldb-c

[Lldb-commits] [PATCH] D52532: Pull GetSoftwareBreakpointPCOffset into base class

2018-09-30 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In https://reviews.llvm.org/D52532#1250404, @labath wrote: > In https://reviews.llvm.org/D52532#1246173, @krytarowski wrote: > > > I was wondering whether we want to normalize this inside the kernel and > > always advance the Program Counter.. but it's easier to mana

[Lldb-commits] [PATCH] D52941: NativeProcessProtocol: Simplify breakpoint setting code

2018-10-08 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski accepted this revision. krytarowski added a comment. This revision is now accepted and ready to land. The NetBSD part looks fine. I will be out of the office soon as I will visit California for GSoC Mentor Summit and MeetBSDCa (until October 23rd). https://reviews.llvm.org/D52941

[Lldb-commits] [PATCH] D52941: NativeProcessProtocol: Simplify breakpoint setting code

2018-11-03 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. This looks fine to me. https://reviews.llvm.org/D52941 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D54135: Add convenience method in FileSystem to check if a path/filespec is a directory.

2018-11-05 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Why? We already put a lot of effort into reusing code from LLVM. Repository: rLLDB LLDB https://reviews.llvm.org/D54135 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

[Lldb-commits] [PATCH] D54221: Add setting to require hardware breakpoints.

2018-11-07 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. On NetBSD one has to check PaX MPROTECT property of a traced process. Something like: bool IsMPROTECT(pid_t pid) { #if defined(__NetBSD__) int mib[3]; int paxflags; size_t len = sizeof(paxflags); mib[0] = CTL_PROC; mib[1] = pid; mib[2]

[Lldb-commits] [PATCH] D55706: ELF: more section creation cleanup

2018-12-14 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski edited reviewers, added: joerg; removed: krytarowski. krytarowski added a comment. I recommend joerg@ as a reviewer for ELF specifics. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55706/new/ https://reviews.llvm.org/D55706 ___

[Lldb-commits] [PATCH] D56233: [lldb-server] Add initial support for building lldb-server on Windows

2019-01-03 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: include/lldb/Host/windows/PosixApi.h:78 +#define WNOHANG 1 +#define WUNTRACED 2 I think that these symbols should not be leaked here in the first place. Repository: rLLDB LLDB CHANGES SINCE LAST ACTION https

[Lldb-commits] [PATCH] D47625: [cmake] Detect presence of wide-char libedit at build time

2018-06-01 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. The original reason to switch NetBSD to wide characters was to unbreak the input parser. It used to mix wide and short characters. Typing unicode characters doesn't work well here too (before applying the patch): `(lldb) za\U+017C\U+0142\U+0107 g\U+0119\U+015Bl\U+0

[Lldb-commits] [PATCH] D49110: [testsuite] Implement a category to skip libstdcxx tests

2018-07-10 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. NetBSD ships with GCC style and Clang style userland. The former one ships with GNU libstdc++, the latter with libc++. Repository: rL LLVM https://reviews.llvm.org/D49110 ___ lldb-commits mailing list lldb-commits@li

[Lldb-commits] [PATCH] D49110: [testsuite] Implement a category to skip libstdcxx tests

2018-07-10 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Probably the former with ship GDB at least for long time, the latter will switch to LLDB. Repository: rL LLVM https://reviews.llvm.org/D49110 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llv

[Lldb-commits] [PATCH] D49110: [testsuite] Implement a category to skip libstdcxx tests

2018-07-10 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Through pkgsrc a user can install LLDB with either style of distribution, including GCC with libstdc++ one (I'm using this myself also for the development of LLVM related code). BTW. NetBSD uses GPLv3 GNU toolchain. Repository: rL LLVM https://reviews.llvm.org/

[Lldb-commits] [PATCH] D39733: Simplify NativeProcessProtocol::GetArchitecture/GetByteOrder

2017-11-07 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. The NetBSD part looks good. https://reviews.llvm.org/D39733 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D39837: Clean up NativeRegisterContext

2017-11-09 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. The NetBSD part looks fine. https://reviews.llvm.org/D39837 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D39681: Implement core dump debugging for PPC64le

2017-11-14 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Plugins/Process/elf-core/elf-core-enums.h:14 +/// Core files PT_NOTE segment descriptor types +enum { + NT_PRSTATUS = 1, No namespace here? https://reviews.llvm.org/D39681 ___

[Lldb-commits] [PATCH] D39681: Implement core dump debugging for PPC64le

2017-11-14 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Plugins/Process/elf-core/elf-core-enums.h:14 +/// Core files PT_NOTE segment descriptor types +enum { + NT_PRSTATUS = 1, alexandreyy wrote: > krytarowski wrote: > > No namespace here? > I think these constant

[Lldb-commits] [PATCH] D39681: Implement core dump debugging for PPC64le

2017-11-14 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Plugins/Process/elf-core/elf-core-enums.h:14 +/// Core files PT_NOTE segment descriptor types +enum { + NT_PRSTATUS = 1, alexandreyy wrote: > krytarowski wrote: > > alexandreyy wrote: > > > krytarowski wrote:

[Lldb-commits] [PATCH] D39681: Implement core dump debugging for PPC64le

2017-11-15 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Plugins/Process/elf-core/elf-core-enums.h:14 +/// Core files PT_NOTE segment descriptor types +enum { + NT_PRSTATUS = 1, labath wrote: > krytarowski wrote: > > alexandreyy wrote: > > > krytarowski wrote: > >

[Lldb-commits] [PATCH] D40133: elf-core: Convert remaining register context to use register set maps

2017-11-16 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Looks reasonable! I'm just thinking whether change code like `CoreRegset::PPC_VMX` to `CoreRegset::PPC::VMX`. I'm planning to add `CoreRegset::X86_64::XSAVE` in future. https://reviews.llvm.org/D40133 ___ lldb-commits

[Lldb-commits] [PATCH] D40311: elf-core: Split up parsing code into os-specific functions

2017-11-21 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Plugins/Process/elf-core/ProcessElfCore.cpp:735 /// (see ELFNote structure) /// 3) A Thread Context in a core file usually described by 3 NOTE entries. ///a) NT_PRSTATUS - Register context Can we labe

[Lldb-commits] [PATCH] D41245: Reduce x86 register context boilerplate.

2017-12-14 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Personally I prefer the original code as it looks easier to implement FSAVE. https://reviews.llvm.org/D41245 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-c

[Lldb-commits] [PATCH] D41245: Reduce x86 register context boilerplate.

2017-12-14 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In https://reviews.llvm.org/D41245#955462, @krytarowski wrote: > Personally I prefer the original code as it looks easier to implement FSAVE. Also naming FPR is more logical, reusing the XSAVE name for 32-bit x86 looks wrong to me. https://reviews.llvm.org/D41245

[Lldb-commits] [PATCH] D41245: Reduce x86 register context boilerplate.

2017-12-14 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. I want to support x86 CPUs in 32-bit mode starting from 486. At least to read core dumps. This is the current bare minimum and tested setup by the releng team in NetBSD. OpenBSD used to support 80386 with MMU, but not sure if this is still true after migration to Cl

[Lldb-commits] [PATCH] D41245: Reduce x86 register context boilerplate.

2017-12-15 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In https://reviews.llvm.org/D41245#956644, @labath wrote: > In https://reviews.llvm.org/D41245#97, @krytarowski wrote: > > > Maybe reuse FPR for FXSAVE/FSAVE and add next to it XSAVE/XSAVE_OPT. > > > I am not sure what you mean by that, but I don't think it can wo

[Lldb-commits] [PATCH] D42195: [lldb] Generic base for testing gdb-remote behavior

2018-01-22 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. yaml2obj looks like a program from LLVM and we build and install it in pkgsrc. https://reviews.llvm.org/D42195 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb

[Lldb-commits] [PATCH] D42195: [lldb] Generic base for testing gdb-remote behavior

2018-01-23 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In the standalone build, we put yaml2obj into `$PREFIX/bin/`, so into the default `PATH` of the toolchain. https://reviews.llvm.org/D42195 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/

[Lldb-commits] [PATCH] D42488: Remove ObjectFile usage from HostLinux::GetProcessInfo

2018-01-25 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Looks fine. https://reviews.llvm.org/D42488 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D42868: Fix a crash in *NetBSD::Factory::Launch

2018-02-02 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski created this revision. krytarowski added reviewers: labath, joerg. Herald added a subscriber: llvm-commits. krytarowski edited the summary of this revision. We cannot call process_up->SetState() inside the NativeProcessNetBSD::Factory::Launch function because it triggers a NULL pointer

[Lldb-commits] [PATCH] D42868: Fix a crash in *NetBSD::Factory::Launch

2018-02-02 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. (gdb) r Starting program: /public/llvm-build/bin/lldb-server g \*:1234 -- /usr/bin/look [New process 15150] Thread 1 received signal SIGSEGV, Segmentation fault. lldb_private::NativeProcessProtocol::GetCurrentThreadID (this=0x0) at /public/llvm/tools/lld

[Lldb-commits] [PATCH] D42870: Correct recognition of NetBSD images

2018-02-02 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Extracted from: https://reviews.llvm.org/D32149. Repository: rL LLVM https://reviews.llvm.org/D42870 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commit

[Lldb-commits] [PATCH] D42870: Correct recognition of NetBSD images

2018-02-02 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski created this revision. krytarowski added reviewers: joerg, labath. Herald added subscribers: llvm-commits, emaste. Split the recognition into NetBSD executables & shared libraries and core(5) files. Introduce new owner type: "NetBSD-CORE", as core(5) files are not tagged in the same w

[Lldb-commits] [PATCH] D42868: Fix a crash in *NetBSD::Factory::Launch

2018-02-02 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp:116 static_cast(*thread).SetStoppedBySignal(SIGSTOP); - process_up->SetState(StateType::eStateStopped); Another option is to call: ``` process_up->SetSta

[Lldb-commits] [PATCH] D42868: Fix a crash in *NetBSD::Factory::Launch

2018-02-02 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski updated this revision to Diff 132689. Repository: rL LLVM https://reviews.llvm.org/D42868 Files: source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp Index: source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp ==

[Lldb-commits] [PATCH] D42870: Correct recognition of NetBSD images

2018-02-02 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. What would the test do? Repository: rL LLVM https://reviews.llvm.org/D42870 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D42870: Correct recognition of NetBSD images

2018-02-02 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Is there a working example of this? I would clone an existing code for Linux or other supported OS and adapt it for NetBSD. Please note that I'm in the process of restoration LLDB (lldb-server) so I cannot execute regular tests, at least in close time. Repository:

[Lldb-commits] [PATCH] D42912: Sync PlatformNetBSD.cpp with Linux

2018-02-05 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski created this revision. krytarowski added reviewers: labath, joerg. Herald added a subscriber: llvm-commits. Various changes in logging from log->Printf() to generic LLDB_LOG(). Sponsored by Repository: rL LLVM https://reviews.llvm.org/D42912 Files: source/Plugins/Platform/Net

[Lldb-commits] [PATCH] D42870: Correct recognition of NetBSD images

2018-02-11 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski planned changes to this revision. krytarowski added a comment. Herald added a subscriber: arichardson. I will be back to this once I will be done with debugging client-server connectivity issues (unrelated to this patch). Repository: rL LLVM https://reviews.llvm.org/D42870 ___

[Lldb-commits] [PATCH] D43698: Plug errno in TCPSocket::Connect()

2018-02-23 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski created this revision. krytarowski added reviewers: labath, joerg. krytarowski added a project: LLDB. Herald added a subscriber: llvm-commits. Reset errno to 0 for error branches. Without this, debugging real issues in LLDB is harder as we don't know what and when caused the errno to

[Lldb-commits] [PATCH] D43698: Plug errno in TCPSocket::Connect()

2018-02-23 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. This just helps debugging connectivity issues in other unrelated code-parts (I'm debugging why `select`(2) / `recv`(2) don't receive a packet of type `qHostInfo`). Floating errno is annoying. `TCPSocket::Connect()` has no bugs at least I'm not aware of them. Repo

[Lldb-commits] [PATCH] D43698: Plug errno in TCPSocket::Connect()

2018-02-23 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. https://github.com/search?l=C&q=save_errno&ref=opensearch&type=Code Here is an approach with `save_errno`, useful in libraries when we preserve errno for public functions in the API of a library as-is, and not leaking it from the internals to unrelated code. Right

[Lldb-commits] [PATCH] D43698: Plug errno in TCPSocket::Connect()

2018-02-23 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski abandoned this revision. krytarowski added a comment. This is considered to be a local patch. Repository: rL LLVM https://reviews.llvm.org/D43698 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

[Lldb-commits] [PATCH] D44056: [lldb] Fix "code unreachable" warning in HostThreadPosix::Cancel

2018-03-02 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. `::pthread_cancel` is available for NetBSD as well. https://reviews.llvm.org/D44056 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D44379: [cmake] Fix standalone+LLVM_LINK_LLVM_DYLIB builds (pr36687)

2018-03-12 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: cmake/modules/LLDBConfig.cmake:354 + + check_library_exists(dl dlopen "" HAVE_LIBDL) + if (HAVE_LIBDL) A more portable form of this: ``` foreach(lib ${CMAKE_DL_LIBS}) list(APPEND system_libs -l${lib}) endforeach()

[Lldb-commits] [PATCH] D44379: [cmake] Fix standalone+LLVM_LINK_LLVM_DYLIB builds (pr36687)

2018-03-12 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: cmake/modules/LLDBConfig.cmake:354 + + check_library_exists(dl dlopen "" HAVE_LIBDL) + if (HAVE_LIBDL) mgorny wrote: > krytarowski wrote: > > A more portable form of this: > > > > ``` > > foreach(lib ${CMAKE_DL_LI

[Lldb-commits] [PATCH] D44379: [cmake] Fix standalone+LLVM_LINK_LLVM_DYLIB builds (pr36687)

2018-03-12 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: cmake/modules/LLDBConfig.cmake:354 + + check_library_exists(dl dlopen "" HAVE_LIBDL) + if (HAVE_LIBDL) labath wrote: > krytarowski wrote: > > mgorny wrote: > > > krytarowski wrote: > > > > A more portable form of t

[Lldb-commits] [PATCH] D44379: [cmake] Fix standalone+LLVM_LINK_LLVM_DYLIB builds (pr36687)

2018-03-12 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: cmake/modules/LLDBConfig.cmake:354 + + check_library_exists(dl dlopen "" HAVE_LIBDL) + if (HAVE_LIBDL) krytarowski wrote: > labath wrote: > > krytarowski wrote: > > > mgorny wrote: > > > > krytarowski wrote: > > >

[Lldb-commits] [PATCH] D44379: [cmake] Fix standalone+LLVM_LINK_LLVM_DYLIB builds (pr36687)

2018-03-12 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: cmake/modules/LLDBConfig.cmake:349 -if (HAVE_LIBPTHREAD) - list(APPEND system_libs pthread) -endif(HAVE_LIBPTHREAD) - -if (HAVE_LIBDL) - list(APPEND system_libs ${CMAKE_DL_LIBS}) +if(UNIX) + set(CMAKE_THREAD_PREFER_PTHREAD TRUE)

[Lldb-commits] [PATCH] D44379: [cmake] Fix standalone+LLVM_LINK_LLVM_DYLIB builds (pr36687)

2018-03-12 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski accepted this revision. krytarowski added a comment. This revision is now accepted and ready to land. I cannot test it shortly on NetBSD, but if there are any issues left (probably none) - I will fix it in future. Comment at: cmake/modules/LLDBConfig.cmake:349 -i

[Lldb-commits] [PATCH] D31131: [LLDB] OpenBSD support

2017-03-19 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Fantastic! I got a substantial portion of Process Plugin to work on NetBSD, to coordinate the work feel free to join IRC `#lldb` at OFTC -- e.g. do not waste time on FreeBSD Process Plugin. Demo: http://www.netbsd.org/~kamil/lldb/hello2.txt I'm working on on remai

[Lldb-commits] [PATCH] D31131: [LLDB] OpenBSD support

2017-03-19 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Host/openbsd/Host.cpp:223 + +#if 0 +lldb::DataBufferSP Host::GetAuxvData(lldb_private::Process *process) { Wasn't it already gone from there? Repository: rL LLVM https://reviews.llvm.org/D31131 ___

[Lldb-commits] [PATCH] D31131: [LLDB] OpenBSD support

2017-03-19 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: include/lldb/Host/Config.h:35 + +#include "lldb/Host/openbsd/Config.h" Missing in patch? Repository: rL LLVM https://reviews.llvm.org/D31131 ___ lldb-commits mail

[Lldb-commits] [PATCH] D31131: [LLDB] OpenBSD support

2017-03-19 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: include/lldb/Host/Config.h:35 + +#include "lldb/Host/openbsd/Config.h" krytarowski wrote: > Missing in patch? I think that Config.h should go away. It's almost empty. But it's beyond the scope of this patch. Whil

[Lldb-commits] [PATCH] D31131: [LLDB] OpenBSD support

2017-03-19 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Plugins/Platform/CMakeLists.txt:8 +#elseif (CMAKE_SYSTEM_NAME MATCHES "OpenBSD") + add_subdirectory(OpenBSD) #elseif (CMAKE_SYSTEM_NAME MATCHES "Darwin") I would sort by subdirectory. Repository: rL LLVM

[Lldb-commits] [PATCH] D31131: [LLDB] OpenBSD support

2017-03-20 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: include/lldb/Host/HostInfo.h:55 +#elif defined(__OpenBSD__) +#include "lldb/Host/openbsd/HostInfoOpenBSD.h" +#define HOST_INFO_TYPE HostInfoOpenBSD kettenis wrote: > krytarowski wrote: > > I would sort includes here.

[Lldb-commits] [PATCH] D31132: Add NetBSD case in Entry::Type::ThreadID

2017-03-20 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski created this revision. krytarowski added a project: LLDB. 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. Reposi

[Lldb-commits] [PATCH] D31138: Add stub for PluginProcessNetBSD

2017-03-20 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski created this revision. krytarowski added a project: LLDB. Herald added a subscriber: mgorny. This is the base for introduction of further features to support Process Tracing on NetBSD, in local and remote setup. This code contains stubs of the needed functions. Their bodies will be a

[Lldb-commits] [PATCH] D31138: Add stub for PluginProcessNetBSD

2017-03-20 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. I have got a few local changes that conflict with https://reviews.llvm.org/D31131, this is why I will hold on them unless @kettenis does not intend to land his patch in the coming days. Repository: rL LLVM https://reviews.llvm.org/D31138 _

[Lldb-commits] [PATCH] D31146: Enable AUXV and QPassSignals in gdb-remote for NetBSD

2017-03-20 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski created this revision. krytarowski added a project: LLDB. 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 Repository: rL LLVM https://reviews.llvm.org/D31146

[Lldb-commits] [PATCH] D31131: [LLDB] OpenBSD support

2017-03-20 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Plugins/Process/elf-core/ProcessElfCore.cpp:588 + } +} else if (strncmp(note.n_name.c_str(), "OpenBSD", 7) == 0) { + m_os = llvm::Triple::OpenBSD; kettenis wrote: > krytarowski wrote: > > `note.n

[Lldb-commits] [PATCH] D31138: Add stub for PluginProcessNetBSD

2017-03-21 Thread Kamil Rytarowski via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D31146: Enable AUXV and QPassSignals in gdb-remote for NetBSD

2017-03-21 Thread Kamil Rytarowski via Phabricator via lldb-commits
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-comm

[Lldb-commits] [PATCH] D31131: [LLDB] OpenBSD support

2017-03-21 Thread Kamil Rytarowski via Phabricator via lldb-commits
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] [PATCH] D31138: Add stub for PluginProcessNetBSD

2017-03-21 Thread Kamil Rytarowski via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D31138: Add stub for PluginProcessNetBSD

2017-03-21 Thread Kamil Rytarowski via Phabricator via lldb-commits
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.t

[Lldb-commits] [PATCH] D31191: Enable ProcessPOSIXLog on NetBSD

2017-03-21 Thread Kamil Rytarowski via Phabricator via lldb-commits
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/Initiali

[Lldb-commits] [PATCH] D31192: Create instance of DynamicLoaderPOSIXDYLD on NetBSD

2017-03-21 Thread Kamil Rytarowski via Phabricator via lldb-commits
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/Dyna

[Lldb-commits] [PATCH] D31192: Create instance of DynamicLoaderPOSIXDYLD on NetBSD

2017-03-21 Thread Kamil Rytarowski via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D31231: Reuse appropriate Launch and Attach on NetBSD

2017-03-21 Thread Kamil Rytarowski via Phabricator via lldb-commits
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 an

[Lldb-commits] [PATCH] D31231: Reuse appropriate Launch and Attach on NetBSD

2017-03-22 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Next, I will work on a code to extend the NetBSD Process Plugin from a stub to a version that actually works. Repository: rL LLVM https://reviews.llvm.org/D31231 ___ lldb-commits mailing list lldb-commits@lists.llvm.

[Lldb-commits] [PATCH] D31231: Reuse appropriate Launch and Attach on NetBSD

2017-03-22 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. With x86_64 general purpose registers going before that. Repository: rL LLVM https://reviews.llvm.org/D31231 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lld

[Lldb-commits] [PATCH] D31131: [LLDB] OpenBSD support

2017-03-24 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/CMakeLists.txt:25 +include_directories( + Plugins/Process/POSIX + ) @labath are the includes for Plugins/Process/FreeBSD and Plugins/Process/FreeBSD necessary? I don't need to add Plugins/Process/NetBSD in

[Lldb-commits] [PATCH] D31131: [LLDB] OpenBSD support

2017-03-24 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski accepted this revision. krytarowski added a comment. This revision is now accepted and ready to land. In general it looks good. https://reviews.llvm.org/D31131 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.o

[Lldb-commits] [PATCH] D31131: [LLDB] OpenBSD support

2017-03-24 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Plugins/Process/Utility/RegisterContextOpenBSD_i386.cpp:48 + GPR gpr; + FPR_i386 i387; +}; kettenis wrote: > krytarowski wrote: > > no DBG regs here? > OpenBSD doesn't actually implement access to the debug

[Lldb-commits] [PATCH] D31374: Add support for tracing hello-world application on NetBSD

2017-03-26 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski created this revision. krytarowski added a project: LLDB. Herald added a subscriber: mgorny. This patch is a stripped down from features a NetBSD process code (patch is kept under 2k LOC). This code has assumption that there is only one thread within a debugged process. The only debugg

[Lldb-commits] [PATCH] D31131: [LLDB] OpenBSD support

2017-03-26 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In https://reviews.llvm.org/D31131#710862, @kettenis wrote: > Can somebody commit this diff for me? Sure, I'm on it. https://reviews.llvm.org/D31131 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lis

[Lldb-commits] [PATCH] D31374: Add support for tracing hello-world application on NetBSD

2017-03-26 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In https://reviews.llvm.org/D31374#710864, @kettenis wrote: > On OpenBSD the register context used in core dumps uses the same layout as > ptrace(2). That's not the case on all OSes, but I believe that is the case > for NetBSD as well. Would it be possible to re-u

[Lldb-commits] [PATCH] D31374: Add support for tracing hello-world application on NetBSD

2017-03-26 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Right now I'm not sure how to optimize reading GPR. If possible I would reschedule it for later. Repository: rL LLVM https://reviews.llvm.org/D31374 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://li

[Lldb-commits] [PATCH] D31374: Add support for tracing hello-world application on NetBSD

2017-03-28 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In https://reviews.llvm.org/D31374#712221, @labath wrote: > I wasn't able to go into this too deeply, but here is what I have after a > quick pass. I won't be able to review this thoroughly that soon, but I think > it can go in after you take my comments into consid

[Lldb-commits] [PATCH] D31374: Add support for tracing hello-world application on NetBSD

2017-03-28 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. This code is used as a base for further improvements, I'm going to commit it... debugging hello world still works. $ lldb ./hello

[Lldb-commits] [PATCH] D31374: Add support for tracing hello-world application on NetBSD

2017-03-28 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski updated this revision to Diff 93312. krytarowski added a comment. Apply changes from review. Repository: rL LLVM https://reviews.llvm.org/D31374 Files: source/Plugins/Process/NetBSD/CMakeLists.txt source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp source/Plugins/Process/

[Lldb-commits] [PATCH] D31450: Battery of NetBSD support improvements

2017-03-28 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski created this revision. krytarowski added a project: LLDB. Include initial support for: - single step mode (PT_STEP) - single step trap handling (TRAP_TRACE) - exec() trap (TRAP_EXEC) - add placeholder interfaces for FPR - initial code for NetBSD core(5) files - minor tweaks While the

[Lldb-commits] [PATCH] D31450: Battery of NetBSD support improvements

2017-03-28 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Next: watchpoints, FPR. Current core(5) file format is a subject to change (AUXV can be shortened)... I'm working on the final nits for the NetBSD-8 interfaces. Repository: rL LLVM https://reviews.llvm.org/D31450 __

[Lldb-commits] [PATCH] D31450: Battery of NetBSD support improvements

2017-03-28 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a reviewer: jingham. krytarowski added a comment. Adding Jim as a reviewer, since Pavel is mostly out of the keyboard for longer time. Repository: rL LLVM https://reviews.llvm.org/D31450 ___ lldb-commits mailing list lldb-commi

[Lldb-commits] [PATCH] D31450: Battery of NetBSD support improvements

2017-03-29 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp:249 + // Initialize new thread + struct ptrace_lwpinfo info = {}; + Error error = PtraceWrapper(PT_LWPINFO, pid, &info, sizeof(info)); labath wrote

[Lldb-commits] [PATCH] D31461: Add NetBSD path for Debugging Information in Separate Files

2017-03-29 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski created this revision. krytarowski added a project: LLDB. Herald added a subscriber: aprantl. NetBSD stores debug information files in the `/usr/libdata/debug` path. This change fixes debugging distribution executables, e.g. `look`(1): $ lldb /usr/bin/look

[Lldb-commits] [PATCH] D31450: Battery of NetBSD support improvements

2017-03-29 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. I think I will start the threading segment with proper handling of core(5) files. It looks like the simplest start point. OpenBSD uses very similar format and can catch up quickly. Repository: rL LLVM https://reviews.llvm.org/D31450 __

[Lldb-commits] [PATCH] D31450: Battery of NetBSD support improvements

2017-03-29 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp:383 // On Linux the executable is indicated by an empty path in the entry. On // FreeBSD and on Android it is the full path to the executable. ketten

[Lldb-commits] [PATCH] D31450: Battery of NetBSD support improvements

2017-03-29 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp:249 + // Initialize new thread + struct ptrace_lwpinfo info = {}; + Error error = PtraceWrapper(PT_LWPINFO, pid, &info, sizeof(info)); labath wrote

[Lldb-commits] [PATCH] D31450: Battery of NetBSD support improvements

2017-03-30 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski updated this revision to Diff 93524. krytarowski added a comment. Herald added a subscriber: srhines. Apply changes from review. No visible regressions in "check-lldb". Repository: rL LLVM https://reviews.llvm.org/D31450 Files: source/Host/common/Host.cpp source/Plugins/Dynam

[Lldb-commits] [PATCH] D31450: Battery of NetBSD support improvements

2017-03-30 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Thanks! Repository: rL LLVM https://reviews.llvm.org/D31450 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D31450: Battery of NetBSD support improvements

2017-03-30 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Thanks! I noted that I introduced some bugs.. but I will fix them in future revisions. I will move on to threads now. FPR/watchpoints will be done later, on the cost on adding some code for cores and helping out with base system work. LLDB/NetBSD is now out of the b

[Lldb-commits] [PATCH] D31784: Correct environ parsing on NetBSD

2017-04-06 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski created this revision. krytarowski added a project: LLDB. This replaces old code in Host::GetEnvironment for NetBSD with the version from Linux. This makes parsing environment variables correctly. It also fixes programs that depend on the variables like curses(3) applications. Long te

[Lldb-commits] [PATCH] D31825: Fix loading core(5) files from NetBSD 7.99.67

2017-04-10 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Hmm still wrong. Later in this code: // NetBSD per-thread information is stored in notes named // "NetBSD-CORE@nnn" so match on the initial part of the string. m_os = llvm::Triple::NetBSD; if (note.n_type == NETBSD::NT_PROCINFO) { ParseNetBSDProcInfo(*thr

[Lldb-commits] [PATCH] D31825: Fix loading core(5) files from NetBSD 7.99.67

2017-04-10 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Other BSDs work. Repository: rL LLVM https://reviews.llvm.org/D31825 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D31825: Fix loading core(5) files from NetBSD 7.99.67

2017-04-10 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. For the reference, I uploaded FreeBSD/amd64 and OpenBSD/i386 core(5) files: http://netbsd.org/~kamil/lldb/freebsd.10.3.release.p11-top.core.93102 http://netbsd.org/~kamil/lldb/openbsd.6.0-top.core Repository: rL LLVM https://reviews.llvm.org/D31825 ___

[Lldb-commits] [PATCH] D31877: Remove Plugins/Process/POSIX from include_directories

2017-04-10 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Thank you for working on it! https://reviews.llvm.org/D31877 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D31825: Fix loading core(5) files from NetBSD 7.99.67

2017-04-10 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski created this revision. krytarowski added a project: LLDB. This change has been authored by Zachary Turner. It fixes loading into the debugger core(5) files generated by NetBSD x86_64 v. 7.99.67. These core(5) files have the e_ident[EI_OSABI] property set to ELFOSABI_SYSV. It might ch

[Lldb-commits] [PATCH] D31825: Fix loading core(5) files from NetBSD 7.99.67

2017-04-10 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Example core(5) file: http://netbsd.org/~kamil/lldb/top.core Generated with gcore(1), which snapshoted a running top(1) program. Repository: rL LLVM https://reviews.llvm.org/D31825 ___ lldb-commits mailing list lldb-

[Lldb-commits] [PATCH] D31825: Fix loading core(5) files from NetBSD 7.99.67

2017-04-11 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. I might need some guidance to address the asserts appropriately in finite time. In general we set osabi to generic unix (value 0), and NetBSD core(5) files are distinguished only (or mostly) with "NetBSD-CORE*" notes. Repository: rL LLVM https://reviews.llvm.org

[Lldb-commits] [PATCH] D31969: [CMake] Support generating Config.h

2017-04-11 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: cmake/modules/LLDBConfig.cmake:433 +set(LLDB_CONFIG_TERMIOS_SUPPORTED ${HAVE_TERMIOS_H}) +set(LLDB_CONFIG_FCNTL_GETPATH_SUPPORTED ${HAVE_FCNTL_H}) +if(NOT UNIX) Can we just use `#ifdef F_GETPATH` in the source code?

  1   2   3   4   >