]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Allow cast of 128-bit integer to pointer
authorTom Tromey <tom@tromey.com>
Fri, 24 Nov 2023 19:10:53 +0000 (12:10 -0700)
committerTom Tromey <tom@tromey.com>
Fri, 8 Dec 2023 15:17:40 +0000 (08:17 -0700)
commit44671f3f7f4c6435e7a639ad2215629f4e1ea8a7
treeb364744f0451f5e8704f94f454b1c943c8546e50
parent703adbb1f97db52ed63b2a6a074195b1cee0f132
Allow cast of 128-bit integer to pointer

PR rust/31082 points out that casting a 128-bit integer to a pointer
will fail.  This happens because a case in value_cast was not
converted to use GMP.

This patch fixes the problem.  I am not really sure that testing
against the negative value here makes sense, but I opted to just
preserve the existing behavior rather than change it.

Regression tested on x86-64 Fedora 38.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31082
gdb/gmp-utils.h
gdb/testsuite/gdb.rust/expr.exp
gdb/valops.c