From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5433 invoked by alias); 4 Apr 2005 09:54:41 -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 4776 invoked from network); 4 Apr 2005 09:54:33 -0000 Received: from unknown (HELO cat.co.za) (196.33.33.51) by sourceware.org with SMTP; 4 Apr 2005 09:54:33 -0000 Received: (qmail 31334 invoked by uid 1002); 4 Apr 2005 10:11:20 -0000 Received: from stuartb@cat.co.za by mail.cat.co.za by uid 807 with qmail-scanner-1.21 (clamscan: 0.70. Clear:RC:1(196.33.33.52):. Processed in 2.151646 secs); 04 Apr 2005 10:11:20 -0000 Received: from unknown (HELO STU95) (196.33.33.52) by 0 with SMTP; 4 Apr 2005 10:11:18 -0000 Message-ID: <0f4601c538fc$30c35970$5e22a8c0@STU95> From: "Stuart Brooks" To: Subject: gdb 5.3nb1 crashing when accessing elements in static libs Date: Mon, 04 Apr 2005 09:54:00 -0000 Organization: Intervid Technologies MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-SW-Source: 2005-04/txt/msg00029.txt.bz2 Hi, I'm new to this list, so if this is not the right place to be posting please let me know.... I am experiencing problems when interrogating a core file - as soon as I try to access a global variable in a statically linked library or view the internals of a class/struct declared in a static lib gdb either says , gives garbage or segmentation faults. Details of my system are: OS: Netbsd 2.0 gdb: 5.3nb1 compiler: g++ 3.3 Using the same code, gdb works fine on [Netbsd 1.5.1,gdb 4.17,g++ 2.91.66] and [Netbsd 1.6.2,gdb 5.0nb1,g++ 2.95.3] so it looks to me like a conflict between g++ and gdb. The libs are being compiled with -g and without optimizations. I'm really not too sure what to do from here. Any ideas/help would be much appreciated ... Thanks Stuart --------------------------- More info: (gdb) bt #0 0x4822cfeb in kill () from /usr/lib/libc.so.12 #1 0x08064f85 in Sql_Query::executeQuery() (this=0x8073220) at sql_query.cpp:410 #2 0x0804f51b in Sql_Gateway::updateGateway(Sql_Database*, int) ( this=0x80870d0, db=0x8088080, gateway_id=1) at sql_gateway.cpp:247 ... #7 0x08049e8c in main (argc=1, argv=0xbfbff88c) at main.cpp:50 #8 0x08049b12 in ___start () (gdb) up #1 0x08064f85 in Sql_Query::executeQuery() (this=0x8073220) at sql_query.cpp:410 410 CHECK(false); (gdb) up #2 0x0804f51b in Sql_Gateway::updateGateway(Sql_Database*, int) ( this=0x80870d0, db=0x8088080, gateway_id=1) at sql_gateway.cpp:247 247 if (!q->executeQuery()) (gdb) p db $1 = ( *) 0x8088080 (gdb) p *db $2 = --------------------------- Also when trying to print out the value of a global pointer I get this: (gdb) p server $5 = 134692864