diff options
author | Kevin Buettner <kevinb@redhat.com> | 2020-07-30 20:51:40 -0700 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2020-07-31 09:34:58 -0700 |
commit | 0245e1367725aaabc2be2be5e19a16a699d01f25 (patch) | |
tree | 30512ce776fc3dc935e8a103feece48f93277c19 /gdb/cris-tdep.h | |
parent | 9ef1ec5dca12fce2d9e9d3711c8a4091611c804d (diff) | |
download | gdb-0245e1367725aaabc2be2be5e19a16a699d01f25.zip gdb-0245e1367725aaabc2be2be5e19a16a699d01f25.tar.gz gdb-0245e1367725aaabc2be2be5e19a16a699d01f25.tar.bz2 |
gdb.base/coremaker2.c: Fix compilation problems for x86_64 -m32 multilib
There are compilation warnings / errors when compiling coremaker2.c
for the gdb.base/corefile2.exp tests. Here's the command to use
on x86_64 linux:
make check RUNTESTFLAGS="--target_board unix/-m32" \
TESTS="gdb.base/corefile2.exp"
These are the warnings / errors - I've shortened the paths somewhat:
gdb compile failed, gdb/testsuite/gdb.base/coremaker2.c: In function 'main':
gdb/testsuite/gdb.base/coremaker2.c:106:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
106 | addr = ((unsigned long long) buf_ro + pagesize) & ~(pagesize - 1);
| ^
gdb/testsuite/gdb.base/coremaker2.c:108:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
108 | if (addr <= (unsigned long long) buf_ro
| ^
gdb/testsuite/gdb.base/coremaker2.c:109:18: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
109 | || addr >= (unsigned long long) buf_ro + sizeof (buf_ro))
| ^
gdb/testsuite/gdb.base/coremaker2.c:115:19: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
115 | mbuf_ro = mmap ((void *) addr, pagesize, PROT_READ,
| ^
gdb/testsuite/gdb.base/coremaker2.c:130:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
130 | addr = ((unsigned long long) buf_rw + pagesize) & ~(pagesize - 1);
| ^
gdb/testsuite/gdb.base/coremaker2.c:132:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
132 | if (addr <= (unsigned long long) buf_rw
| ^
gdb/testsuite/gdb.base/coremaker2.c:133:18: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
133 | || addr >= (unsigned long long) buf_rw + sizeof (buf_rw))
| ^
gdb/testsuite/gdb.base/coremaker2.c:139:19: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
139 | mbuf_rw = mmap ((void *) addr, pagesize, PROT_READ,
| ^
These were fixed by changing unsigned long long to uintptr_t.
Tested on either rawhide or Fedora 32 with architectures: x86_64,
x86_64/-m32, aarch64, s390x, and ppc64le.
gdb/testsuite/ChangeLog:
* gdb.base/coremaker2.c: Change all uses of 'unsigned long long'
to 'uintptr_t'
(inttypes.h): Include.
Diffstat (limited to 'gdb/cris-tdep.h')
0 files changed, 0 insertions, 0 deletions