From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9708 invoked by alias); 27 Jan 2003 21:17:20 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 9509 invoked from network); 27 Jan 2003 21:17:19 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by 172.16.49.205 with SMTP; 27 Jan 2003 21:17:19 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 09A333D2C; Mon, 27 Jan 2003 16:17:17 -0500 (EST) Message-ID: <3E35A1DC.7040506@redhat.com> Date: Mon, 27 Jan 2003 21:17:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.1) Gecko/20021211 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kris Warkentin Cc: gdb@sources.redhat.com Subject: Re: integer types in gdb code References: <105c01c2c63e$0b5de4d0$0202040a@catdog> <3E35991E.9060106@redhat.com> <10cd01c2c646$4c9cccb0$0202040a@catdog> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-01/txt/msg00450.txt.bz2 > >> CORE_ADDR ~= void * >> LONGEST ~= long >> ULONGEST ~= unsigned long > > > No 16 and 8 bit constructs? Also, what if you want to guarantee the number > of bits? From defs.h it looks to me like LONGEST could be 32 or 64 bits, so > if you're reading structures over the wire, you could have problems. The above are GDB's host types. When representing target types (or stuff related to a protocol) GDB can either use a function like extract_unsigned_integer() or construct a type exactly describing the data using that (but be wary of byte order problems). Trying to do something like: struct { uint32_t i; ... } can end up being non-portable (due to struct packing issues and the like). Andrew