+2020-07-31 Kevin Buettner <kevinb@redhat.com>
+
+ * gdb.base/coremaker2.c: Change all uses of 'unsigned long long'
+ to 'uintptr_t'
+ (inttypes.h): Include.
+
2020-07-31 Kevin Buettner <kevinb@redhat.com>
* gdb.base/coremaker2.c (buf_rw): Increase size to 256 KiB.
#include <unistd.h>
#include <string.h>
#include <errno.h>
+#include <inttypes.h>
/* These are globals so that we can find them easily when debugging
the core file. */
long pagesize;
-unsigned long long addr;
+uintptr_t addr;
char *mbuf_ro;
char *mbuf_rw;
}
/* Compute an address that should be within buf_ro. Complain if not. */
- addr = ((unsigned long long) buf_ro + pagesize) & ~(pagesize - 1);
+ addr = ((uintptr_t) buf_ro + pagesize) & ~(pagesize - 1);
- if (addr <= (unsigned long long) buf_ro
- || addr >= (unsigned long long) buf_ro + sizeof (buf_ro))
+ if (addr <= (uintptr_t) buf_ro
+ || addr >= (uintptr_t) buf_ro + sizeof (buf_ro))
{
fprintf (stderr, "Unable to compute a suitable address within buf_ro.\n");
exit (1);
/* Compute an mmap address within buf_rw. Complain if it's somewhere
else. */
- addr = ((unsigned long long) buf_rw + pagesize) & ~(pagesize - 1);
+ addr = ((uintptr_t) buf_rw + pagesize) & ~(pagesize - 1);
- if (addr <= (unsigned long long) buf_rw
- || addr >= (unsigned long long) buf_rw + sizeof (buf_rw))
+ if (addr <= (uintptr_t) buf_rw
+ || addr >= (uintptr_t) buf_rw + sizeof (buf_rw))
{
fprintf (stderr, "Unable to compute a suitable address within buf_rw.\n");
exit (1);