Reland "[lldb][DWARFExpression] Fix DW_OP_div to use signed division"
authorLU Hongyi <hluaw@connect.ust.hk>
Fri, 5 May 2023 10:42:17 +0000 (06:42 -0400)
committerMichael Buch <michaelbuch12@gmail.com>
Fri, 5 May 2023 10:45:07 +0000 (06:45 -0400)
commit16c2872d7b09eee67dd0c7ef6b5dd3c3724d3cfc
tree3eeebf3919e75d58a9dd508c0567a3e5c197238c
parentf9dd3ea475e467d42bd3a3ff28c9aa384fe75549
Reland "[lldb][DWARFExpression] Fix DW_OP_div to use signed division"

This patch resolves an issue where a value
is incorrectly displayed if it is represented
by DW_OP_div.

This issue is caused by lldb evaluating
operands of DW_OP_div as unsigned
and performed unintended unsigned
division.

This issue is resolved by creating two
temporary signed scalar and performing
signed division.

(Addresses GH#61727)

Differential Revision: https://reviews.llvm.org/D147370
lldb/source/Expression/DWARFExpression.cpp
lldb/test/Shell/SymbolFile/DWARF/x86/DW_OP_div-with-signed.s [new file with mode: 0644]