From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12848 invoked by alias); 17 May 2010 16:10:13 -0000 Received: (qmail 12767 invoked by uid 22791); 17 May 2010 16:10:01 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.35) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 17 May 2010 16:09:46 +0000 Received: from hpaq2.eem.corp.google.com (hpaq2.eem.corp.google.com [172.25.149.2]) by smtp-out.google.com with ESMTP id o4HG9hXE007647 for ; Mon, 17 May 2010 09:09:43 -0700 Received: from pxi19 (pxi19.prod.google.com [10.243.27.19]) by hpaq2.eem.corp.google.com with ESMTP id o4HG9ScZ023538 for ; Mon, 17 May 2010 09:09:42 -0700 Received: by pxi19 with SMTP id 19so2599525pxi.4 for ; Mon, 17 May 2010 09:09:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.141.106.8 with SMTP id i8mr3818080rvm.275.1274112581374; Mon, 17 May 2010 09:09:41 -0700 (PDT) Received: by 10.140.255.14 with HTTP; Mon, 17 May 2010 09:09:41 -0700 (PDT) In-Reply-To: <20100517015752.GA24402@adacore.com> References: <4BD1BBE3020000520000FC62@pluto.sron.nl> <4BE08E95.5040500@oarcorp.com> <20100517015752.GA24402@adacore.com> Date: Mon, 17 May 2010 16:37:00 -0000 Message-ID: Subject: Re: [patch] sim/erc32/ max simulation time extended by using 64bit ints From: Doug Evans To: Joel Brobecker Cc: Joel Sherrill , Tiemen Schut , "gdb-patches@sourceware.org" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-05/txt/msg00351.txt.bz2 On Sun, May 16, 2010 at 6:57 PM, Joel Brobecker wro= te: > Hey guys, > >> Index: sim/erc32/sis.h >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> RCS file: /cvs/src/src/sim/erc32/sis.h,v >> retrieving revision 1.2 >> diff -u -r1.2 sis.h >> --- sim/erc32/sis.h =A0 9 Jun 2002 15:45:46 -0000 =A0 =A0 =A0 1.2 >> +++ sim/erc32/sis.h =A0 4 May 2010 21:14:55 -0000 >> @@ -23,6 +23,7 @@ >> =A0#include "ansidecl.h" >> =A0#include "gdb/callback.h" >> =A0#include "gdb/remote-sim.h" >> +#include > > Unfortunately, this change breaks the build when stdint.h is not > available (Eg. sparc-solaris). How old is this solaris? OTOH, gdb/defs.h unconditionally includes stdint.h (I think I checked it at the time, so I approved the patch) so I'm confused. > Apparently, this header was included for 2 things: > =A0- define two 64bit types int64 and uint64; > =A0- have UINT64_MAX. > > I assume that the requirement was for 64bit minimum, as opposed to > exactly 64bit? Making that assumption, we can remove the need for > including stdint.h by using long long instead of int64_t (same thing > for the unsigned counterpart). =A0Similarly, UINT64_MAX has a well defined > value reguardless of the platform, so it can easily be defined as well. > Looking at the rest of the type definitions above, it's actually in line > with what's been done so far. > > Joel: Would that work for you as well? > > Doug: Would that be OK to commit? I think that the cleanest thing to do > =A0 =A0 =A0here would be to have some configury that would provide our own > =A0 =A0 =A0stdint.h when missing. =A0We already do that for GDB by using = gnulib > =A0 =A0 =A0so perhaps one way to do so would be to share the gnulib betwe= en > =A0 =A0 =A0GDB and the sim (probably meaning moving it to the root direct= ory). For reference sake, there's bfd_stdint.h generated by config/stdint.m4. I don't know all that it handles, but again gdb itself just includes stdint.h unconditionally. > PS: We have the same problem with rx sim, I believe. I haven't tried > =A0 =A0building it, though.