[RFA] fix gdb.base/remote.c for small int targets

Eli Zaretskii eliz@is.elta.co.il
Fri Aug 31 00:27:00 GMT 2001


> Date: Thu, 30 Aug 2001 22:11:23 -0700 (PDT)
> From: Jeff Holcomb <jeffh@redhat.com>
>  
> -#ifdef mc68hc11
> +#include <limits.h>
> +/* For targets with 16bit int, use a 1k buffer. */
> +#if INT_MAX < 32768

Shouldn't you use 32768L or 32768U?  If an int is only 16 bits wide,
32768 might overflow into the sign bit, and then all bets are off.



More information about the Gdb-patches mailing list