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

2017-04-11 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. While there there are candidates like `pipe2`(2) in `source/Host/posix/PipePosix.cpp`. https://reviews.llvm.org/D31969 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

[Lldb-commits] [PATCH] D32080: Introduce initial Debug Registers/NetBSD/amd64 support

2017-04-14 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski created this revision. krytarowski added a project: LLDB. This code offers Debug Registers (80386) model in LLDB/amd64. This is initial support and has one issue that will be addressed later, Debug Register trap (TRAP_DBREG) is registered as (TRAP_TRACE) for unknown reason. On the oth

[Lldb-commits] [PATCH] D32080: Introduce FPR and Debug Registers/NetBSD/amd64 support

2017-04-15 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski updated this revision to Diff 95380. krytarowski retitled this revision from "Introduce initial Debug Registers/NetBSD/amd64 support" to "Introduce FPR and Debug Registers/NetBSD/amd64 support". krytarowski edited the summary of this revision. krytarowski added a comment. Add FPR sup

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

2017-04-16 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski abandoned this revision. krytarowski added a comment. I will fix the original problem differently. Thanks for help! Repository: rL LLVM https://reviews.llvm.org/D31825 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://l

[Lldb-commits] [PATCH] D32125: [LLVM][MIPS] Fix different definition of off_t in LLDB and LLVM

2017-04-17 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Is this just GNU specific? BSD moved to 64-bit off_t on 32-bit platforms 20+ years ago. It's perhaps no-op, but it might be noted in the commit message what platforms are supposed to be improved. Repository: rL LLVM https://reviews.llvm.org/D32125 __

[Lldb-commits] [PATCH] D32149: Correct handling NetBSD core(5) files with threads

2017-04-17 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski created this revision. krytarowski added a project: LLDB. Correct detection of the NetBSD specific core(5) files. The original code was apparently copied from FreeBSD and it was buggy, because these BSDs are different and do not share the same ELF layout for core(5) files. Split Proce

[Lldb-commits] [PATCH] D32080: Introduce FPR and Debug Registers/NetBSD/amd64 support

2017-04-18 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp:22 +// clang-format off +#include labath wrote: > It is enough to place an empty line between the block's of includes that > cannot be reorder

[Lldb-commits] [PATCH] D31823: Update LLDB Host to support IPv6 over TCP

2017-04-19 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Fix from pkgsrc-wip to resurrect LLDB Standalone build in SVN r. 300654. From 3371648af049cb4b40427ef87dcafb4745f10e8d Mon Sep 17 00:00:00 2001 From: Kamil Rytarowski Date: Wed, 19 Apr 2017 06:17:30 +0200 Subject: [PATCH] lldb-netbsd: Upgrade to 300654 T

[Lldb-commits] [PATCH] D31823: Update LLDB Host to support IPv6 over TCP

2017-04-19 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/trunk/cmake/modules/LLDBConfig.cmake:435 find_package(Backtrace) +check_symbol_exists(ppoll poll.h HAVE_PPOLL) labath wrote: > This needs `set(CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)` to detect ppoll on >

[Lldb-commits] [PATCH] D32149: Correct handling NetBSD core(5) files with threads

2017-04-19 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Demo: http://netbsd.org/~kamil/lldb/firefox-core.typescript Replay: script -p ./firefox-core.typescript BSD `script`(1) is incompatible with the GNU one, so I prepared a quick port to Linux: http://netbsd.org/~kamil/lldb/nbscript.c `gcc nbscript.c -lutil -o nb

[Lldb-commits] [PATCH] D32149: Correct handling NetBSD core(5) files with threads

2017-04-20 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In https://reviews.llvm.org/D32149#731887, @labath wrote: > A test would infinitely times more valuable then a demo script. What is the > tiniest core file you can produce on NetBSD? (on linux we've gotten them down > to about 20K) Then we could check that in and wr

[Lldb-commits] [PATCH] D32149: Correct handling NetBSD core(5) files with threads

2017-04-20 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:1374 +else if ((note.n_name == LLDB_NT_OWNER_NETBSDCORE) && + (note.n_type == LLDB_NT_NETBSD_NT_PROCINFO)) { // Set the elf OS version to NetBSD. Also clear the

[Lldb-commits] [PATCH] D32149: Correct handling NetBSD core(5) files with threads

2017-04-20 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:1374 +else if ((note.n_name == LLDB_NT_OWNER_NETBSDCORE) && + (note.n_type == LLDB_NT_NETBSD_NT_PROCINFO)) { // Set the elf OS version to NetBSD. Also clear the

[Lldb-commits] [PATCH] D32149: Correct handling NetBSD core(5) files with threads

2017-04-21 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski updated this revision to Diff 96272. krytarowski edited the summary of this revision. krytarowski added a comment. Herald added a subscriber: srhines. Fix handling executable and shared library triple detection. Apply changes from review. Update revision summary. Repository: rL L

[Lldb-commits] [PATCH] D32271: Patch to Attach pid successfully from different dir

2017-04-24 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. I have plan to revisit corresponding files in NetBSD and switch from kvm(3) to sysctl(3). But this is lower priority than Process Plugin right now. https://reviews.llvm.org/D32271 ___ lldb-commits mailing list lldb-comm

[Lldb-commits] [PATCH] D32271: Patch to Attach pid successfully from different dir

2017-04-24 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In https://reviews.llvm.org/D32271#735354, @emaste wrote: > In https://reviews.llvm.org/D32271#735098, @krytarowski wrote: > > > I have plan to revisit corresponding files in NetBSD and switch from kvm(3) > > to sysctl(3). But this is lower priority than Process Plug

[Lldb-commits] [PATCH] D32421: Fix segfault resulting from empty print prompt

2017-04-25 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. I cannot reproduce it locally. $ lldb (lldb) print Enter expressions, then terminate with an empty line to evaluate: (lldb) Enter expressions, then terminate with an empty line to evaluate: (lldb) Steps: 1. start lldb 2. "print" 3. 4. `NetBSD 7.99.7

[Lldb-commits] [PATCH] D32149: Correct handling NetBSD core(5) files with threads

2017-04-26 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. ping? Repository: rL LLVM https://reviews.llvm.org/D32149 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D32149: Correct handling NetBSD core(5) files with threads

2017-04-27 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:302 + // default 32 or 64 bit arch (without any architecture revision) based on + // object file's class. if (header.e_type == ET_CORE) { joerg wrote: > Unrelated

[Lldb-commits] [PATCH] D32149: Correct handling NetBSD core(5) files with threads

2017-04-27 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In https://reviews.llvm.org/D32149#739727, @labath wrote: > In https://reviews.llvm.org/D32149#738250, @krytarowski wrote: > > > ping? > > > Sorry, I wasn't responding partially because I was waiting to see how the > discussion on https://reviews.llvm.org/D32434 sett

[Lldb-commits] [PATCH] D32149: Correct handling NetBSD core(5) files with threads

2017-04-28 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski updated this revision to Diff 97149. krytarowski added a comment. Strip non-functional style improvements in unrelated code-parts. Apply changes to address comments from Joerg. Repository: rL LLVM https://reviews.llvm.org/D32149 Files: source/Plugins/ObjectFile/ELF/ObjectFileE

[Lldb-commits] [PATCH] D32149: Correct handling NetBSD core(5) files with threads

2017-04-28 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski updated this revision to Diff 97150. krytarowski added a comment. Remove another unrelated style improvement. Repository: rL LLVM https://reviews.llvm.org/D32149 Files: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp source/Plugins/Process/elf-core/ProcessElfCore.cpp source

[Lldb-commits] [PATCH] D32866: Fix -DLLVM_BUILD_TESTS=ON lldb build

2017-05-04 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. NetBSD change looks fine. https://reviews.llvm.org/D32866 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D32866: Fix -DLLVM_BUILD_TESTS=ON lldb build

2017-05-04 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. FYI, NetBSD has its distinct libpanel in its base system, API compatible with ncurses. https://reviews.llvm.org/D32866 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

[Lldb-commits] [PATCH] D32930: New framework for lldb client-server communication tests.

2017-05-08 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. GoogleTest is an already a part of LLVM. It is stripped down version of this software with patches for LLVM - at least with included NetBSD support that is still pending upstream. https://reviews.llvm.org/D32930 ___ ll

[Lldb-commits] [PATCH] D32930: New framework for lldb client-server communication tests.

2017-05-08 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: unittests/tools/lldb-server/inferior/thread_inferior.cpp:21 + + asm volatile ("int3"); + delay = false; int3 is specific to x86. Some instructions to emit software breakpoint in other architectures: https://github

[Lldb-commits] [PATCH] D33035: Tool for using Intel(R) Processor Trace hardware feature

2017-05-10 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Can we please use a generic process plugin code, not the specific Linux one? If the generic code is insufficient - we should adjust it and alter instances of it (Linux and BSD). https://reviews.llvm.org/D33035 ___ lldb

[Lldb-commits] [PATCH] D33035: Tool for using Intel(R) Processor Trace hardware feature

2017-05-10 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In https://reviews.llvm.org/D33035#751280, @clayborg wrote: > In https://reviews.llvm.org/D33035#751264, @krytarowski wrote: > > > Can we please use the generic process plugin code, not the specific Linux > > one? If the generic code is insufficient - we should adjus

[Lldb-commits] [PATCH] D32930: New framework for lldb client-server communication tests.

2017-05-11 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: unittests/tools/lldb-server/tests/MessageObjects.cpp:200 + + return std::stoul(big_endian, nullptr, 16); +} Throws exceptions. https://reviews.llvm.org/D32930 ___ lld

[Lldb-commits] [PATCH] D32930: New framework for lldb client-server communication tests.

2017-05-11 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Some headers are UNIX-specific like ``, is it possible to make these tests compatible with Windows? https://reviews.llvm.org/D32930 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

[Lldb-commits] [PATCH] D32930: New framework for lldb client-server communication tests.

2017-05-11 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: unittests/tools/lldb-server/inferior/thread_inferior.cpp:1 +#include +#include For the clarity I would put the copyright notice in all files, including tests. https://reviews.llvm.org/D32930 __

[Lldb-commits] [PATCH] D32930: New framework for lldb client-server communication tests.

2017-05-11 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: unittests/tools/lldb-server/tests/TestClient.cpp:70 +void TestClient::StopDebugger() { + Host::Kill(server_process_info.GetProcessID(), 15); +} jmajors wrote: > labath wrote: > > This is not portable. > Is there a p

[Lldb-commits] [PATCH] D32930: New framework for lldb client-server communication tests.

2017-05-11 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. I can build locally with `make thread_inferior`, how to run it? https://reviews.llvm.org/D32930 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D32930: New framework for lldb client-server communication tests.

2017-05-11 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: unittests/tools/lldb-server/inferior/thread_inferior.cpp:21 + + LLVM_BUILTIN_DEBUGTRAP; + delay = false; jmajors wrote: > zturner wrote: > > This will work on MSVC and presumably clang. I'm not sure about gcc. Is

[Lldb-commits] [PATCH] D32930: New framework for lldb client-server communication tests.

2017-05-11 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. If I'm not mistaken LLVM `__builtin_debugtrap` is defined only for X86. It will also fail on GCC as there is no support for it. The NetBSD buildbot in LLDB runs GCC 5.x with libstdc++. https://reviews.llvm.org/D32930 _

[Lldb-commits] [PATCH] D32930: New framework for lldb client-server communication tests.

2017-05-11 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Personally I would rely on LLDB feature to set software/hardware breakpoint in tracee, and never simulate debugtrap with some predefined value. This will ensure portability to more CPUs and operating systems. For example Sun SPARC CPUs (at least on NetBSD) won't pas

[Lldb-commits] [PATCH] D32930: New framework for lldb client-server communication tests.

2017-05-12 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: unittests/tools/lldb-server/tests/MessageObjects.cpp:83-88 + if (endian == LITTLE) { +registers[register_id] = SwitchEndian(value_str); + } + else { +registers[register_id] = stoul(value_str, nullptr, 1

[Lldb-commits] [PATCH] D32930: New framework for lldb client-server communication tests.

2017-05-12 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: unittests/tools/lldb-server/inferior/thread_inferior.cpp:21 + + LLVM_BUILTIN_DEBUGTRAP; + delay = false; jmajors wrote: > krytarowski wrote: > > jmajors wrote: > > > zturner wrote: > > > > This will work on MSVC an

[Lldb-commits] [PATCH] D32930: New framework for lldb client-server communication tests.

2017-05-12 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: unittests/tools/lldb-server/tests/MessageObjects.h:33 + uid_t real_uid; + unsigned int real_gid; + uid_t effective_uid; Is there an option to use `gid_t`? https://reviews.llvm.org/D32930 _

[Lldb-commits] [PATCH] D32930: New framework for lldb client-server communication tests.

2017-05-12 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In https://reviews.llvm.org/D32930#753916, @labath wrote: > next batch of comments from me (I expect to have more on monday). :) > > In https://reviews.llvm.org/D32930#752843, @krytarowski wrote: > > > I can build locally with `make thread_inferior`, how to run it? >

[Lldb-commits] [PATCH] D32930: New framework for lldb client-server communication tests.

2017-05-12 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: unittests/tools/lldb-server/inferior/thread_inferior.cpp:21 + + LLVM_BUILTIN_DEBUGTRAP; + delay = false; labath wrote: > krytarowski wrote: > > jmajors wrote: > > > krytarowski wrote: > > > > jmajors wrote: > > > >

[Lldb-commits] [PATCH] D32930: New framework for lldb client-server communication tests.

2017-05-12 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: unittests/tools/lldb-server/inferior/thread_inferior.cpp:21 + + LLVM_BUILTIN_DEBUGTRAP; + delay = false; zturner wrote: > labath wrote: > > krytarowski wrote: > > > labath wrote: > > > > krytarowski wrote: > > > >

[Lldb-commits] [PATCH] D33167: Get rid of some uses of StringConvert and reduce some indentation

2017-05-13 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. It's not that perfectly clear to me that `SetStatus()` returns `Succeeded()`, however I don't have a proposal for a better name. `SetStatusReturnSucceeded()` or similar are long. https://reviews.llvm.org/D33167 ___ lld

[Lldb-commits] [PATCH] D32930: New framework for lldb client-server communication tests.

2017-05-19 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: unittests/tools/lldb-server/tests/TestClient.cpp:115 + + if (thread_id == 0) thread_id = process_info->GetPid(); + labath wrote: > jmajors wrote: > > labath wrote: > > > This is a linux-ism. Other targets don't have

[Lldb-commits] [PATCH] D32271: Patch to Attach pid successfully from different dir

2017-05-19 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. If we end up with hard links I think we should change them to symbolic ones. This is a common policy in some open source distributions. https://reviews.llvm.org/D32271 ___ lldb-commits mailing list lldb-commits@lists.ll

[Lldb-commits] [PATCH] D32585: Implementation of remote packets for Trace data.

2017-05-22 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: include/lldb/Host/common/NativeProcessProtocol.h:352 + lldb::tid_t thread = LLDB_INVALID_THREAD_ID) { +return Status("Not implemented"); + } This is Linuxism. Not every OS can trace on p

[Lldb-commits] [PATCH] D32149: Correct handling NetBSD core(5) files with threads

2017-05-23 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski updated this revision to Diff 100035. krytarowski added a comment. Rebase to HEAD. Apply "Error" -> "Status" rename. Repository: rL LLVM https://reviews.llvm.org/D32149 Files: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp source/Plugins/Process/elf-core/ProcessElfCore.cpp

[Lldb-commits] [PATCH] D32149: Correct handling NetBSD core(5) files with threads

2017-05-23 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Can we go with this change? Repository: rL LLVM https://reviews.llvm.org/D32149 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D32149: Correct handling NetBSD core(5) files with threads

2017-05-24 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In https://reviews.llvm.org/D32149#763008, @labath wrote: > What was your decision on the core files? I was under the impression you were > gonna add the zip files as well. If so, then they should go in at the same > time. In the same commit? If so I will try to a

[Lldb-commits] [PATCH] D33778: Add a NativeProcessProtocol Factory class

2017-06-01 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp:112 + if (wpid != pid || !WIFSTOPPED(wstatus)) { +std::error_code EC(errno, std::generic_category()); +LLDB_LOG( I can imagine that in some cases there m

[Lldb-commits] [PATCH] D33831: Add temp_failure_retry helper function

2017-06-02 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Plugins/Process/FreeBSD/ProcessMonitor.cpp:788 -WAIT_AGAIN: - // Wait for the operation thread to initialize. - if (sem_wait(&args->m_semaphore)) { -if (errno == EINTR) - goto WAIT_AGAIN; -else { - error.

[Lldb-commits] [PATCH] D33831: Add temp_failure_retry helper function

2017-06-02 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: include/lldb/Host/Host.h:252 +result = f(args...); + while (result == fail_value && errno == EINTR); + return result; Will this build on Windows for their native API? If so, will it be useful there? https://r

[Lldb-commits] [PATCH] D33998: Add pretty-printer for wait(2) statuses and modernize the code handling them

2017-06-07 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Host/common/Host.cpp:1001 +return {Stop, uint8_t(WSTOPSIG(wstatus))}; + llvm_unreachable("Unknown wait status"); +} `WIFCONTINUED()`? https://reviews.llvm.org/D33998 _

[Lldb-commits] [PATCH] D33998: Add pretty-printer for wait(2) statuses and modernize the code handling them

2017-06-07 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Host/common/Host.cpp:1001 +return {Stop, uint8_t(WSTOPSIG(wstatus))}; + llvm_unreachable("Unknown wait status"); +} labath wrote: > krytarowski wrote: > > `WIFCONTINUED()`? > I'm deliberately ignoring tha

[Lldb-commits] [PATCH] D33998: Add pretty-printer for wait(2) statuses and modernize the code handling them

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

[Lldb-commits] [PATCH] D34236: Delete ProcessLauncherPosix

2017-06-15 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. NetBSD part looks good. In next step we can rename ProcessLauncherPosixFork to ProcessLauncherPosix. https://reviews.llvm.org/D34236 _

[Lldb-commits] [PATCH] D34274: Remove home-grown thread-local storage wrappers

2017-06-16 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Modern BSDs should be fine on popular platforms. https://reviews.llvm.org/D34274 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D34553: Shorten sanitizer plugin names

2017-06-23 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Looks good. It's easier to parse [at least for my eyes]: ubsan, asan, tsan etc than full-names. https://reviews.llvm.org/D34553 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mai

[Lldb-commits] [PATCH] D33778: Add a NativeProcessProtocol Factory class

2017-07-03 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp:85 + int wstatus; + ::pid_t wpid = llvm::sys::RetryAfterSignal(-1, ::waitpid, pid, &wstatus, 0); + assert(wpid == pid); We can set BSD specific: `-1` -> `WAIT_

[Lldb-commits] [PATCH] D33778: Add a NativeProcessProtocol Factory class

2017-07-03 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp:85 + int wstatus; + ::pid_t wpid = llvm::sys::RetryAfterSignal(-1, ::waitpid, pid, &wstatus, 0); + assert(wpid == pid); labath wrote: > krytarowski wrote: > >

[Lldb-commits] [PATCH] D33778: Add a NativeProcessProtocol Factory class

2017-07-03 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski accepted this revision. krytarowski added inline comments. This revision is now accepted and ready to land. Comment at: source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp:87 + assert(wpid == pid); + (void)wpid; + if (wpid != pid || !WIFSTOPPED(wstatus)) { --

[Lldb-commits] [PATCH] D35065: [LLDB][ppc64le] Rename enums in AuxVector

2017-07-06 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Values like AT_NULL are macros on NetBSD and there are no problems? https://reviews.llvm.org/D35065 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D35065: [LLDB][ppc64le] Rename enums in AuxVector

2017-07-06 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. What are the build failures? https://reviews.llvm.org/D35065 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D35065: [LLDB][ppc64le] Rename enums in AuxVector

2017-07-06 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp:115 _type: \ name = #_type switch (type) { brunoalr wrote: > joerg wrote: > > laba

[Lldb-commits] [PATCH] D35113: Clean up lldb-types.h

2017-07-07 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Plugins/DynamicLoader/POSIX-DYLD/AuxVector.cpp:18 #if defined(__linux__) || defined(__FreeBSD__) #include "Plugins/Process/elf-core/ProcessElfCore.h" #endif Is this needed here? https://reviews.llvm.org/D

[Lldb-commits] [PATCH] D35123: Remove shared pointer from NativeProcessProtocol

2017-07-10 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. I have no particular opinion on it. If it builds and works, I'm fine with it. https://reviews.llvm.org/D35123 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-

[Lldb-commits] [PATCH] D35618: Remove shared_pointer from NativeThreadProtocol

2017-07-19 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. I don't have particular opinion. This change makes code cleaner. https://reviews.llvm.org/D35618 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D36804: Add initial support to PowerPC64 little endian (POWER8)

2017-08-22 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added reviewers: labath, clayborg. krytarowski added a comment. + Linux and general LLDB maintainers https://reviews.llvm.org/D36804 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo

[Lldb-commits] [PATCH] D32149: Correct handling NetBSD core(5) files with threads

2017-09-27 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski planned changes to this revision. krytarowski added a comment. Suspended, I need to resurrect tracing of 1 thread and fix kernel bugs for multiple threads first. Repository: rL LLVM https://reviews.llvm.org/D32149 ___ lldb-commits ma

[Lldb-commits] [PATCH] D57959: [lldb] [MainLoop] Initialize empty sigset_t correctly

2019-02-08 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. I think that sigemptyset(2) is unsupported on Windows. Comment at: lldb/source/Host/common/MainLoop.cpp:149 for (const auto &sig : loop.m_signals) sigdelset(&sigmask, sig.first); #endif Shouldn't we initialize sigmask alway

[Lldb-commits] [PATCH] D57959: [lldb] [MainLoop] Initialize empty sigset_t correctly

2019-02-08 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/source/Host/common/MainLoop.cpp:149 for (const auto &sig : loop.m_signals) sigdelset(&sigmask, sig.first); #endif krytarowski wrote: > Shouldn't we initialize sigmask always before adding/deleting parti

[Lldb-commits] [PATCH] D57912: [lldb] [unittests] Disable MainLoopTest::DetectsEOF on NetBSD

2019-02-08 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. @labath our short-term goal is to enable execution of LLDB tests on the NetBSD buildbot. We are stuck temporarily with an older release of NetBSD on the machine for some time (1-2 months) so we need to live with it for now. No need to make it better than sufficient

[Lldb-commits] [PATCH] D57959: [lldb] [MainLoop] Initialize empty sigset_t correctly

2019-02-08 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In D57959#1390929 , @mgorny wrote: > Ok, I see that `_WIN32` actually redefines `sigset_t`, so I've added a > separate branch for it. Maybe `#ifdef LLVM_ON_UNIX`? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57959

[Lldb-commits] [PATCH] D57959: [lldb] [MainLoop] Initialize empty sigset_t correctly

2019-02-08 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In D57959#1390992 , @mgorny wrote: > But to what purpose? I think it's better to use consistent macros to refer to > the same scenario. I had an impression that LLVM_ON_UNIX is LLVM homegrown symbol for this exact purpose t

[Lldb-commits] [PATCH] D58131: [lldb] [unittest] Avoid mixing '127.0.0.1' and 'localhost'

2019-02-12 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski accepted this revision. krytarowski added a comment. Short term this looks fine. Repository: rLLDB LLDB CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58131/new/ https://reviews.llvm.org/D58131 ___ lldb-commits mailing list ll

[Lldb-commits] [PATCH] D58230: [lldb] [MainLoop] Add kevent() EINTR handling

2019-02-14 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. For EINTR we shall use `llvm::sys::RetryAfterSignal` Repository: rLLDB LLDB CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58230/new/ https://reviews.llvm.org/D58230 ___ lldb-commits mailing list lldb-commits@

[Lldb-commits] [PATCH] D42206: If kevent() is interrupted by signal (or is being debugged) and we get EINTR, retry

2019-02-14 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Herald added a project: LLVM. 'attaching a debugger produces an observable side-effect (EINTR) in the debugged process is considered a bug by the linux kernel folks' There are differences between Linux and BSD. On BSD we try hard to make return of such syscall peace

[Lldb-commits] [PATCH] D58227: [lldb] [MainLoop] Remove redundant termination clause (NFCI)

2019-02-14 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. It looks good to me. Repository: rLLDB LLDB CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58227/new/ https://reviews.llvm.org/D58227 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llv

[Lldb-commits] [PATCH] D58230: [lldb] [MainLoop] Add kevent() EINTR handling

2019-02-14 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In D58230#1398529 , @mgorny wrote: > In D58230#1398020 , @krytarowski > wrote: > > > For EINTR we shall use `llvm::sys::RetryAfterSignal` > > > `kevent()` man page indicates: > > > All

[Lldb-commits] [PATCH] D58230: [lldb] [MainLoop] Add kevent() EINTR handling

2019-02-15 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. @mgorny let's go through tech-kern@ and later checking FreeBSD/Darwin/OpenBSD. I think it's worth to clarify this in the documentation. As an intermediate version we can land this patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58230/new/ https://revi

[Lldb-commits] [PATCH] D42870: [lldb] [ObjectFile/ELF] Correct recognition of NetBSD images

2019-02-18 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:1359 + // p = patchlevel + const uint32_t version_major = version_info / 1; + const uint32_t version_minor = (version_info % 1) / 100; ---

[Lldb-commits] [PATCH] D42870: [lldb] [ObjectFile/ELF] Correct recognition of NetBSD images

2019-02-18 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/lit/Modules/ELF/netbsd-core.test:3 + +# RUN: lldb-test object-file %S/Inputs/netbsd.core | FileCheck %s +# CHECK: Architecture: x86_64-unknown-netbsd I propose to keep it as netbsd$VERSION-$ARCH.core We will wa

[Lldb-commits] [PATCH] D42870: [lldb] [ObjectFile/ELF] Correct recognition of NetBSD images

2019-02-18 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/lit/Modules/ELF/netbsd-core.test:3 + +# RUN: lldb-test object-file %S/Inputs/netbsd.core | FileCheck %s +# CHECK: Architecture: x86_64-unknown-netbsd krytarowski wrote: > I propose to keep it as netbsd$VERSION-$

[Lldb-commits] [PATCH] D58527: [lldb] [test] Mark failing tests XFAIL on NetBSD

2019-03-03 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski accepted this revision. krytarowski added a comment. Feel free to commit this and next without review. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58527/new/ https://reviews.llvm.org/D58527 ___ lldb-commits mailing list lldb-c

[Lldb-commits] [PATCH] D32149: [lldb] [Process] Add proper support for NetBSD core files with threads

2019-03-07 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Looks good to me. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D32149/new/ https://reviews.llvm.org/D32149 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[Lldb-commits] [PATCH] D59177: [lldb] [test] Make 2lwp_process_SIGSEGV test more portable

2019-03-09 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.c:9 char F = 'b'; - kill(getpid(), SIGSEGV); // Frame bar + while (1); // Frame bar } Just style, but I would use

[Lldb-commits] [PATCH] D59427: [lldb] [API] Split SBRegistry into smaller files

2019-03-15 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. It looks good to me, but maybe @JDevlieghere has a better idea how to optimize it. Repository: rLLDB LLDB CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59427/new/ https://reviews.llvm.org/D59427 ___ lldb

[Lldb-commits] [PATCH] D60034: [lldb] [Process/elf-core] Support aarch64 NetBSD core dumps

2019-03-31 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski accepted this revision. krytarowski added inline comments. This revision is now accepted and ready to land. Comment at: lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp:657 } break; + case llvm::Triple::aarch64: { +// Assume order PT_GETREGS

[Lldb-commits] [PATCH] D60034: [lldb] [Process/elf-core] Support aarch64 NetBSD core dumps

2019-03-31 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/TestNetBSDCore.py:236 + +@skipIfLLVMTargetMissing("AArch64") +def test_aarch64(self): I would move it above X86. Repository: rLL

[Lldb-commits] [PATCH] D29089: Switch HostInfoNetBSD::GetProgramFileSpec to sysctl(7)

2017-01-24 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski created this revision. krytarowski added a project: LLDB. Remove dependency on the proc (/proc) filesystem, which is optional. KERN_PROC_PATHNAME is available in NetBSD-current and will land NetBSD 8.0. Older stable versions of NetBSD will not be supported. Sponsored by Repository

[Lldb-commits] [PATCH] D29091: Recognize Real-Time Signals on NetBSD

2017-01-24 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski created this revision. krytarowski added a project: LLDB. Real-Time Signals are available in NetBSD-current and will land NetBSD 8.0. Older stable versions of NetBSD will not be supported. Sponsored by Repository: rL LLVM https://reviews.llvm.org/D29091 Files: source/Plugins/

[Lldb-commits] [PATCH] D29256: Do not pass non-trivial type variables through variadic function

2017-01-28 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski created this revision. krytarowski added a project: LLDB. Herald added a subscriber: ki.stfu. Cannot pass object of non-trivial type 'const CMIUtilString' through variadic function. Original patch by Tobias Nygren (NetBSD). Sponsored by Repository: rL LLVM http

[Lldb-commits] [PATCH] D29264: Add NetBSD support in Host::GetCurrentThreadID

2017-01-29 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski created this revision. krytarowski added a project: LLDB. To retrieve the native thread ID there must be called _lwp_self(). Sponsored by Repository: rL LLVM https://reviews.llvm.org/D29264 Files: source/Host/common/Host.cpp Index: source/Host/common/Host.cpp ==

[Lldb-commits] [PATCH] D29266: Synchronize PlatformNetBSD with Linux

2017-01-29 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski created this revision. krytarowski added a project: LLDB. Update the code to the new world code. These changes are needed for remote process plugin. Sponsored by Repository: rL LLVM https://reviews.llvm.org/D29266 Files: source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp so

[Lldb-commits] [PATCH] D29256: Do not pass non-POD type variables through variadic function

2017-01-30 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In https://reviews.llvm.org/D29256#660072, @ki.stfu wrote: > I don't know the point of this patch (probably it's something special for > NetBSD? @emaste) but I'm okay with that. It's undefined (implementation defined) behavior. C++11 5.2.2/7: > Passing a potent

[Lldb-commits] [PATCH] D29256: Do not pass non-POD type variables through variadic function

2017-01-30 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Hmm, I'm not reproducing it right now either. It's a patch added a year ago. I've pinged Tobias. Repository: rL LLVM https://reviews.llvm.org/D29256 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://li

[Lldb-commits] [PATCH] D29288: Switch std::call_once to llvm::call_once

2017-01-30 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski created this revision. krytarowski added a project: LLDB. The std::call_once implementation in libstdc++ has problems on few systems: NetBSD, OpenBSD and Linux PPC. LLVM ships with a homegrown implementation llvm::call_once to help on these platforms. This change is required

[Lldb-commits] [PATCH] D29288: Switch std::call_once to llvm::call_once

2017-01-30 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. I can build and test this patch on NetBSD/amd64. I don't have access right now to a performant FreeBSD, Linux, Android, Windows and FreeBSD hosts to test build and execute tests for this patch on other platforms. Please check. I was in touch with `libstdc++` develo

[Lldb-commits] [PATCH] D29288: Switch std::call_once to llvm::call_once

2017-01-30 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In https://reviews.llvm.org/D29288#660636, @clayborg wrote: > Be very careful when using this, you can't change member variables that used > to be std::once to be statics. We also don't need the llvm namespace to be > included with "using namespace llvm;" in many of

[Lldb-commits] [PATCH] D29288: Switch std::call_once to llvm::call_once

2017-01-30 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. namespace llvm { namespace sys { void MemoryFence(); #ifdef _MSC_VER typedef long cas_flag; #else typedef uint32_t cas_flag; #endif cas_flag CompareAndSwap(volatile cas_flag* ptr, cas_flag new_value,

<    1   2   3   4   >