[lldb] [gdb-server] Fix fill_clamp to handle signed src types
authorMichał Górny <mgorny@moritz.systems>
Tue, 9 Nov 2021 22:55:52 +0000 (23:55 +0100)
committerMichał Górny <mgorny@moritz.systems>
Wed, 10 Nov 2021 08:38:55 +0000 (09:38 +0100)
commit82ce9127436b316eca6763b926b2cde2e3d4bb8a
tree569a2b68e47c5b6fe2b80d781b3014de0bdf1d69
parent3f1372365ac6c860ff6ecc4cfd3ba131bdf81698
[lldb] [gdb-server] Fix fill_clamp to handle signed src types

Fix the fill_clamp() function to handle signed source types.  Make sure
that the source value is always non-negative, and cast it to unsigned
when verifying the upper bound.  This fixes compiler warnings about
comparing unsigned and signed types.

Differential Revision: https://reviews.llvm.org/D113519
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp