From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15364 invoked by alias); 26 Jul 2004 11:48:39 -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 15242 invoked from network); 26 Jul 2004 11:48:35 -0000 Received: from unknown (HELO mail.pune.nevisnetworks.com) (203.124.166.179) by sourceware.org with SMTP; 26 Jul 2004 11:48:35 -0000 Received: from nevis_pune_xchg.pune.nevisnetworks.com (nevis_pune_xchg.pune.nevisnetworks.com [192.168.2.7]) by mail.pune.nevisnetworks.com (8.12.8/8.12.8) with ESMTP id i6QBmS0V031256 for ; Mon, 26 Jul 2004 17:18:30 +0530 content-class: urn:content-classes:message Subject: RE: Strange GDB behavior Date: Mon, 26 Jul 2004 11:58:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Message-ID: <36993D449C7FA647BF43568E0793AB3E4E3161@nevis_pune_xchg.pune.nevisnetworks.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Arun Vishwanathan" To: "Monika Chaddha" , "True Sylvia" Cc: X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) X-SW-Source: 2004-07/txt/msg00320.txt.bz2 >From your following command it is evident that "bnp" is a pointer to a structure.=20 >(gdb) p *bnp >$1 =3D {egp_next =3D 0x0, egp_sort_next =3D 0x0, egp_group =3D 0x82a45ef0, > egp_flags =3D 138412032, egp_hisrcvdcaps =3D 0, egp_hiscaps =3D 0, egp_c= onf =3D { > action =3D 0 '\000'}, egpc_peer_as =3D 0, egpc_description =3D 0x0, >as_count >=3D 0, > ---Type to continue, or q to quit---q >Quit Hence I think this statement is incorrect=20 > (gdb) p *bnp->as_count It should be=20 (gdb) p bnp->as_count Regards, Arun -----Original Message----- From: gdb-owner@sources.redhat.com [mailto:gdb-owner@sources.redhat.com] On Behalf Of Monika Chaddha Sent: Monday, July 26, 2004 4:51 PM To: 'True Sylvia' Cc: gdb@sources.redhat.com Subject: RE: Strange GDB behavior Hi Sylvia, Compile yours source code with option -O0 and than try again.... As this can be a problem due to optimization... Are you getting the same problem with the other structures also? Regards Monika >-----Original Message----- >From: True Sylvia [mailto:truesylvia@yahoo.co.uk] >Sent: Monday, July 26, 2004 2:24 PM >To: gdb@sources.redhat.com >Subject: Strange GDB behavior > >Hi, > >Am using the following flavor of GDB > >Current directory is /tftproot/code/ >GDB is free software and you are welcome to 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. >GDB 4.16 (sparc-sun-solaris2.5.1 --target mips64orion-elf), >Copyright 1996 Free Software Foundation, Inc... >(gdb) > >I have attached GDB to my executable and the following happens when i stop >on one of the breakpoints that i have set > >(gdb) info br >Num Type Disp Enb Address What >1 breakpoint keep y 0x8087c728 in egp_peer_close at egp_init.c:5265 >(gdb) >(gdb) c >Continuing. >[New thread 22682896] >[Switching to thread 22682896] > >Breakpoint 1, egp_peer_close (bnp=3D0x82a461c8, event=3D2) at egp_init.c:5265 >(gdb) p *bnp >$1 =3D {egp_next =3D 0x0, egp_sort_next =3D 0x0, egp_group =3D 0x82a45ef0, > egp_flags =3D 138412032, egp_hisrcvdcaps =3D 0, egp_hiscaps =3D 0, egp_c= onf =3D { > action =3D 0 '\000'}, egpc_peer_as =3D 0, egpc_description =3D 0x0, >as_count >=3D 0, > ---Type to continue, or q to quit---q >Quit >(gdb) > >(gdb) p *bnp->as_count >There is no member named as_count. >(gdb) >(gdb) p *bnp->egp_options >There is no member named egp_options. > >*Why* is this happening? I have members as_count and egp_options in my bnp >structure. Why isnt GDB showing me thses? > >Regards, >Sylvia T. >