[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] 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] 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] 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] 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] 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] 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] 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-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] 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] 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] 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] 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] 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] 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] 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] 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] 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-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). krytarowski wrote: > mgorny wrote: > > krytarowski wrote

<    1   2   3   4