[Lldb-commits] [PATCH] D110553: [lldb] Remove non-stop mode code

2021-09-27 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski accepted this revision. krytarowski added a comment. NetBSD and FreeBSD do not support non-stop in the kernel. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110553/new/ https://reviews.llvm.org/D110553 _

[Lldb-commits] [PATCH] D96766: [lldb] [Process/FreeBSD] Introduce mips64 FPU reg support

2021-09-09 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski accepted this revision. krytarowski added a comment. Looks still fine. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96766/new/ https://reviews.llvm.org/D96766 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://list

[Lldb-commits] [PATCH] D101563: [lldb] [test] Extend aarch64-gp-read test to cover all registers

2021-09-08 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski requested changes to this revision. krytarowski added a comment. This revision now requires changes to proceed. There is an unhandled comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101563/new/ https://reviews.llvm.org/D101563

[Lldb-commits] [PATCH] D109326: [lldb] [Process/FreeBSD] Support SaveCore() using PT_COREDUMP

2021-09-07 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. Looks good CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109326/new/ https://reviews.llvm.org/D109326 ___ lldb-commits mailing l

[Lldb-commits] [PATCH] D101329: [lldb] Support SaveCore() from gdb-remote client

2021-09-06 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. Looks correct. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101329/new/ https://reviews.llvm.org/D101329 ___ lldb-commits maili

[Lldb-commits] [PATCH] D101285: [lldb] [llgs server] Support creating core dumps on NetBSD

2021-09-06 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. Looks good CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101285/new/ https://reviews.llvm.org/D101285 ___ lldb-commits mailing l

[Lldb-commits] [PATCH] D100503: [lldb] [client] Implement follow-fork-mode

2021-09-02 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. Looks good CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100503/new/ https://reviews.llvm.org/D100503 ___ lldb-commits mailing l

[Lldb-commits] [PATCH] D100267: [lldb] [gdb-remote client] Remove breakpoints throughout vfork

2021-08-31 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski accepted this revision. krytarowski added a comment. Let's see. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100267/new/ https://reviews.llvm.org/D100267 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llv

[Lldb-commits] [PATCH] D100267: [lldb] [gdb-remote client] Remove breakpoints throughout vfork

2021-08-31 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. Looks reasonable CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100267/new/ https://reviews.llvm.org/D100267 ___ lldb-commits mai

[Lldb-commits] [PATCH] D100263: [lldb] [gdb-remote client] Remove breakpoints in forked processes

2021-08-31 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. Looks correct. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100263/new/ https://reviews.llvm.org/D100263 ___ lldb-commits maili

[Lldb-commits] [PATCH] D100206: [lldb] [llgs client] Support minimal fork/vfork handling

2021-08-30 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. Looks good. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100206/new/ https://reviews.llvm.org/D100206 ___ lldb-commits mailing

[Lldb-commits] [PATCH] D97114: [lldb] [docs] Update platform support status

2021-02-20 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski accepted this revision. krytarowski added a comment. NetBSD OK! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97114/new/ https://reviews.llvm.org/D97114 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.

[Lldb-commits] [PATCH] D95947: [lldb] [Process/FreeBSDRemote] Introduce powerpc support

2021-02-08 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/source/Host/common/NativeProcessProtocol.cpp:525-526 static const uint8_t g_s390x_opcode[] = {0x00, 0x01}; + static const uint8_t g_ppc_opcode[] = {0x7f, 0xc0, 0x00, 0x08}; static const uint8_t g_ppc64le_opcode[] = {0x08,

[Lldb-commits] [PATCH] D95947: [lldb] [Process/FreeBSDRemote] Introduce powerpc support

2021-02-08 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/source/Host/common/NativeProcessProtocol.cpp:525-526 static const uint8_t g_s390x_opcode[] = {0x00, 0x01}; + static const uint8_t g_ppc_opcode[] = {0x7f, 0xc0, 0x00, 0x08}; static const uint8_t g_ppc64le_opcode[] = {0x08,

[Lldb-commits] [PATCH] D95802: [lldb] [Process/FreeBSDRemote] Introduce mips64 support

2021-02-04 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Merging is a good idea as NetBSD might duplicate these code chunks too. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95802/new/ https://reviews.llvm.org/D95802 ___ lldb-commits mailing list lldb-commits@lists.llv

[Lldb-commits] [PATCH] D95696: [lldb] [Process/FreeBSDRemote] Introduce arm (32-bit) support

2021-01-30 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In D95696#2532032 , @strejda wrote: > Oki, I see, thanks for response. Please give me a few days to analyze (and > eventually to implement). Meanwhile, does this patch look fine as is? Hardware assisted watchpoints could be

[Lldb-commits] [PATCH] D95297: [lldb] [Process/FreeBSDRemote] Introduce arm64 support

2021-01-29 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. @clayborg please have a look! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95297/new/ https://reviews.llvm.org/D95297 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[Lldb-commits] [PATCH] D92667: [lldb] [Platform/POSIX] Use gdb-remote plugin when attaching

2020-12-04 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In D92667#2434223 , @emaste wrote: > No objection here. I'm curious why the two modified tests work on Linux or > NetBSD today though? This is a debt of having 2 process plugins. NetBSD and Linux ship with a single one only.

[Lldb-commits] [PATCH] D92187: [lldb] [FreeBSD] Fix establishing DT_NEEDED libraries from dyld

2020-12-01 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Ideally we should iterate over the startup process and investigate the state of the `r_debug` structure. Once it gets initialized, set the software brakpoint to `r_brk` and keep track of the dynamic loading and unloading of libraries. The tricky part is to detect th

[Lldb-commits] [PATCH] D92187: [lldb] [FreeBSD] Fix establishing DT_NEEDED libraries from dyld

2020-12-01 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In D92187#2424109 , @emaste wrote: >> One thing that FreeBSD should do, is to upgrade to the protocol version 1 >> (stored in r_version), like Linux, NetBSD and OpenBSD. > > It looks like Linux has always used r_version=1 (sin

[Lldb-commits] [PATCH] D92187: [lldb] [FreeBSD] Fix establishing DT_NEEDED libraries from dyld

2020-11-30 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In D92187#2423018 , @emaste wrote: > I'm curious how gdb handles this, and asked @bsdjhb if he knows off hand. > > Is there a brief description of how this works on Linux and/or NetBSD? We are working on researching this, NetB

[Lldb-commits] [PATCH] D91847: [lldb] [debugserver] Add stN aliases for stmmN for compatibility

2020-11-23 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. I would mark stmmX as an alias to stX and keep stX as the default for all platforms. stmmX could be an alias for everybody for legacy reasons. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91847/new/ https://reviews.llvm.org/D91847

[Lldb-commits] [PATCH] D91007: [lldb] [Process/FreeBSDRemote] Fix handling user-generated SIGTRAP

2020-11-07 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. I propose to filter all user induced signals at once and check `& 0x1` and SI_USER. http://src.illumos.org/source/xref/freebsd-head/sys/sys/signal.h#406 This way we will avoid all future fallout and crashing the debugger on unknown signal. CHANGES SINCE LAST

[Lldb-commits] [PATCH] D90938: [lldb] [Process/FreeBSDRemote] Handle exec() from inferior

2020-11-06 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 wonder why NetBSD fails having the same event handling. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90938/new/ https://reviews.llvm.org/D90938 _

[Lldb-commits] [PATCH] D90757: [lldb] Enable FreeBSDRemote plugin by default and update test status

2020-11-06 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In D90757#2378404 , @theraven wrote: > Does the new plugin work with processes that are created with `pdfork`? The > last time I tried this, it caused the old plugin to lock up the debugger > entirely. Please can you ensure

[Lldb-commits] [PATCH] D90298: [lldb] [Process/FreeBSDRemote] Implement thread GetName()

2020-10-28 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/source/Plugins/Process/FreeBSDRemote/NativeThreadFreeBSD.cpp:151 -std::string NativeThreadFreeBSD::GetName() { return ""; } +std::string NativeThreadFreeBSD::GetName() { + if (!m_thread_name) { It is probabl

[Lldb-commits] [PATCH] D89874: [lldb] Unify x86 watchpoint implementation on Linux and NetBSD (and future FreeBSD plugin) [WIP]

2020-10-21 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp:580 - if (IsGPR(reg_index)) + if (IsGPROrDR(reg_index)) return WriteRegisterRaw(reg_index, reg_value); Can we have `IsGPR(reg_index) |

[Lldb-commits] [PATCH] D89193: [lldb] [Process/FreeBSDRemote] Support YMM reg via PT_*XSTATE

2020-10-13 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp:448-449 + +assert(info.xsave_mask & XFEATURE_ENABLED_X87); +assert(info.xsave_mask & XFEATURE_ENABLED_SSE); + emaste wrote: >

[Lldb-commits] [PATCH] D89182: [lldb] [Process/FreeBSDRemote] Kill process via PT_KILL

2020-10-12 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In D89182#2324267 , @labath wrote: > FWIW, PTHREAD_KILL is strongly discouraged on linux. But if the situation is > different on freebsd, then fine. I think you mean PTRACE_KILL. PT_KILL is fine for BSDs and in case when it i

[Lldb-commits] [PATCH] D89193: [lldb] [Process/FreeBSDRemote] Support YMM reg via PT_*XSTATE

2020-10-10 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a reviewer: bsdjhb. krytarowski added a subscriber: bsdjhb. krytarowski added a comment. + @bsdjhb John, could you have a look? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89193/new/ https://reviews.llvm.org/D89193 ___ lld

[Lldb-commits] [PATCH] D88796: [lldb] Initial version of FreeBSD remote process plugin

2020-10-05 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp:269-375 + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PLATFORM)); + LLDB_LOG(log, "target {0}", target); + + // If we're a remote host, use standard behavior from parent c

[Lldb-commits] [PATCH] D88796: [lldb] Initial version of FreeBSD remote process plugin

2020-10-04 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/source/Plugins/Process/FreeBSDRemote/NativeProcessFreeBSD.cpp:22 + +//#include "Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD.h" +#include "Plugins/Process/POSIX/ProcessPOSIXLog.h" mgorny wrote: >

[Lldb-commits] [PATCH] D88796: [lldb] Initial version of FreeBSD remote process plugin

2020-10-04 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/source/Plugins/Process/FreeBSDRemote/NativeProcessFreeBSD.cpp:22 + +//#include "Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD.h" +#include "Plugins/Process/POSIX/ProcessPOSIXLog.h" Why this line?

[Lldb-commits] [PATCH] D88681: [lldb] [Process/NetBSD] Fix reading FIP/FDP registers

2020-10-02 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp:954 case lldb_foseg_x86_64: -m_fpr.fxstate.fx_dp.fa_64 = reg_value.GetAsUInt64(); +m_fpr.fxstate.fx_dp.fa_32.fa_seg = reg_value.GetAsUInt64();

[Lldb-commits] [PATCH] D88682: [lldb] [Process/NetBSD] Fix crash on unsupported i386 regs

2020-10-02 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp:398 assert(false && "Unhandled i386 register."); -return 0; +return -1; } Use `llvm_unreachable` ? Same in other places where

[Lldb-commits] [PATCH] D85820: Use find_library for ncurses

2020-09-08 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Please note that ncurses is not the only supported curses library. NetBSD uses its original BSD curses for LLVM projects. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85820/new/ https://reviews.llvm.org/D85820 __

[Lldb-commits] [PATCH] D73067: [lldb/CMake] Auto-generate the Initialize and Terminate calls for plugin

2020-02-20 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Autogeneration of the code puts extra burden on us for tracking what is defined where and for repackaging LLDB with custom build rules (we need plain Makefile in the distribution). I presume the same problem is for gn users, for FreeBSD etc. The NetBSD buildbot is

[Lldb-commits] [PATCH] D73802: [lldb] Introduce i386 support in NetBSD Process plugin

2020-02-01 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/source/Plugins/Process/Utility/RegisterContextNetBSD_i386.cpp:62 + GPR gpr; + FPR_i386 i387; + uint32_t u_debugreg[8]; // Debug registers (DR0 - DR7). krytarowski wrote: > mgorny wrote: > > krytarowski wrote

[Lldb-commits] [PATCH] D73802: [lldb] Introduce i386 support in NetBSD Process plugin

2020-02-01 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/source/Plugins/Process/Utility/RegisterContextNetBSD_i386.cpp:62 + GPR gpr; + FPR_i386 i387; + uint32_t u_debugreg[8]; // Debug registers (DR0 - DR7). mgorny wrote: > krytarowski wrote: > > mgorny wrote: > >

[Lldb-commits] [PATCH] D73802: [lldb] Introduce i386 support in NetBSD Process plugin

2020-02-01 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/source/Plugins/Process/Utility/RegisterContextNetBSD_i386.cpp:62 + GPR gpr; + FPR_i386 i387; + uint32_t u_debugreg[8]; // Debug registers (DR0 - DR7). mgorny wrote: > krytarowski wrote: > > Please add `uint3

[Lldb-commits] [PATCH] D73802: [lldb] Introduce i386 support in NetBSD Process plugin

2020-01-31 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/source/Plugins/Process/Utility/RegisterContextNetBSD_i386.cpp:62 + GPR gpr; + FPR_i386 i387; + uint32_t u_debugreg[8]; // Debug registers (DR0 - DR7). Please add `uint32_t tlsbase;`. CHANGES SINCE LAST ACT

[Lldb-commits] [PATCH] D70025: [lldb] [Process/NetBSD] Fix handling concurrent watchpoint events

2019-11-25 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In D70025#1758800 , @labath wrote: > LGTM, since this seems to be the best we can do given the current netbsd > behavior. > > However, I'd like to repeat what I said on the IRC, that I consider this > behavior of netbsd to be

[Lldb-commits] [PATCH] D70022: [lldb] [Process/NetBSD] Improve threading support

2019-11-22 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_vContThreads.py:68-72 +"read packet: $vCont;C{0:x}:{1:x};C{0:x}:{2:x}#00".format( +lldbutil.get_signal_number('SIGUSR1'), +

[Lldb-commits] [PATCH] D70363: [lldb] [Process/NetBSD] Implement thread name getting

2019-11-18 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp:122 + if (::sysctl(mib, 5, nullptr, &size, nullptr, 0) == -1 || size == 0) { +LLDB_LOG(log, "sysctl() for LWP info size failed: {0}", strerror(errno)); +return ""; --

[Lldb-commits] [PATCH] D70363: [lldb] [Process/NetBSD] Implement thread name getting

2019-11-17 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp:22 +#include + Please include before this header ``. If it works, that header is likely pulled from some indirect location. CHANGES SINCE LAST ACTION

[Lldb-commits] [PATCH] D70335: [lldb] [test] Enable lldb-server tests on NetBSD, and set XFAILs

2019-11-16 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/TestGdbRemoteThreadName.py:33 @skipIfWindows # the test is not updated for Windows. +@skipIfNetBSD # build failure due to pthread_setname_np prototype @

[Lldb-commits] [PATCH] D70025: [lldb] [Process/NetBSD] Fix handling concurrent watchpoint events

2019-11-08 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp:334 thread->SetStoppedByTrace(); SetState(StateType::eStateStopped, true); I presume that in this code path we land into a scenario that: 1. Tra

[Lldb-commits] [PATCH] D70023: [lldb] [Process/NetBSD] Copy watchpoints to newly-created threads

2019-11-08 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. How does it deal with `security.models.extensions.user_set_dbregs`? If there is a handled error than it's fine. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70023/new/ https://reviews.llvm.org/D70023 ___ lldb-

[Lldb-commits] [PATCH] D70022: [lldb] [Process/NetBSD] Improve threading support

2019-11-08 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp:241 case TRAP_BRKPT: -for (const auto &thread : m_threads) { - static_cast(*thread).SetStoppedByBreakpoint(); - FixupBreakpointPCAsNeeded(static_cast(*thread

[Lldb-commits] [PATCH] D69320: [lldb] [Python] Do not attempt to flush() a read-only fd

2019-10-22 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Same here, I cannot commit. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69320/new/ https://reviews.llvm.org/D69320 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[Lldb-commits] [PATCH] D68856: convert SBDebugger::***FileHandle() wrappers to native files.

2019-10-22 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In D68856#1718096 , @lawrence_danna wrote: > now I'm stuck on this trying to install cmake. > > pkg_add: no pkg found for 'libunistring>=0.9.4', sorry. > pkg_add: Can't install dependency libunistring>=0.9.4 > pkg_add

[Lldb-commits] [PATCH] D68856: convert SBDebugger::***FileHandle() wrappers to native files.

2019-10-22 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. For the git part you will need to install mozilla-rootcerts and follow post-install instructions, as otherwise `https://` won't work nicely. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68856/new/ https://reviews.llvm

[Lldb-commits] [PATCH] D68856: convert SBDebugger::***FileHandle() wrappers to native files.

2019-10-22 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In D68856#1717683 , @lawrence_danna wrote: > @mgorny > > I can't get anything to work. I've tried running a local VM with > virtualbox but it's networking driver crashes my kernel. I've tried a local > VM with VMware bu

[Lldb-commits] [PATCH] D66566: [lldb] Replace std::once_flag with llvm::once_flag.

2019-09-03 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. This breaks NetBSD as it shall be paired with `llvm::call_once`. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66566/new/ https://reviews.llvm.org/D66566 ___ lldb-commits mailing list lldb

[Lldb-commits] [PATCH] D65555: [lldb] [Process/NetBSD] Enable reporting of new and exited threads [WIP]

2019-08-04 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp:104 + // TODO: PTRACE_FORK | PTRACE_VFORK | PTRACE_POSIX_SPAWN? + events.pe_set_event = PTRACE_LWP_CREATE | PTRACE_LWP_EXIT; + status = PtraceWrapper(PT_SET_EVENT_MASK, pi

[Lldb-commits] [PATCH] D64647: [lldb] [Process/NetBSD] Implement per-thread execution control

2019-07-13 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp:394 +siginfo.psi_siginfo.si_signo = signal; +siginfo.psi_siginfo.si_code = SI_NOINFO; +if (signaled_threads == m_threads.size()) // signal aimed at all threads --

[Lldb-commits] [PATCH] D64647: [lldb] [Process/NetBSD] Implement per-thread execution control

2019-07-13 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In D64647#1584340 , @mgorny wrote: > In D64647#1583429 , @krytarowski > wrote: > > > Something that we do not cover here is that once a tracee reports a signal > > (like someone poked

[Lldb-commits] [PATCH] D64647: [lldb] [Process/NetBSD] Implement per-thread execution control

2019-07-12 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Something that we do not cover here is that once a tracee reports a signal (like someone poked it with SIGUSR1) and we want to pass it over to the tracee, we will reset siginfo. This scenario should be covered by a test and we should handle it properly.. The soluti

[Lldb-commits] [PATCH] D64647: [lldb] [Process/NetBSD] Implement per-thread execution control

2019-07-12 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp:354 + if (signal != LLDB_INVALID_SIGNAL_NUMBER && signal != action->signal) +return Status("NetBSD does not support passing multiple signals simultaneously");

[Lldb-commits] [PATCH] D64647: [lldb] [Process/NetBSD] Implement per-thread execution control

2019-07-12 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. I think it looks OK. there are some nits that could be optimized in future or handled additionally.. but for now it should be fine. Repository: rLLDB LLDB CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64647/new/ https://reviews.llvm.org/D64647 ___

[Lldb-commits] [PATCH] D63792: [lldb] [Process/NetBSD] Use global enable bits for watchpoints

2019-07-01 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. I would follow the same kernel behavior here as Linux, but that can be done independently. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63792/new/ https://reviews.llvm.org/D63792 ___ lldb-commits mailing list

[Lldb-commits] [PATCH] D63791: [lldb] [Process/NetBSD] Fix segfault when handling watchpoint

2019-07-01 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski accepted this revision. krytarowski added inline comments. Comment at: lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp:250 +if (!thread) { + LLDB_LOG(log, + "thread not found in m_threads, pid = {0}, LWP = {1}", We sh

[Lldb-commits] [PATCH] D63545: [lldb] [Process/NetBSD] Support reading YMM registers via PT_*XSTATE [DO NOT MERGE]

2019-06-20 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp:239 + + if (byte_order == lldb::eByteOrderBig) { +::memcpy(m_xstate_x86_64.xs_fxsave.fx_xmm[reg_index].xmm_bytes, labath wrote: > mgorny

[Lldb-commits] [PATCH] D63380: [lldb] [test] Skip watchpoint tests on NetBSD if userdbregs is disabled

2019-06-17 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Herald added a subscriber: ormris. This check should contain additional check for uid==root. If we are root we can read and write to DB registers. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63380/new/ https://reviews.llvm.org/D6338

[Lldb-commits] [PATCH] D62502: Implement xfer:libraries-svr4:read packet

2019-06-13 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. I would leave the NetBSD version as it is in this patch and let us to fix/test it later. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62502/new/ https://reviews.llvm.org/D62502 _

[Lldb-commits] [PATCH] D62502: Implement xfer:libraries-svr4:read packet

2019-06-10 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. https://nxr.netbsd.org/xref/src/include/link_elf.h#9 In general this code should be close to functional on NetBSD (if not already compatible). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62502/new/ https://reviews.l

[Lldb-commits] [PATCH] D62499: Create a generic handler for Xfer packets

2019-05-29 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In D62499#1520654 , @labath wrote: > In D62499#1520610 , @krytarowski > wrote: > > > > One time just before it's loaded (so lldb can check which modules are > > > loaded) and another r

[Lldb-commits] [PATCH] D62499: Create a generic handler for Xfer packets

2019-05-29 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. > One time just before it's loaded (so lldb can check which modules are loaded) > and another right after it's loaded (so lldb can check again which ones are > loaded and calculate the difference). There is on NetBSD and on a selection of other OSs: `_rtld_debug_sta

[Lldb-commits] [PATCH] D61310: [lldb] [Process/NetBSD] Fix handling EOF in PT_IO when reading memory

2019-04-30 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski requested changes to this revision. krytarowski added a comment. This revision now requires changes to proceed. I think there is a bug thought in the code. 1. bytes_read should return the bytes transferred from the function, it returns the value from the previous iteration only 2. `b

[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] 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] 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] 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] 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] 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] 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] 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: 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] 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] 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] 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] 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] 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] 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] 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] 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] 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. 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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. 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

  1   2   3   4   >