From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5363 invoked by alias); 23 Aug 2004 21:28:02 -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 5355 invoked from network); 23 Aug 2004 21:28:02 -0000 Received: from unknown (HELO granger.mail.mindspring.net) (207.69.200.148) by sourceware.org with SMTP; 23 Aug 2004 21:28:02 -0000 Received: from user-119a90a.biz.mindspring.com ([66.149.36.10] helo=berman.michael-chastain.com) by granger.mail.mindspring.net with esmtp (Exim 3.33 #1) id 1BzMMA-0002hf-00; Mon, 23 Aug 2004 17:27:58 -0400 Received: from mindspring.com (localhost [127.0.0.1]) by berman.michael-chastain.com (Postfix) with SMTP id C0CDF4B102; Mon, 23 Aug 2004 17:28:13 -0400 (EDT) Date: Mon, 23 Aug 2004 21:28:00 -0000 From: Michael Chastain To: drow@false.org, dan@imi-test.com Subject: Re: cannot subscript something of type Cc: gdb@sources.redhat.com Message-ID: <412A616D.nailD4K28EC6E@mindspring.com> References: <005601c4871d$67c8c9f0$0401a8c0@dan> <20040821021144.GA3321@nevyn.them.org> <008d01c48952$b7e0e7b0$0401a8c0@dan> In-Reply-To: <008d01c48952$b7e0e7b0$0401a8c0@dan> User-Agent: nail 10.8 6/28/04 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2004-08/txt/msg00301.txt.bz2 Also, I tried a SuSE 9 system with the vendor-supplied gcc and gdb: Linux spe186 2.6.5-7.97-bigsmp #1 SMP Fri Jul 2 14:21:59 UTC 2004 i686 i686 i386 GNU/Linux gcc version 3.3.3 (SuSE Linux) GNU gdb 6.1 This GDB was configured as "i586-suse-linux" Your test program worked fine for me: [chastain@spe186 dm]$ gdb tester GNU gdb 6.1 Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i586-suse-linux"...Using host libthread_db library "/lib/tls/libthread_db.so.1". (gdb) print Mod[0] $1 = {Stat = 0, sys_status = 0, powered_up = 0, compat = 0} (gdb) print (S_Module) Mod[0] $2 = {Stat = 0, sys_status = 0, powered_up = 0, compat = 0} Also try this: right after you start gdb, do "break main" and "run", to get to the main program. Then print Mod[0] et cetera. Does that help any?