From owner-freebsd-bugs@FreeBSD.ORG Fri Nov 21 06:40:20 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C1D5616A4D8 for ; Fri, 21 Nov 2003 06:40:20 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8205943FBD for ; Fri, 21 Nov 2003 06:40:16 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id hALEeFFY067223 for ; Fri, 21 Nov 2003 06:40:16 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id hALEeFIi067222; Fri, 21 Nov 2003 06:40:15 -0800 (PST) (envelope-from gnats) Resent-Date: Fri, 21 Nov 2003 06:40:15 -0800 (PST) Resent-Message-Id: <200311211440.hALEeFIi067222@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Vladimir Grebenschikov Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B13B816A4CE; Fri, 21 Nov 2003 06:38:47 -0800 (PST) Received: from vbook.fbsd.ru (asplinux.ru [195.133.213.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 70A0543F75; Fri, 21 Nov 2003 06:38:46 -0800 (PST) (envelope-from vova@vbook.fbsd.ru) Received: from vova by vbook.fbsd.ru with local (Exim 4.24; FreeBSD) id 1ANCRw-0000ln-HW; Fri, 21 Nov 2003 17:39:56 +0300 Message-Id: Date: Fri, 21 Nov 2003 17:39:56 +0300 From: Vladimir Grebenschikov Sender: Vladimir Grebenschikov To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: current@FreeBSD.org Subject: bin/59551: Problem with GDB on latest -CURRENT X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Vladimir Grebenschikov List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Nov 2003 14:40:21 -0000 >Number: 59551 >Category: bin >Synopsis: Problem with GDB on latest -CURRENT >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Nov 21 06:40:15 PST 2003 >Closed-Date: >Last-Modified: >Originator: Vladimir Grebenschikov >Release: FreeBSD 5.1-CURRENT i386 >Organization: SWsoft >Environment: System: FreeBSD vbook.fbsd.ru 5.1-CURRENT FreeBSD 5.1-CURRENT #2: Mon Nov 17 08:10:40 MSK 2003 root@walder.asplinux.ru:/ext/obj/ext/current/src/sys/VBOOK i386 % g++ -v Using built-in specs. Configured with: FreeBSD/i386 system compiler Thread model: posix gcc version 3.3.3 [FreeBSD] 20031106 % gdb -v GNU gdb 5.2.1 (FreeBSD) Copyright 2002 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 "i386-undermydesk-freebsd". >Description: FreeBSD gdb fails to show some valid C++ objects >How-To-Repeat: % cat str.cpp #include using namespace std; class a { public: string x; }; int main() { a s; s.x = "Test1"; return 0; } % g++ -g -o str str.cpp % gdb str GNU gdb 5.2.1 (FreeBSD) ... (gdb) b main Breakpoint 1 at 0x8048665: file str.cpp, line 12. (gdb) r Starting program: /usr/local/home/vova/str Breakpoint 1, main () at str.cpp:12 12 a s; (gdb) n 13 s.x = "Test1"; (gdb) p a Attempt to use a type name as an expression (gdb) p s $1 = {x = {static npos = Error accessing memory address 0x83c451c: Bad address. (gdb) >Fix: gdb53 from ports works as expected: % gdbada str GNU gdb 5.3 (FreeBSD) ... This GDB was configured as "i386-portbld-freebsd5.1"... (gdb) b main Breakpoint 1 at 0x8048665: file str.cpp, line 12. (gdb) r Starting program: /usr/local/home/vova/str Breakpoint 1, main () at str.cpp:12 12 a s; (gdb) n 13 s.x = "Test1"; (gdb) p s $1 = {x = {static npos = 4294967295, _M_dataplus = {> = {}, _M_p = 0x281326b8 ""}, static _S_empty_rep_storage = {0, 0, 1, 0}}} (gdb) PS: Another question, why gdb53-ada present in packages directory as ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-current/Latest/gdb.tbz >Release-Note: >Audit-Trail: >Unformatted: