From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5384 invoked by alias); 27 Aug 2008 11:56:45 -0000 Received: (qmail 5371 invoked by uid 22791); 27 Aug 2008 11:56:45 -0000 X-Spam-Check-By: sourceware.org Received: from yx-out-1718.google.com (HELO yx-out-1718.google.com) (74.125.44.153) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 27 Aug 2008 11:56:04 +0000 Received: by yx-out-1718.google.com with SMTP id 3so1674305yxi.48 for ; Wed, 27 Aug 2008 04:56:02 -0700 (PDT) Received: by 10.151.155.12 with SMTP id h12mr1425082ybo.136.1219838162520; Wed, 27 Aug 2008 04:56:02 -0700 (PDT) Received: from ?192.168.222.5? ( [189.54.39.44]) by mx.google.com with ESMTPS id 30sm423096yxk.4.2008.08.27.04.56.00 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 27 Aug 2008 04:56:01 -0700 (PDT) Message-Id: <16C866B7-F5D2-4D95-922F-9D19ABC54D45@gmail.com> From: "Dr. Rolf Jansen" To: gdb-patches@sourceware.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v928.1) Subject: Two minor issues Date: Wed, 27 Aug 2008 11:56:00 -0000 X-Mailer: Apple Mail (2.928.1) 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: 2008-08/txt/msg00630.txt.bz2 6.8.50.20080826-cvs This GDB was configured as "--host=powerpc-apple-darwin9.4.0 -- target=i386-mingw32msvc" 1. remote.c does not compile because the new function remote_bfd_iovec_stat() makes a reference to the stat structure and that is not defined by default on MaC OS X. In order to fix this I added "#include " somewhere at the top of the file. 2. quite at the top of objc-lang.c the Class structure is declared: struct objc_class { CORE_ADDR isa; CORE_ADDR super_class; CORE_ADDR name; long version; long info; long instance_size; CORE_ADDR ivars; CORE_ADDR methods; CORE_ADDR cache; CORE_ADDR protocols; }; In read_objc_class() a variable of that struct type is filled with the contents at a CORE_ADDR: static void read_objc_class (CORE_ADDR addr, struct objc_class *class) { class->isa = read_memory_unsigned_integer (addr, 4); class->super_class = read_memory_unsigned_integer (addr + 4, 4); class->name = read_memory_unsigned_integer (addr + 8, 4); class->version = read_memory_unsigned_integer (addr + 12, 4); class->info = read_memory_unsigned_integer (addr + 16, 4); class->instance_size = read_memory_unsigned_integer (addr + 18, 4); class->ivars = read_memory_unsigned_integer (addr + 24, 4); class->methods = read_memory_unsigned_integer (addr + 28, 4); class->cache = read_memory_unsigned_integer (addr + 32, 4); class->protocols = read_memory_unsigned_integer (addr + 36, 4); } As a matter of fact, this code works only for targets with a pointer- size and long-size of 4-bytes, but even with this, the offset to class- >instance_size shall be 20 and not 18. Is there a global way to find out at compile-time at the build or host system the ptr-size and the long-size of the configured target machine, something like size_attarget_of()? Best regards Rolf