[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#660703, @mehdi_amini wrote: > In https://reviews.llvm.org/D29288#660677, @krytarowski wrote: > > > In https://reviews.llvm.org/D29288#660636, @clayborg wrote: > > > > > Be very careful when using this, you can't change member variabl

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

2017-01-31 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Diff diff -u source/Plugins/Platform/Linux/PlatformLinux.cpp source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp Mostly everything is the same for now. --- source/Plugins/Platform/Linux/PlatformLinux.cpp 2016-12-19 17:48:18.156356172 +0100 +++ source/Plugins/P

[Lldb-commits] [PATCH] D29347: Add ProcessLauncherNetBSD to spawn a tracee

2017-01-31 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski created this revision. krytarowski added a project: LLDB. Herald added a subscriber: mgorny. Base this code on Linux. Sponsored by Repository: rL LLVM https://reviews.llvm.org/D29347 Files: include/lldb/Host/netbsd/ProcessLauncherNetBSD.h source/Host/CMakeLists.txt source

[Lldb-commits] [PATCH] D29347: Add ProcessLauncherNetBSD to spawn a tracee

2017-01-31 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. This patch was already open in a discussion with @labath, I'm pushing it here to point the appropriate solution during review. Repository: rL LLVM https://reviews.llvm.org/D29347 ___ lldb-commits mailing list lldb-co

[Lldb-commits] [PATCH] D29347: Add ProcessLauncherNetBSD to spawn a tracee

2017-01-31 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In https://reviews.llvm.org/D29347#662145, @labath wrote: > This is also copying a lot of code only to make tiny changes to it. Please > put the Linux process launcher into the posix folder (I suggest naming it > ProcessLauncherPosixFork). Ifdef out the linux-specif

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

2017-01-31 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. @ki.stfu do you still agree with this patch? Repository: rL LLVM https://reviews.llvm.org/D29256 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

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

2017-01-31 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In https://reviews.llvm.org/D29266#661839, @labath wrote: > After looking at this closer, I don't think we will even need a separate > class to achieve deduplication. The code is so heavily duplicated (see > comments on the first three non-boilerplate functions, I d

[Lldb-commits] [PATCH] D29347: Add ProcessLauncherNetBSD to spawn a tracee

2017-01-31 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski updated this revision to Diff 86524. krytarowski added a comment. Herald added subscribers: srhines, danalbert. Transform ProcessLauncherLinux to ProcessLauncherPosixFork and attach to Linux and NetBSD. Repository: rL LLVM https://reviews.llvm.org/D29347 Files: include/lldb/Ho

[Lldb-commits] [PATCH] D29347: Transform ProcessLauncherLinux to ProcessLauncherPosixFork

2017-01-31 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski updated this revision to Diff 86536. krytarowski added a comment. Fix typo. Repository: rL LLVM https://reviews.llvm.org/D29347 Files: include/lldb/Host/linux/ProcessLauncherLinux.h include/lldb/Host/posix/ProcessLauncherPosixFork.h source/Host/CMakeLists.txt source/Host/

[Lldb-commits] [PATCH] D29347: Transform ProcessLauncherLinux to ProcessLauncherPosixFork

2017-01-31 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski updated this revision to Diff 86546. krytarowski added a comment. virtual -> override Repository: rL LLVM https://reviews.llvm.org/D29347 Files: include/lldb/Host/linux/ProcessLauncherLinux.h include/lldb/Host/posix/ProcessLauncherPosixFork.h source/Host/CMakeLists.txt so

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

2017-02-01 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski updated this revision to Diff 86644. krytarowski edited the summary of this revision. krytarowski added a comment. Replace SetErrorDescriptionn(errMsg); with SetErrorDescription(errMsg); Repository: rL LLVM https://reviews.llvm.org/D29256 Files: tools/lldb-mi/MICmnBase.cpp to

[Lldb-commits] [PATCH] D29403: Fix multi-process-driver.cpp build on NetBSD

2017-02-01 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski created this revision. krytarowski added a project: LLDB. Include for strcmp(3) and memset(3). Sponsored by Repository: rL LLVM https://reviews.llvm.org/D29403 Files: packages/Python/lldbsuite/test/api/multiple-debuggers/multi-process-driver.cpp Index: packages/Python/lld

[Lldb-commits] [PATCH] D29405: Install six.py copy into subdirectory lldb

2017-02-01 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski created this revision. krytarowski added a project: LLDB. The current version of LLDB installs six.py into global python library directory. This approach produces conflicts downstream with distribution's py-six copy. Install six.py into subdirectory as this is a common way of handli

[Lldb-commits] [PATCH] D29405: Install six.py copy into subdirectory lldb

2017-02-01 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Please help to test this patch for regressions, at the moment I don't have all the test suits passing and I might have miss something. At least `scripts/Python/modify-python-lldb.py` had to retain 'import six'. Repository: rL LLVM https://reviews.llvm.org/D29405

[Lldb-commits] [PATCH] D29405: Install six.py copy into subdirectory lldb

2017-02-01 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In https://reviews.llvm.org/D29405#663566, @labath wrote: > It does not seem to work for me. I get this when I run ninja check-lldb in > the build directory: > > Traceback (most recent call last): > File "/usr/local/google/home/labath/ll/llvm/tools/lldb/test/do

[Lldb-commits] [PATCH] D29406: Unify PlatformPOSIX::ResolveExecutable

2017-02-01 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. It looks good. https://reviews.llvm.org/D29406 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D29405: Install six.py copy into subdirectory lldb

2017-02-02 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski updated this revision to Diff 86828. krytarowski added a comment. LLDB_USE_SYSTEM_SIX approach Repository: rL LLVM https://reviews.llvm.org/D29405 Files: cmake/modules/LLDBConfig.cmake scripts/CMakeLists.txt scripts/Python/finishSwigPythonLLDB.py Index: scripts/Python/fin

[Lldb-commits] [PATCH] D29405: Install six.py conditionally

2017-02-02 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. @labath patch done. I'm specifying `-DLLDB_USE_SYSTEM_SIX:BOOL=TRUE` in pkgsrc. It works for me. Repository: rL LLVM https://reviews.llvm.org/D29405 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://l

[Lldb-commits] [PATCH] D29405: Install six.py conditionally

2017-02-02 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In https://reviews.llvm.org/D29405#664957, @labath wrote: > Unfortunately, this prevents six.py being copied into the build directory, so > a non-installed lldb will still not work (if you don't have the system > six.py). > > It looks like you will have to pass this

[Lldb-commits] [PATCH] D29405: Install six.py conditionally

2017-02-02 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. I will try to reverse engineer it.. Repository: rL LLVM https://reviews.llvm.org/D29405 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

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

2017-02-02 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. I need to finish three patches: - llvm::call_once, - auxv reading, - six.py conflict removal and I will join here. After that, I will switch the PT_WATCHPOINT* interface to PT_GETDBREGS and PT_SETDBREGS -- and in the end, add dbregs support in NetBSD's userdata. La

[Lldb-commits] [PATCH] D29496: Push down more common code into PlatformPOSIX

2017-02-03 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski accepted this revision. krytarowski added a comment. Thank you for this patch. https://reviews.llvm.org/D29496 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D29405: Install six.py conditionally

2017-02-03 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski updated this revision to Diff 87000. krytarowski edited the summary of this revision. krytarowski added a comment. Pass option to `--useSystemSix` to `finishSwigWrapperClasses.py` Repository: rL LLVM https://reviews.llvm.org/D29405 Files: CMakeLists.txt cmake/modules/LLDBConf

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

2017-02-04 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski updated this revision to Diff 87102. krytarowski added a comment. Sync this patch with SVN 294071. It is to be used at least for a reference in further code sharing. Repository: rL LLVM https://reviews.llvm.org/D29266 Files: source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp

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

2017-02-04 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski updated this revision to Diff 87109. krytarowski added a comment. Revamp patch after recent changes in LLVM. Repository: rL LLVM https://reviews.llvm.org/D29288 Files: include/lldb/Core/Debugger.h source/Commands/CommandObjectPlatform.cpp source/Core/Debugger.cpp source/C

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

2017-02-04 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski updated this revision to Diff 87120. krytarowski added a comment. Typo. Repository: rL LLVM https://reviews.llvm.org/D29288 Files: include/lldb/Core/Debugger.h source/Commands/CommandObjectPlatform.cpp source/Core/Debugger.cpp source/Core/ModuleList.cpp source/Host/comm

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

2017-02-04 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Related https://reviews.llvm.org/D29552 I'm requesting help to test this patch on !NetBSD with and without `LLVM_THREADING_USE_STD_CALL_ONCE` defined in `"llvm/Support/Threading.h"`. This issue is blocking me from adding functional changes for the NetBSD port. Rep

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

2017-02-04 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. I'm syncing the code to get the changes from SVN revision 294114 "Clean up PlatformLinux code" Repository: rL LLVM https://reviews.llvm.org/D29266 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://list

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

2017-02-04 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski updated this revision to Diff 87126. krytarowski added a comment. Catch up after r294114 - Clean up PlatformLinux code Repository: rL LLVM https://reviews.llvm.org/D29266 Files: source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp source/Plugins/Platform/NetBSD/PlatformNetBSD.h

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

2017-02-04 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. OK to land it? FreeBSD can reuse almost exact the same code. I'm not sure if it's compatible with their Process Plugin. Repository: rL LLVM https://reviews.llvm.org/D29266 ___ lldb-commits mailing list lldb-commits@l

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

2017-02-04 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: include/lldb/Core/Debugger.h:379 lldb::ListenerSP m_forward_listener_sp; - std::once_flag m_clear_once; + llvm::once_flag m_clear_once; labath wrote: > The code in llvm says you should only ever use the LLVM_D

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

2017-02-04 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. I've tried to build the LLDB code with mechanically * replaced `std::call_once` -> `llvm::call_once` and `std::once_flag` -> `llvm::once_flag`: --- /public/llvm/include/llvm/Support/Threading.h 2017-02-05 00:15:00.769574623 +0100 +++ /usr/pkg/include/llvm/Su

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

2017-02-04 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Test results for the above patch for LLVM and LLDB with "mechanical" switch to `llvm::call_once`. === Test Result Summary === Test Methods: 1224 Reruns:1 Success: 268 Expected Failure:

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

2017-02-04 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Once someone could explain to me why `SymbolFileDWARF::GetCachedSectionData` cannot be switched mechanically to `llvm::call_once`, I would like to propose this revamped interface to llvm. Repository: rL LLVM https://reviews.llvm.org/D29288 ___

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

2017-02-05 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. https://reviews.llvm.org/D29566 I filed a patch in LLVM. Repository: rL LLVM https://reviews.llvm.org/D29288 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lld

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

2017-02-05 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski updated this revision to Diff 87153. krytarowski added a comment. Revamp to new llvm::once_flag Repository: rL LLVM https://reviews.llvm.org/D29288 Files: include/lldb/Core/Debugger.h source/Commands/CommandObjectPlatform.cpp source/Core/Debugger.cpp source/Core/ModuleLis

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

2017-02-06 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: include/lldb/Core/Debugger.h:379 lldb::ListenerSP m_forward_listener_sp; - std::once_flag m_clear_once; + llvm::once_flag m_clear_once; clayborg wrote: > Is there a valid default initializer for the llvm::once

[Lldb-commits] [PATCH] D29909: Break some more dependencies in lldbUtility

2017-02-13 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In https://reviews.llvm.org/D29909#675621, @zturner wrote: > `git log --follow` seems to understand. Is that sufficient to guarantee that > it will be retained on the SVN side? On SVN there is need to explicitly rename files to retain history. (`svn mv old new` o

[Lldb-commits] [PATCH] D27126: Merge Linux and FreeBSD arm register contexts

2017-02-20 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. This diff looks good and appreciated for other posix-like systems. https://reviews.llvm.org/D27126 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D30234: Reformat inferior's main.cpp in lldb-server test

2017-02-22 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: packages/Python/lldbsuite/test/tools/lldb-server/main.cpp:74 + printf("%" PRIx64, static_cast(syscall(__NR_gettid))); #else + printf("{no-tid-support}"); Note to self - ``` #elif defined(__NetBSD__) printf("%" PR

[Lldb-commits] [PATCH] D30250: Switch "posix" to the new log channel registration mechanism

2017-02-22 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 had locally code registering NetBSD specific log channel and this patch is removing this needless code. Thank you for this work! https://reviews.llvm.org/D30250 ___

[Lldb-commits] [PATCH] D30287: Introduce support for Debug Registers RegisterContextNetBSD_x86_64

2017-02-23 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski created this revision. krytarowski added a project: LLDB. NetBSD 7.99.62 introduced Debug Registers interface similar to the FreeBSD one. This interface will land NetBSD-8.0. Introduce support for this interface in Register Context NetBSD x86_64 unconditionally as older versions of N

[Lldb-commits] [PATCH] D30288: Switch NetBSD from paccept(2) to accept4(2)

2017-02-23 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski created this revision. krytarowski added a project: LLDB. NetBSD 8.0 will ship with accept4(2) in libc wrapping paccept(2). This change reduces needless difference with other platforms. Older versions of NetBSD will not be supported. No functional change. Sponsored by Repository

[Lldb-commits] [PATCH] D30287: Introduce support for Debug Registers in RegisterContextNetBSD_x86_64

2017-02-23 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Plugins/Process/Utility/RegisterContextNetBSD_x86_64.cpp:51-56 + uint64_t dr[16]; /* debug registers */ + /* Index 0-3: debug address registers */ + /* Index 4-5: reserved */ +

[Lldb-commits] [PATCH] D30287: Introduce support for Debug Registers in RegisterContextNetBSD_x86_64

2017-02-23 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski updated this revision to Diff 89589. krytarowski added a comment. - remove unused function `GetSharedRegisterInfoVector` - fix `DR_OFFSET` Repository: rL LLVM https://reviews.llvm.org/D30287 Files: source/Plugins/Process/Utility/RegisterContextNetBSD_x86_64.cpp Index: source/P

[Lldb-commits] [PATCH] D30374: Support NetBSD Thread ID in lldb-server

2017-02-24 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski created this revision. krytarowski added a project: LLDB. Native Thread ID is retrieved with _lwp_self() on NetBSD. The returned value is of type int32_t, but for consistency with other Operating Systems cast it to uint64_t. Sponsored by Repository: rL LLVM https://reviews.llv

[Lldb-commits] [PATCH] D30942: Remove some ProcFileReader occurences

2017-03-15 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. For your interest. NetBSD will not use procfs for any operation. Today I implemented reading the process map with sysctl(7): https://github.com/NetBSD/pkgsrc-wip/commit/d4af36204feb616dd83f5f3ffb871a4b7274e5e0 procfs is used by SunOS.. but for regular debuggers they

[Lldb-commits] [PATCH] D30981: Remove HostThreadLinux/Free/NetBSD

2017-03-15 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. > remove the NetBSD version (which was probably incorrect anyway, as it assumes > the current process instead of the inferior. Yes, I had issues with this and I wanted to take rid of it completely during the last month. I'm patching it out in my local LLDB tree... (

[Lldb-commits] [PATCH] D30981: Remove HostThreadLinux/Free/NetBSD

2017-03-15 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: source/Plugins/Process/FreeBSD/FreeBSDThread.cpp:128 + if (kp == nullptr || (error != 0 && errno == ENOMEM)) { +// Add extra space in case threads are added before next call. +len += sizeof(*kp) + len / 10; -

[Lldb-commits] [PATCH] D30981: Remove HostThreadLinux/Free/NetBSD

2017-03-16 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. Thank you for your explanation. I will use approach similar to FreeBSD on NetBSD. I agree that leaving the FreeBSD code is best for the maintainers - it's good enough. https://rev

[Lldb-commits] [PATCH] D31031: Move GetAuxvData from Host to relevant process plugins

2017-03-16 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Thank you for this. https://reviews.llvm.org/D31031 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D30981: Remove HostThreadLinux/Free/NetBSD

2017-03-16 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: packages/Python/lldbsuite/test/tools/lldb-server/thread-name/main.cpp:6 +#if defined(__linux__) || defined(__NetBSD__) + ::pthread_setname_np(::pthread_self(), name); +#elif defined(__FreeBSD__) I overlooked it. `

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

<    1   2   3   4   >