[Lldb-commits] [PATCH] D91248: [lldb] [Process/FreeBSDRemote] Access FPR via RegisterInfo offsets

2020-11-13 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp:563-569 ::memcpy(m_gpr.data() + reg_info->byte_offset, reg_value.GetBytes(), reg_value.GetByteSize()); return

[Lldb-commits] [PATCH] D91216: [lldb] [Process/FreeBSDRemote] Access GPR via reginfo offsets

2020-11-13 Thread Michał Górny via Phabricator via lldb-commits
mgorny updated this revision to Diff 305086. mgorny added a comment. Implemented requested changes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91216/new/ https://reviews.llvm.org/D91216 Files: lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp

[Lldb-commits] [PATCH] D91268: [lldb] [Process/FreeBSDRemote] Access debug registers via offsets

2020-11-13 Thread Michał Górny via Phabricator via lldb-commits
mgorny updated this revision to Diff 305089. mgorny added a comment. Rebased. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91268/new/ https://reviews.llvm.org/D91268 Files: lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp

[Lldb-commits] [PATCH] D91248: [lldb] [Process/FreeBSDRemote] Access FPR via RegisterInfo offsets

2020-11-13 Thread Michał Górny via Phabricator via lldb-commits
mgorny updated this revision to Diff 305087. mgorny added a comment. Rebased. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91248/new/ https://reviews.llvm.org/D91248 Files: lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp

[Lldb-commits] [PATCH] D91293: [lldb] [Process/FreeBSDRemote] Modernize and simplify YMM logic

2020-11-13 Thread Michał Górny via Phabricator via lldb-commits
mgorny updated this revision to Diff 305090. mgorny added a comment. Split LLDB-visible regsets into separate AVX and MPX. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91293/new/ https://reviews.llvm.org/D91293 Files:

[Lldb-commits] [PATCH] D91411: [lldb] [Process/FreeBSDRemote] Optimize regset pointer logic

2020-11-13 Thread Michał Górny via Phabricator via lldb-commits
mgorny created this revision. mgorny added reviewers: labath, emaste, krytarowski. mgorny requested review of this revision. Create a helper GetOffsetRegSetData() method to get pointer to the regset data accounting for the necessary offset. Establish the offsets in the constructor and store them

[Lldb-commits] [PATCH] D91216: [lldb] [Process/FreeBSDRemote] Access GPR via reginfo offsets

2020-11-13 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/unittests/Process/Utility/RegisterContextFreeBSDTests.cpp:32 + +#define ASSERT_GPR_X86_64(regname) \ + EXPECT_THAT( \

[Lldb-commits] [PATCH] D91293: [lldb] [Process/FreeBSDRemote] Modernize and simplify YMM logic

2020-11-13 Thread Pavel Labath via Phabricator via lldb-commits
labath accepted this revision. labath added inline comments. Comment at: lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp:615 + if (offset == LLDB_INVALID_XSAVE_OFFSET) +return false; + mgorny wrote: > labath wrote: > >

[Lldb-commits] [PATCH] D91248: [lldb] [Process/FreeBSDRemote] Access FPR via RegisterInfo offsets

2020-11-13 Thread Michał Górny via Phabricator via lldb-commits
mgorny added inline comments. Comment at: lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp:563-569 ::memcpy(m_gpr.data() + reg_info->byte_offset, reg_value.GetBytes(), reg_value.GetByteSize()); return

[Lldb-commits] [lldb] dc848a0 - [lldb][NFC] Fix flaky TestForwardDeclFromStdModule test

2020-11-13 Thread Raphael Isemann via lldb-commits
Author: Raphael Isemann Date: 2020-11-13T11:40:51+01:00 New Revision: dc848a0888f0a14c03ff1e7dd7ab109db7a8c065 URL: https://github.com/llvm/llvm-project/commit/dc848a0888f0a14c03ff1e7dd7ab109db7a8c065 DIFF:

[Lldb-commits] [PATCH] D91216: [lldb] [Process/FreeBSDRemote] Access GPR via reginfo offsets

2020-11-13 Thread Pavel Labath via Phabricator via lldb-commits
labath accepted this revision. labath added inline comments. This revision is now accepted and ready to land. Comment at: lldb/unittests/Process/FreeBSD/RegisterContextFreeBSDTests.cpp:26-31 +#define ASSERT_REG(regname, offset, size) \ + {

[Lldb-commits] [PATCH] D91248: [lldb] [Process/FreeBSDRemote] Access FPR via RegisterInfo offsets

2020-11-13 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp:563-569 ::memcpy(m_gpr.data() + reg_info->byte_offset, reg_value.GetBytes(), reg_value.GetByteSize()); return

[Lldb-commits] [lldb] 5a4b2e1 - The AssertRecognizer used the module from a frames SC without checking it was non-null.

2020-11-13 Thread Jim Ingham via lldb-commits
Author: Jim Ingham Date: 2020-11-13T11:41:32-08:00 New Revision: 5a4b2e1541f399c146a4ef5cf8f6aaf8b258a77b URL: https://github.com/llvm/llvm-project/commit/5a4b2e1541f399c146a4ef5cf8f6aaf8b258a77b DIFF: https://github.com/llvm/llvm-project/commit/5a4b2e1541f399c146a4ef5cf8f6aaf8b258a77b.diff

[Lldb-commits] [lldb] e5a82b4 - [lldb] Fix SymbolFile/PDB/udt-layout.test

2020-11-13 Thread Jonas Devlieghere via lldb-commits
Author: Jonas Devlieghere Date: 2020-11-13T09:30:40-08:00 New Revision: e5a82b4594d700fe5afd2eaa7e03a213ac91d895 URL: https://github.com/llvm/llvm-project/commit/e5a82b4594d700fe5afd2eaa7e03a213ac91d895 DIFF:

[Lldb-commits] [PATCH] D87637: [lldb/test] Enable faulthandler in dotest

2020-11-13 Thread Jordan Rupprecht via Phabricator via lldb-commits
rupprecht added a comment. Thanks, I'll take a look at that. For SIGTERM (issued by test runners to handle timeouts), the stack trace is printed via `faulthandler.register(signal.SIGTERM, chain=True)`. The `chain=True` //should// cause previous signal handlers registered for SIGTERM to

[Lldb-commits] [PATCH] D87637: [lldb/test] Enable faulthandler in dotest

2020-11-13 Thread Jordan Rupprecht via Phabricator via lldb-commits
rupprecht added a comment. At head: $ ninja check-lldb-api-commands-apropos-basic [2/3] Running lit suite /home/rupprecht/src/llvm-project/lldb/test/API/commands/apropos/basic FAIL: lldb-api :: commands/apropos/basic/TestApropos.py (1 of 1) TEST 'lldb-api ::

[Lldb-commits] [lldb] 6c0cd56 - [lldb] Make `process connect` behave the same in sync and async mode.

2020-11-13 Thread Jonas Devlieghere via lldb-commits
Author: Jonas Devlieghere Date: 2020-11-13T17:39:30-08:00 New Revision: 6c0cd5676e0a0feaf836e0399023a6e21224467b URL: https://github.com/llvm/llvm-project/commit/6c0cd5676e0a0feaf836e0399023a6e21224467b DIFF:

[Lldb-commits] [PATCH] D87637: [lldb/test] Enable faulthandler in dotest

2020-11-13 Thread Jordan Rupprecht via Phabricator via lldb-commits
rupprecht added a comment. My cmake config appears to be correct. I tried adding this to `CommandInterpreter::HandleCommand`: lldbassert(ENABLE_BACKTRACES && "back traces are not enabled!"); lldbassert(false && "crash!"); Running LLDB directly does what you describe: $ bin/lldb (lldb)

[Lldb-commits] [PATCH] D87637: [lldb/test] Enable faulthandler in dotest

2020-11-13 Thread Raphael Isemann via Phabricator via lldb-commits
teemperor added a comment. +1 to what Jonas said. You can reproduce this by just adding an `abort();` call at the start of `CommandInterpreter::HandleCommand` and then for example like the `TestApropos.py` test. > If the LLDB process that this calls crashes, it shouldn't affect that. LLDB is

[Lldb-commits] [lldb] 875be9f - [lldb] Mark command-process-connect as unsupported on Windows

2020-11-13 Thread Jonas Devlieghere via lldb-commits
Author: Jonas Devlieghere Date: 2020-11-13T20:02:05-08:00 New Revision: 875be9f454c31c94701bdf4e28f8bea07a8c9c79 URL: https://github.com/llvm/llvm-project/commit/875be9f454c31c94701bdf4e28f8bea07a8c9c79 DIFF:

[Lldb-commits] [PATCH] D87637: [lldb/test] Enable faulthandler in dotest

2020-11-13 Thread Raphael Isemann via Phabricator via lldb-commits
teemperor added a comment. I'm late to the party, but I actually don't think this is a good change as it disables the normal LLDB backtraces. The current test errors we see on Green Dragon look now like this: Assertion failed: (size() >= N && "Dropping more elements than exist"), function

[Lldb-commits] [PATCH] D87637: [lldb/test] Enable faulthandler in dotest

2020-11-13 Thread Jordan Rupprecht via Phabricator via lldb-commits
rupprecht added a comment. In D87637#2395246 , @teemperor wrote: > I'm late to the party, but I actually don't think this is a good change as it > disables the normal LLDB backtraces. The current test errors we see on Green > Dragon look now like this:

[Lldb-commits] [PATCH] D87637: [lldb/test] Enable faulthandler in dotest

2020-11-13 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added a comment. I think Raphael is referring to the LLVM's `PrettyStackTrace` which prints a backtrace when you crash. Other than the driver I don't think we enable that in LLDB, so maybe LLVM was registering them by default if you had no signal handler installed? By default the

[Lldb-commits] [PATCH] D91293: [lldb] [Process/FreeBSDRemote] Modernize and simplify YMM logic

2020-11-13 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. In D91293#2393764 , @mgorny wrote: > Perform offsetting in `GetOffsetRegSetData()` to avoid UB. Shouldn't have the last update gone to D91411 instead ? CHANGES SINCE LAST ACTION

[Lldb-commits] [PATCH] D91293: [lldb] [Process/FreeBSDRemote] Modernize and simplify YMM logic

2020-11-13 Thread Michał Górny via Phabricator via lldb-commits
mgorny updated this revision to Diff 305125. mgorny added a comment. Upload the correct diff. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91293/new/ https://reviews.llvm.org/D91293 Files: lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp

[Lldb-commits] [PATCH] D91293: [lldb] [Process/FreeBSDRemote] Modernize and simplify YMM logic

2020-11-13 Thread Michał Górny via Phabricator via lldb-commits
mgorny updated this revision to Diff 305113. mgorny added a comment. Perform offsetting in `GetOffsetRegSetData()` to avoid UB. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91293/new/ https://reviews.llvm.org/D91293 Files:

[Lldb-commits] [PATCH] D91411: [lldb] [Process/FreeBSDRemote] Optimize regset pointer logic

2020-11-13 Thread Michał Górny via Phabricator via lldb-commits
mgorny updated this revision to Diff 305126. mgorny added a comment. Perform offsetting in GetOffsetRegSetData() to avoid UB. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91411/new/ https://reviews.llvm.org/D91411 Files:

[Lldb-commits] [PATCH] D91293: [lldb] [Process/FreeBSDRemote] Modernize and simplify YMM logic

2020-11-13 Thread Michał Górny via Phabricator via lldb-commits
mgorny added a comment. In D91293#2393803 , @labath wrote: > In D91293#2393764 , @mgorny wrote: > >> Perform offsetting in `GetOffsetRegSetData()` to avoid UB. > > Shouldn't have the last update gone to D91411 >

[Lldb-commits] [PATCH] D91293: [lldb] [Process/FreeBSDRemote] Modernize and simplify YMM logic

2020-11-13 Thread Michał Górny via Phabricator via lldb-commits
mgorny updated this revision to Diff 305158. mgorny added a comment. Rename AVX/MPX regsets to avoid matching strings in `commands/register/register/register_command/TestRegisters.py` that cause the test to wrongly assume that I have MPX on this machine. CHANGES SINCE LAST ACTION

[Lldb-commits] [PATCH] D91293: [lldb] [Process/FreeBSDRemote] Modernize and simplify YMM logic

2020-11-13 Thread Michał Górny via Phabricator via lldb-commits
mgorny updated this revision to Diff 305130. mgorny added a comment. Restore old register set indices, to unbreak output. (Note: I'm going to make that struct move soonish) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91293/new/ https://reviews.llvm.org/D91293 Files:

[Lldb-commits] [PATCH] D91293: [lldb] [Process/FreeBSDRemote] Modernize and simplify YMM logic

2020-11-13 Thread Michał Górny via Phabricator via lldb-commits
mgorny updated this revision to Diff 305132. mgorny added a comment. Move `YMMSplitPtr` inside the class. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91293/new/ https://reviews.llvm.org/D91293 Files:

[Lldb-commits] [PATCH] D91411: [lldb] [Process/FreeBSDRemote] Optimize regset pointer logic

2020-11-13 Thread Michał Górny via Phabricator via lldb-commits
mgorny updated this revision to Diff 305133. mgorny added a comment. Rebase CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91411/new/ https://reviews.llvm.org/D91411 Files: lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp

[Lldb-commits] [PATCH] D91422: [lldb] [Process/FreeBSDRemote] Check for regset support early [WIP]

2020-11-13 Thread Michał Górny via Phabricator via lldb-commits
mgorny created this revision. mgorny added reviewers: labath, krytarowski, emaste. mgorny requested review of this revision. @labath, I'm trying to copy the logic from Linux here but for some reason unsupported regsets are now reported as 'unknown' instead of not all. Any clue what I'm doing

[Lldb-commits] [PATCH] D91422: [lldb] [Process/FreeBSDRemote] Check for regset support early [WIP]

2020-11-13 Thread Michał Górny via Phabricator via lldb-commits
mgorny added a comment. Hmm, if I add `GetUserRegisterCount()` override, then registers start disappearing. Except that wrong registers disappear. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91422/new/ https://reviews.llvm.org/D91422 ___