mirror of
https://github.com/siemens-mobile-hacks/llvm-c166.git
synced 2026-11-27 03:04:21 +00:00
LLDB currently passes the signed `Scalar` values produced by `DW_OP_consts` directly to `Scalar::operator%`. As a result, the issue expression evaluates `-1 % 2` as signed remainder `-1` instead of interpreting the all-one address-sized value modulo 2 as `1`. Make local copies of the `DW_OP_mod` dividend and divisor unsigned before applying the existing modulo operator. The change is contained entirely in the opcode evaluator and does not alter the global `Scalar` implementation. Update the `DW_OP_mod` unit test with the issue reproducer. Tests: - `DWARFExpression.DW_OP_mod` - `DWARFExpression.*` - `ExpressionTests` - `check-lldb-unit` - `clang-format --dry-run --Werror` - `git diff --check` Fixes #207015 |
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| DiagnosticManager.cpp | ||
| DWARFExpression.cpp | ||
| DWARFExpressionList.cpp | ||
| Expression.cpp | ||
| ExpressionParser.cpp | ||
| ExpressionTypeSystemHelper.cpp | ||
| ExpressionVariable.cpp | ||
| FunctionCaller.cpp | ||
| IRExecutionUnit.cpp | ||
| IRInterpreter.cpp | ||
| IRMemoryMap.cpp | ||
| LLVMUserExpression.cpp | ||
| Materializer.cpp | ||
| ObjectFileJIT.cpp | ||
| REPL.cpp | ||
| UserExpression.cpp | ||
| UtilityFunction.cpp | ||