This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: struct gmon_cg_arc_record


   From: Jes Sorensen <jes@linuxcare.com>
   Date: 14 Nov 2000 23:24:22 +0100

   -    /* FIXME: Checking a host compiler define means that we can't use
   -       a cross gprof to the alpha.  */
   -#ifdef __alpha__
   -    char low_pc[8];		/* base pc address of sample buffer */
   -    char high_pc[8];		/* max pc address of sampled buffer */
   -#else
   -    char low_pc[4];		/* base pc address of sample buffer */
   -    char high_pc[4];		/* max pc address of sampled buffer */
   -#endif
   +    char low_pc[sizeof (char *)];	/* base pc address of sample buffer */
   +    char high_pc[sizeof (char *)];	/* max pc address of sampled buffer */

Yuck.  If we're going to touch this, can't we avoid sizeof(char*)?  It
prevents cross-configurations, and there is no particular reason to
believe that it is correct on any given system.  At the very least
make it something which can be configured for a particular system,
rather than trusting that the compiler and the C library agree on this
size.

Ian

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]