From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1602 invoked by alias); 20 May 2015 17:15:58 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 1567 invoked by uid 55); 20 May 2015 17:15:55 -0000 From: "stanton at haas dot berkeley.edu" To: gdb-prs@sourceware.org Subject: [Bug gdb/18436] Can't print dynamically allocated global array Date: Wed, 20 May 2015 17:15:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 7.9 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: stanton at haas dot berkeley.edu X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-q2/txt/msg00292.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D18436 --- Comment #2 from stanton at haas dot berkeley.edu --- Thanks for the response, Keith First, I=E2=80=99m running OS X 10.10.3. Test 1: MacPorts versions of gdb and gcc gdb version =3D GNU gdb (GDB) 7.7.1 gcc version =3D gcc version 4.9.2 (MacPorts gcc49 4.9.2_1)=20 (gdb) print vec[0] cannot subscript something of type `' (gdb) info var ^vec$ All variables matching regular expression "^vec$": Non-debugging symbols: 0x0000000100001028 vec Test 2: Same debugger, but Apple LLVM version 6.1.0 (clang-602.0.53) (based= on LLVM 3.6.0svn): same result. Test 3: I just installed home-brew gdb 7.9 and tried the same test with the Apple LLVM compiled code. Same result again. > On May 20, 2015, at 9:34 AM, keiths at redhat dot com wrote: >=20 > https://sourceware.org/bugzilla/show_bug.cgi?id=3D18436 >=20 > Keith Seitz changed: >=20 > What |Removed |Added > -------------------------------------------------------------------------= --- > CC| |keiths at redhat dot com >=20 > --- Comment #1 from Keith Seitz --- > I tried your supplied test case on both the 7.9 branch and HEAD, and I was > unable to reproduce it on Fedora 21, using the system compiler (4.9.2 201= 50212 > (Red Hat 4.9.2-6)). >=20 > What is your environment? gdb/gcc -v (or "show version" in gdb). > What does "info var ^vec$" give? >=20 > For reference: >=20 > GNU gdb (GDB) 7.9 > Copyright (C) 2015 Free Software Foundation, Inc. > [snip] > Type "apropos word" to search for commands related to "word"... > Reading symbols from /home/keiths/tmp/18436...done. > (gdb) start > Temporary breakpoint 1 at 0x4005d5: file /home/keiths/tmp/18436.c, line 1= 0. > Starting program: /home/keiths/tmp/18436=20 >=20 > Temporary breakpoint 1, main (argc=3D1, argv=3D0x7fffffffdb18) > at /home/keiths/tmp/18436.c:10 > 10 vec =3D (double *) malloc((unsigned) 10*sizeof(double)); > (gdb) n > 12 for (i=3D0; i<10; i++) { > (gdb)=20 > 13 vec[i] =3D i; > (gdb)=20 > 14 printf("Item %d =3D %15.6g\n", i, vec[i]); > (gdb) p vec[0] > $1 =3D 0 > (gdb) info var ^vec$ > All variables matching regular expression "^vec$": >=20 > File /home/keiths/tmp/18436.c: > double *vec; > (gdb) >=20 > --=20 > You are receiving this mail because: > You reported the bug. --=20 You are receiving this mail because: You are on the CC list for the bug. >>From gdb-prs-return-18099-listarch-gdb-prs=sources.redhat.com@sourceware.org Wed May 20 17:26:27 2015 Return-Path: Delivered-To: listarch-gdb-prs@sources.redhat.com Received: (qmail 40058 invoked by alias); 20 May 2015 17:26:26 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Delivered-To: mailing list gdb-prs@sourceware.org Received: (qmail 40032 invoked by uid 55); 20 May 2015 17:26:25 -0000 From: "stanton at haas dot berkeley.edu" To: gdb-prs@sourceware.org Subject: [Bug gdb/18436] Can't print dynamically allocated global array Date: Wed, 20 May 2015 17:26:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 7.9 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: stanton at haas dot berkeley.edu X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-q2/txt/msg00293.txt.bz2 Content-length: 3017 https://sourceware.org/bugzilla/show_bug.cgi?id=3D18436 --- Comment #3 from stanton at haas dot berkeley.edu --- Further follow-up: I tried MacPorts cgdb, - same result. I then tried LLDB (the Xcode default debugger) on the same executable - it = can print the contents of vec just fine However, I don=E2=80=99t want to use LL= DB! > On May 20, 2015, at 10:15 AM, Richard Stanton = wrote: >=20 > Thanks for the response, Keith First, I=E2=80=99m running OS X 10.10.3. >=20 > Test 1: MacPorts versions of gdb and gcc > gdb version =3D GNU gdb (GDB) 7.7.1 > gcc version =3D gcc version 4.9.2 (MacPorts gcc49 4.9.2_1)=20 >=20 > (gdb) print vec[0] > cannot subscript something of type `' > (gdb) info var ^vec$ > All variables matching regular expression "^vec$": >=20 > Non-debugging symbols: > 0x0000000100001028 vec >=20 > Test 2: Same debugger, but Apple LLVM version 6.1.0 (clang-602.0.53) (bas= ed on LLVM 3.6.0svn): same result. >=20 > Test 3: I just installed home-brew gdb 7.9 and tried the same test with t= he Apple LLVM compiled code. Same result again. >=20 >=20 >=20 >> On May 20, 2015, at 9:34 AM, keiths at redhat dot com wrote: >>=20 >> https://sourceware.org/bugzilla/show_bug.cgi?id=3D18436 >>=20 >> Keith Seitz changed: >>=20 >> What |Removed |Added >> ------------------------------------------------------------------------= ---- >> CC| |keiths at redhat dot com >>=20 >> --- Comment #1 from Keith Seitz --- >> I tried your supplied test case on both the 7.9 branch and HEAD, and I w= as >> unable to reproduce it on Fedora 21, using the system compiler (4.9.2 20= 150212 >> (Red Hat 4.9.2-6)). >>=20 >> What is your environment? gdb/gcc -v (or "show version" in gdb). >> What does "info var ^vec$" give? >>=20 >> For reference: >>=20 >> GNU gdb (GDB) 7.9 >> Copyright (C) 2015 Free Software Foundation, Inc. >> [snip] >> Type "apropos word" to search for commands related to "word"... >> Reading symbols from /home/keiths/tmp/18436...done. >> (gdb) start >> Temporary breakpoint 1 at 0x4005d5: file /home/keiths/tmp/18436.c, line = 10. >> Starting program: /home/keiths/tmp/18436=20 >>=20 >> Temporary breakpoint 1, main (argc=3D1, argv=3D0x7fffffffdb18) >> at /home/keiths/tmp/18436.c:10 >> 10 vec =3D (double *) malloc((unsigned) 10*sizeof(double)); >> (gdb) n >> 12 for (i=3D0; i<10; i++) { >> (gdb)=20 >> 13 vec[i] =3D i; >> (gdb)=20 >> 14 printf("Item %d =3D %15.6g\n", i, vec[i]); >> (gdb) p vec[0] >> $1 =3D 0 >> (gdb) info var ^vec$ >> All variables matching regular expression "^vec$": >>=20 >> File /home/keiths/tmp/18436.c: >> double *vec; >> (gdb) >>=20 >> --=20 >> You are receiving this mail because: >> You reported the bug. > --=20 You are receiving this mail because: You are on the CC list for the bug. >>From gdb-prs-return-18100-listarch-gdb-prs=sources.redhat.com@sourceware.org Wed May 20 17:37:15 2015 Return-Path: Delivered-To: listarch-gdb-prs@sources.redhat.com Received: (qmail 72576 invoked by alias); 20 May 2015 17:37:15 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Delivered-To: mailing list gdb-prs@sourceware.org Received: (qmail 72543 invoked by uid 55); 20 May 2015 17:37:14 -0000 From: "stanton at haas dot berkeley.edu" To: gdb-prs@sourceware.org Subject: [Bug gdb/18436] Can't print dynamically allocated global array Date: Wed, 20 May 2015 17:37:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 7.9 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: stanton at haas dot berkeley.edu X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-q2/txt/msg00294.txt.bz2 Content-length: 720 https://sourceware.org/bugzilla/show_bug.cgi?id=18436 --- Comment #4 from stanton at haas dot berkeley.edu --- It also works if I use the MacPorts port gdb-apple, which announces itself as GNU gdb 6.3.50.20050815-cvs (Wed Nov 26 07:47:26 UTC 2014) 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 "--host=i686-apple-darwin14.0.0 --target=". -- You are receiving this mail because: You are on the CC list for the bug.