[Lldb-commits] [PATCH] D88583: [lldb] [test/Register] Add partial read/write tests for x87 regs

2020-10-01 Thread Pavel Labath via Phabricator via lldb-commits
labath accepted this revision. labath added a comment. This revision is now accepted and ready to land. This is great. Thanks. Comment at: lldb/test/Shell/Register/x86-fp-read.test:7 +register read --all +# CHECK-DAG: fctrl = 0x037e +# CHECK-DAG: fstat = 0x88c1

[Lldb-commits] [PATCH] D87868: [RFC] When calling the process mmap try to call all found instead of just the first one

2020-10-01 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. In D87868#2304680 , @clayborg wrote: > That is possible, though how do we figure out the syscall enumeration for the > mmap syscall reliably for a given system? And if we are remote debugging? > Seems like we are signing up for ar

[Lldb-commits] [PATCH] D88266: Check that the "StructuredData Plugin weak pointer" is good before trying to turn it into a shared pointer

2020-10-01 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. Sounds like a job for a clang-tidy check. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88266/new/ https://reviews.llvm.org/D88266 ___ lldb-commits mailing list lldb-commits@lists

[Lldb-commits] [PATCH] D88583: [lldb] [test/Register] Add read/write tests for x87 regs

2020-10-01 Thread Michał Górny via Phabricator via lldb-commits
mgorny updated this revision to Diff 295500. mgorny retitled this revision from "[lldb] [test/Register] Add partial read/write tests for x87 regs" to "[lldb] [test/Register] Add read/write tests for x87 regs". mgorny edited the summary of this revision. mgorny added a comment. Done as requested

[Lldb-commits] [PATCH] D88583: [lldb] [test/Register] Add read/write tests for x87 regs

2020-10-01 Thread Michał Górny via Phabricator via lldb-commits
mgorny added a comment. I'd use some help improving the assembly, as explained below. Comment at: lldb/test/Shell/Register/Inputs/x86-fp-write.cpp:23 +"rex.w = 1\n\t" +"fxsave %2\n\t" +"fnstenv %1\n\t" Now, here's the problem. This works just fine w

[Lldb-commits] [PATCH] D88583: [lldb] [test/Register] Add read/write tests for x87 regs

2020-10-01 Thread Michał Górny via Phabricator via lldb-commits
mgorny added inline comments. Comment at: lldb/test/Shell/Register/Inputs/x86-fp-write.cpp:23 +"rex.w = 1\n\t" +"fxsave %2\n\t" +"fnstenv %1\n\t" mgorny wrote: > Now, here's the problem. This works just fine when built with clang but > segfaults when

[Lldb-commits] [PATCH] D88583: [lldb] [test/Register] Add read/write tests for x87 regs

2020-10-01 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/test/Shell/Register/x86-fp-read.test:27-28 +# CHECK: fdivs (%{{[er]}}bx) +print *(uint32_t*)($foseg * 0x1 + $fooff) +# CHECK: (uint32_t) $1 = 0 + zero is pretty common value. It would be better to check that

[Lldb-commits] [PATCH] D88583: [lldb] [test/Register] Add read/write tests for x87 regs

2020-10-01 Thread Michał Górny via Phabricator via lldb-commits
mgorny updated this revision to Diff 295534. mgorny added a comment. Fixed segfault when built with GCC and fixed my poor attempt to run FXSAVE with REX.W prefix. Now it correctly gets 64-bit FIP and FDP, though it's unclear whether the apparent truncation is a bug in LLDB writing it or some oth

Re: [Lldb-commits] [lldb] 1b1d981 - Revert "Revert "Add the ability to write target stop-hooks using the ScriptInterpreter.""

2020-10-01 Thread Pavel Labath via lldb-commits
On 30/09/2020 23:21, Jim Ingham wrote: > The test doesn’t seem to be flakey in the “run it a bunch of times and > it will eventually fail” type flakey.  I ran the test 200 times on my > machine and didn’t get a failure. Actually, it seems like exactly the typical kind of flaky test to me -- it mos

[Lldb-commits] [lldb] b272250 - [lldb] Skip the flakey part of TestStopHookScripted on Linux

2020-10-01 Thread Raphael Isemann via lldb-commits
Author: Raphael Isemann Date: 2020-10-01T14:24:38+02:00 New Revision: b272250221595b14c32db6721a0ae4e5f17ea4d2 URL: https://github.com/llvm/llvm-project/commit/b272250221595b14c32db6721a0ae4e5f17ea4d2 DIFF: https://github.com/llvm/llvm-project/commit/b272250221595b14c32db6721a0ae4e5f17ea4d2.dif

Re: [Lldb-commits] [lldb] 1b1d981 - Revert "Revert "Add the ability to write target stop-hooks using the ScriptInterpreter.""

2020-10-01 Thread Raphael “Teemperor” Isemann via lldb-commits
+1, I have two machines with very similar setup where only the one that is under heavy load sees the test failures. - Raphael > On 1 Oct 2020, at 14:24, Pavel Labath wrote: > > On 30/09/2020 23:21, Jim Ingham wrote: >> The test doesn’t seem to be flakey in the “run it a bunch of times and >> i

[Lldb-commits] [PATCH] D88583: [lldb] [test/Register] Add read/write tests for x87 regs

2020-10-01 Thread Michał Górny via Phabricator via lldb-commits
mgorny added inline comments. Comment at: lldb/test/Shell/Register/x86-fp-read.test:27-28 +# CHECK: fdivs (%{{[er]}}bx) +print *(uint32_t*)($foseg * 0x1 + $fooff) +# CHECK: (uint32_t) $1 = 0 + labath wrote: > zero is pretty common value. It would be bette

[Lldb-commits] [PATCH] D88583: [lldb] [test/Register] Add read/write tests for x87 regs

2020-10-01 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. In D88583#2305815 , @mgorny wrote: > Fixed segfault when built with GCC and fixed my poor attempt to run FXSAVE > with REX.W prefix. Now it correctly gets 64-bit FIP and FDP, though it's > unclear whether the apparent truncation i

[Lldb-commits] [lldb] cccb7cf - [lldb] Add missing import for LLDB test decorators to TestStopHookScripted

2020-10-01 Thread Raphael Isemann via lldb-commits
Author: Raphael Isemann Date: 2020-10-01T14:33:13+02:00 New Revision: cccb7cf1a52f38182f56d947bd609027726c778b URL: https://github.com/llvm/llvm-project/commit/cccb7cf1a52f38182f56d947bd609027726c778b DIFF: https://github.com/llvm/llvm-project/commit/cccb7cf1a52f38182f56d947bd609027726c778b.dif

[Lldb-commits] [PATCH] D88583: [lldb] [test/Register] Add read/write tests for x87 regs

2020-10-01 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/test/Shell/Register/x86-fp-read.test:27-28 +# CHECK: fdivs (%{{[er]}}bx) +print *(uint32_t*)($foseg * 0x1 + $fooff) +# CHECK: (uint32_t) $1 = 0 + mgorny wrote: > labath wrote: > > zero is pretty common value.

[Lldb-commits] [PATCH] D88583: [lldb] [test/Register] Add read/write tests for x87 regs

2020-10-01 Thread Michał Górny via Phabricator via lldb-commits
mgorny updated this revision to Diff 295539. mgorny added a comment. Update fp-read tests to verify FIP/FDP addresses, as suggested by Pavel. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88583/new/ https://reviews.llvm.org/D88583 Files: lldb/test/Shell/Register/Inputs/x86-fp-read.cp

[Lldb-commits] [PATCH] D88583: [lldb] [test/Register] Add read/write tests for x87 regs

2020-10-01 Thread Pavel Labath via Phabricator via lldb-commits
labath accepted this revision. labath added a comment. cool CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88583/new/ https://reviews.llvm.org/D88583 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

Re: [Lldb-commits] [lldb] 92e1ebe - [trace] Fix destructor declaration

2020-10-01 Thread Pavel Labath via lldb-commits
On 30/09/2020 20:25, Walter Erquinigo wrote: > But what about the case Vedant mentioned? > >>Otherwise, when a std::shared_ptr is destroyed, the destructor for >> the derived TraceIntelPT instance won't run. > > Or is C++ smart enough to pick the destructor from TraceIntelPT class in this >

[Lldb-commits] [PATCH] D88583: [lldb] [test/Register] Add read/write tests for x87 regs

2020-10-01 Thread Michał Górny via Phabricator via lldb-commits
mgorny updated this revision to Diff 295552. mgorny added a comment. Use safer values for `fiseg` and `foseg`, to avoid truncation. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88583/new/ https://reviews.llvm.org/D88583 Files: lldb/test/Shell/Register/Inputs/x86-fp-read.cpp lldb/t

[Lldb-commits] [PATCH] D85705: Add a "Trace" plug-in to LLDB to add process trace support in stages.

2020-10-01 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. I have two high-level remarks/questions about this: - I am surprised that it was not necessary to create a special process plugin for this purpose. I have a feeling one will be necessary sooner or later because of the need to customize the step/continue/etc. flows. Curre

[Lldb-commits] [PATCH] D88632: A handful of fixes to lldb's "scan the local filesystem for kexts & kernels" feature

2020-10-01 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added a comment. I don't know much about this code so I've left some inline nits. Comment at: lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp:505 + bool is_kernel_filename = + file_spec.GetFilename().GetStringRef().startswith("kernel") || +

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

2020-10-01 Thread Michał Górny via Phabricator via lldb-commits
mgorny created this revision. mgorny added reviewers: krytarowski, labath. mgorny requested review of this revision. Fix reading FIP/FDP registers to correctly return segment and offset parts. On amd64, this roughly matches the Linux behavior of splitting the 64-bit FIP/FDP into two halves, and p

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

2020-10-01 Thread Michał Górny via Phabricator via lldb-commits
mgorny created this revision. mgorny added reviewers: krytarowski, labath. mgorny requested review of this revision. Fix crash due to overeager assert on translating 32-bit to 64-bit register constants. Instead, just return an invalid register index and let it be ignored just like native requests

[Lldb-commits] [PATCH] D88583: [lldb] [test/Register] Add read/write tests for x87 regs

2020-10-01 Thread Michał Górny via Phabricator via lldb-commits
mgorny added a reviewer: teemperor. mgorny added a subscriber: teemperor. mgorny added a comment. @teemperor would you perhaps be interested in testing this on macos before I commit it? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88583/new/ https://reviews.llvm.org/D88583 __

Re: [Lldb-commits] [PATCH] D85705: Add a "Trace" plug-in to LLDB to add process trace support in stages.

2020-10-01 Thread Walter via lldb-commits
> - I am surprised that it was not necessary to create a special process plugin for this purpose. I have a feeling one will be necessary sooner or later because of the need to customize the step/continue/etc. flows. Currently, this will probably produce very bizarre if one tries to execute those co

[Lldb-commits] [PATCH] D85705: Add a "Trace" plug-in to LLDB to add process trace support in stages.

2020-10-01 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. In D85705#2305994 , @labath wrote: > I have two high-level remarks/questions about this: > > - I am surprised that it was not necessary to create a special process plugin > for this purpose. I have a feeling one will be necessary

[Lldb-commits] [PATCH] D87868: [RFC] When calling the process mmap try to call all found instead of just the first one

2020-10-01 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. In D87868#2305345 , @labath wrote: > In D87868#2304680 , @clayborg wrote: > >> That is possible, though how do we figure out the syscall enumeration for >> the mmap syscall reliably for a

[Lldb-commits] [PATCH] D86670: [intel-pt] Add a basic implementation of the dump command

2020-10-01 Thread walter erquinigo via Phabricator via lldb-commits
wallace marked 21 inline comments as done. wallace added inline comments. Comment at: lldb/include/lldb/Target/Target.h:32 #include "lldb/Target/ThreadSpec.h" +#include "lldb/Target/Trace.h" #include "lldb/Utility/ArchSpec.h" clayborg wrote: > You don't need th

[Lldb-commits] [PATCH] D86670: [intel-pt] Add a basic implementation of the dump command

2020-10-01 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 295655. wallace added a comment. comments addressed Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86670/new/ https://reviews.llvm.org/D86670 Files: lldb/include/lldb/Target/Target.h lldb/include/lldb/Targe

[Lldb-commits] [PATCH] D86670: [intel-pt] Add a basic implementation of the dump command

2020-10-01 Thread walter erquinigo via Phabricator via lldb-commits
wallace updated this revision to Diff 295656. wallace added a comment. format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86670/new/ https://reviews.llvm.org/D86670 Files: lldb/include/lldb/Target/Target.h lldb/include/lldb/Target/Trace.h

[Lldb-commits] [PATCH] D86670: [intel-pt] Add a basic implementation of the dump command

2020-10-01 Thread Greg Clayton via Phabricator via lldb-commits
clayborg accepted this revision. clayborg added a comment. This revision is now accepted and ready to land. Just one nit about forward declaring the TraceDumpOptions. Comment at: lldb/include/lldb/Target/Target.h:32 #include "lldb/Target/ThreadSpec.h" +#include "lldb/Target/Tr

Re: [Lldb-commits] [lldb] 1b1d981 - Revert "Revert "Add the ability to write target stop-hooks using the ScriptInterpreter.""

2020-10-01 Thread Jim Ingham via lldb-commits
Thanks for the info… We’re running in sync mode, so for Continue to return before the process is all the way stopped, Process::ResumeSynchronous() must be bobbling the case where a stop event that resumes the process comes in. The only way I can see that happening is if Process::PrivateResume

[Lldb-commits] [PATCH] D86670: [intel-pt] Add a basic implementation of the dump command

2020-10-01 Thread Greg Clayton via Phabricator via lldb-commits
clayborg requested changes to this revision. clayborg added a comment. This revision now requires changes to proceed. Some active discussion on the Trace RFC right now that might change the outcome of this patch. Holding off accepting until we resolve. Repository: rG LLVM Github Monorepo CHA

[Lldb-commits] [lldb] 15ea45f - [lldb] Skip unique_ptr import-std-module tests on Linux

2020-10-01 Thread Raphael Isemann via lldb-commits
Author: Raphael Isemann Date: 2020-10-01T23:04:36+02:00 New Revision: 15ea45f16b261521e3251b4ff0bceaadf31a4515 URL: https://github.com/llvm/llvm-project/commit/15ea45f16b261521e3251b4ff0bceaadf31a4515 DIFF: https://github.com/llvm/llvm-project/commit/15ea45f16b261521e3251b4ff0bceaadf31a4515.dif

[Lldb-commits] [PATCH] D88704: [lldb] Fix bug in fallback logic for finding the resource directory.

2020-10-01 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere created this revision. JDevlieghere added a reviewer: teemperor. JDevlieghere requested review of this revision. Both of the if-clauses modify the `raw_path` variable and the `SharedFrameworks` variant wasn't properly resetting the variable. Avoid future bugs like that by always res

[Lldb-commits] [PATCH] D88516: [lldb] Add a "design" section to the documentation.

2020-10-01 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl added a comment. What's the difference between design/ and architecture/? These sounds like synonyms to me. Repository: rLLDB LLDB CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88516/new/ https://reviews.llvm.org/D88516 ___ lldb-c

[Lldb-commits] [PATCH] D88516: [lldb] Add a "design" section to the documentation.

2020-10-01 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added a comment. In D88516#2307486 , @aprantl wrote: > What's the difference between design/ and architecture/? These sounds like > synonyms to me. Good point, that page should be moved under the new section as well. Maybe we should call th

[Lldb-commits] [PATCH] D88516: [lldb] Add a "design" section to the documentation.

2020-10-01 Thread Jim Ingham via Phabricator via lldb-commits
jingham accepted this revision. jingham added a comment. This revision is now accepted and ready to land. LGTM Repository: rLLDB LLDB CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88516/new/ https://reviews.llvm.org/D88516 ___ lldb-commits

[Lldb-commits] [PATCH] D88516: [lldb] Add a "design" section to the documentation.

2020-10-01 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment. Ah, Adrian is right, you should probably move Architecture to Design. Repository: rLLDB LLDB CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88516/new/ https://reviews.llvm.org/D88516 ___ lldb-commits mailing list ll

[Lldb-commits] [PATCH] D88516: [lldb] Add a "design" section to the documentation.

2020-10-01 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment. I like the name Design better than Architecture for the top level. For instance the structureddataplugins is not really Architecture, it's the design of a fairly small component of lldb Repository: rLLDB LLDB CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88

Re: [Lldb-commits] [PATCH] D88516: [lldb] Add a "design" section to the documentation.

2020-10-01 Thread Jim Ingham via lldb-commits
Architecture is more specific to the structural aspect of a thing, whereas Design is more general. For instance, the rules for the SB API don’t really seem like a description of an Architecture, but more some general principles for doing the thing. Jim > On Oct 1, 2020, at 4:25 PM, Adrian Pra

[Lldb-commits] [PATCH] D88632: A handful of fixes to lldb's "scan the local filesystem for kexts & kernels" feature

2020-10-01 Thread Jason Molenda via Phabricator via lldb-commits
jasonmolenda updated this revision to Diff 295713. jasonmolenda added a comment. Incorporate Jonas' suggestions, including changing the NULLs to nullptr's in the section of code I was changing right now. Also found an unintentional shadowing of module_sp in GetSharedModuleKernel (that was prese

[Lldb-commits] [lldb] a1e9792 - Have kernel binary scanner load dSYMs as binary+dSYM if best thing found

2020-10-01 Thread Jason Molenda via lldb-commits
Author: Jason Molenda Date: 2020-10-01T18:55:37-07:00 New Revision: a1e97923a025d09934b557ca4343d8e4b5a9973d URL: https://github.com/llvm/llvm-project/commit/a1e97923a025d09934b557ca4343d8e4b5a9973d DIFF: https://github.com/llvm/llvm-project/commit/a1e97923a025d09934b557ca4343d8e4b5a9973d.diff

[Lldb-commits] [PATCH] D88632: A handful of fixes to lldb's "scan the local filesystem for kexts & kernels" feature

2020-10-01 Thread Jason Molenda via Phabricator via lldb-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGa1e97923a025: Have kernel binary scanner load dSYMs as binary+dSYM