From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15427 invoked by alias); 21 Aug 2004 02:11:47 -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 15246 invoked from network); 21 Aug 2004 02:11:45 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 21 Aug 2004 02:11:45 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1ByLM8-0000s4-MD; Fri, 20 Aug 2004 22:11:44 -0400 Date: Sat, 21 Aug 2004 02:11:00 -0000 From: Daniel Jacobowitz To: "Daniel Miller (IMI)" Cc: gdb@sources.redhat.com Subject: Re: cannot subscript something of type Message-ID: <20040821021144.GA3321@nevyn.them.org> Mail-Followup-To: "Daniel Miller (IMI)" , gdb@sources.redhat.com References: <005601c4871d$67c8c9f0$0401a8c0@dan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <005601c4871d$67c8c9f0$0401a8c0@dan> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-08/txt/msg00266.txt.bz2 On Fri, Aug 20, 2004 at 06:23:03PM -0700, Daniel Miller (IMI) wrote: > I'm trying to debug an application with gdb... I have a struct that is > declared thus: > > typedef struct S_Module_s > { > unsigned powered_up; > ... other data elements ... > } __attribute__ ((__packed__)) S_Module; > > extern S_Module Mod[1]; > > I tried compiling both with -g and -ggdb, with no change in the symptoms. What platform? What version of GDB? > I don't seem to be able to display any of the contents of Mod[0], at all.... > I get effects such as: > > (gdb) p Mod[0] > cannot subscript something of type `' > (gdb) p (S_Module) Mod[0] > No symbol "S_Module" in current context. > (gdb) p (struct S_Module_s) Mod[0] > No struct type named S_Module_s. > > What do I have to do to get gdb to recognize my variables?? Virtually every > GUI-based debugger out there is a wrapper around gdb, to if it's not happy, > nobody's happy!!! Please help!! We'll need a standalone test case, or at least a dump of the debugging information in the application, to answer this question. -- Daniel Jacobowitz