[all-commits] [llvm/llvm-project] 0a8a24: [lldb/test] Add GdbRemoteTestCaseFactory to avoid ...
Pavel Labath via All-commits
all-commits at lists.llvm.org
Tue Dec 22 01:12:53 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 0a8a2453fb843cf2e0f43e389b58d516525f0b8c
https://github.com/llvm/llvm-project/commit/0a8a2453fb843cf2e0f43e389b58d516525f0b8c
Author: Pavel Labath <pavel at labath.sk>
Date: 2020-12-22 (Tue, 22 Dec 2020)
Changed paths:
M lldb/packages/Python/lldbsuite/test/decorators.py
M lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
M lldb/test/API/tools/lldb-server/TestGdbRemoteExitCode.py
M lldb/test/API/tools/lldb-server/TestGdbRemoteKill.py
M lldb/test/API/tools/lldb-server/TestGdbRemoteModuleInfo.py
M lldb/test/API/tools/lldb-server/TestGdbRemoteProcessInfo.py
M lldb/test/API/tools/lldb-server/TestGdbRemoteRegisterState.py
M lldb/test/API/tools/lldb-server/TestGdbRemoteSingleStep.py
M lldb/test/API/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py
Log Message:
-----------
[lldb/test] Add GdbRemoteTestCaseFactory to avoid duplication in lldb-server tests
This uses the same approach as the debug info tests to avoid needing to
explicitly spell out the two kinds of tests. I convert a handful of
tests to the new mechanism. The rest will be converted in follow-up
patches.
Commit: 8d75d902a955602feb7e2501e34f814ff5630415
https://github.com/llvm/llvm-project/commit/8d75d902a955602feb7e2501e34f814ff5630415
Author: Pavel Labath <pavel at labath.sk>
Date: 2020-12-22 (Tue, 22 Dec 2020)
Changed paths:
M llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
M llvm/test/DebugInfo/X86/implicit_value-double.ll
Log Message:
-----------
[DebugInfo] Don't use DW_OP_implicit_value for fragments
Currently using DW_OP_implicit_value in fragments produces invalid DWARF
expressions. (Such a case can occur in complex floats, for example.)
This problem manifests itself as a missing DW_OP_piece operation after
the last fragment. This happens because the function for printing
constant float value skips printing the accompanying DWARF expression,
as that would also print DW_OP_stack_value (which is not desirable in
this case). However, this also results in DW_OP_piece being skipped.
The reason that DW_OP_piece is missing only for the last piece is that
the act of printing the next fragment corrects this. However, it does
that for the wrong reason -- the code emitting this DW_OP_piece thinks
that the previous fragment was missing, and so it thinks that it needs
to skip over it in order to be able to print itself.
In a simple scenario this works out, but it's likely that in a more
complex setup (where some pieces are in fact missing), this logic would
go badly wrong. In a simple setup gdb also seems to not mind the fact
that the DW_OP_piece is missing, but it would also likely not handle
more complex use cases.
For this reason, this patch disables the usage of DW_OP_implicit_value
in the frament scenario (we will use DW_OP_const*** instead), until we
figure out the right way to deal with this. This guarantees that we
produce valid expressions, and gdb can handle both kinds of inputs
anyway.
Differential Revision: https://reviews.llvm.org/D92013
Compare: https://github.com/llvm/llvm-project/compare/a6783cd7b65d...8d75d902a955
More information about the All-commits
mailing list