From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8964 invoked by alias); 20 May 2015 18:13:21 -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 8938 invoked by uid 55); 20 May 2015 18:13:20 -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 18:13: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/msg00297.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D18436 --- Comment #7 from stanton at haas dot berkeley.edu --- Thanks, Keith. I found a port of readelf, but it doesn=E2=80=99t like my ex= ecutable: Richards-Mac-Pro:C stanton$ greadelf -w main | grep producer readelf: Error: Not an ELF file - it has the wrong magic bytes at the start > On May 20, 2015, at 10:48 AM, keiths at redhat dot com wrote: >=20 > https://sourceware.org/bugzilla/show_bug.cgi?id=3D18436 >=20 > --- Comment #5 from Keith Seitz --- > (In reply to stanton from comment #2) >> 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 >=20 > Considering you have source files and can step through your program, this= tells > me that there is a debug info problem concerning the global variable vec = or > there is some obscure bug in gdb preventing this from working. >=20 > I have some vague recollection of custom Apple DWARF extensions making th= eir > way into GCC for MacOS, but not GDB. That might explain why LLDB can > successfully inspect the variable. >=20 > Does "readelf -w" (does that exist on Mac?) show any output DIEs? >=20 > For example, for the test case associated with this bug, >=20 > $ readelf -w main | grep producer > DW_AT_producer : (indirect string, offset: 0xb6): GNU C 4.9.2 > 20150212 (Red Hat 4.9.2-6) -mtune=3Dgeneric -march=3Dx86-64 -g=20=20 > DW_AT_producer DW_FORM_strp >=20 > Other than the fact that we have debug DIEs, we can also see the "-g" was > passed to GCC to output debug info. >=20 > Also, what is the debug info for "vec" (if any)? In my build of the test,= I > have: > <1>: Abbrev Number: 8 (DW_TAG_variable) > DW_AT_name : vec=20=20=20=20=20=20 > DW_AT_decl_file : 1=20=20=20=20=20=20=20=20 >
DW_AT_decl_line : 4=20=20=20=20=20=20=20=20 > DW_AT_type : <0xec>=20=20=20 > DW_AT_external : 1=20=20=20=20=20=20=20=20 > DW_AT_location : 9 byte block: 3 50 10 60 0 0 0 0 0=20=20=20= =20=20=20 > (DW_OP_addr: 601050) >=20 > A (not satisfactory IMO) workaround is to tell gdb what "vec" is: > (gdb) file ~/tmp/18436.nodebug > (gdb) start > Temporary breakpoint 1 at 0x4005ca > Starting program: /home/keiths/tmp/18436.nodebug=20 >=20 > Temporary breakpoint 1, 0x00000000004005ca in main () > (gdb) ni 50 > Item 0 =3D 0 > 0x000000000040062b in main () > (gdb) p vec[0] > cannot subscript something of type `' > (gdb) p ((double*)vec)[0] > $1 =3D 0 > (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-18104-listarch-gdb-prs=sources.redhat.com@sourceware.org Wed May 20 18:18:23 2015 Return-Path: Delivered-To: listarch-gdb-prs@sources.redhat.com Received: (qmail 63490 invoked by alias); 20 May 2015 18:18:22 -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 63465 invoked by uid 55); 20 May 2015 18:18:22 -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 18:18: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/msg00298.txt.bz2 Content-length: 520 https://sourceware.org/bugzilla/show_bug.cgi?id=3D18436 --- Comment #8 from stanton at haas dot berkeley.edu --- Unfortunately, the workaround below doesn=E2=80=99t work on my system: (gdb) print vec[0] cannot subscript something of type `' (gdb) print ((double*)vec)[0] Cannot access memory at address 0x200000 I just installed MacPorts gcc 5.1.0, and also hand-compiled gdb 7.9.1. It didn=E2=80=99t help. --=20 You are receiving this mail because: You are on the CC list for the bug. >>From gdb-prs-return-18105-listarch-gdb-prs=sources.redhat.com@sourceware.org Wed May 20 20:16:22 2015 Return-Path: Delivered-To: listarch-gdb-prs@sources.redhat.com Received: (qmail 4257 invoked by alias); 20 May 2015 20:16:21 -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 4230 invoked by uid 55); 20 May 2015 20:16:20 -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 20:16: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/msg00299.txt.bz2 Content-length: 952 https://sourceware.org/bugzilla/show_bug.cgi?id=3D18436 --- Comment #9 from stanton at haas dot berkeley.edu --- I just noticed something odd. Using gcc 5.1 and gdb 7.7.1 (both MacPorts), I can inspect v[0] fine if I compile like this: gcc -g main.c -o main It fails if I compile the same program (same gcc, some gdb) like this: gcc -g -c -o main.o main.c gcc -o main main.o=20 Any idea why this should be different?=20 > On May 20, 2015, at 11:17 AM, Richard Stanton = wrote: >=20 > Unfortunately, the workaround below doesn=E2=80=99t work on my system: >=20 > (gdb) print vec[0] > cannot subscript something of type `' > (gdb) print ((double*)vec)[0] > Cannot access memory at address 0x200000 >=20 > I just installed MacPorts gcc 5.1.0, and also hand-compiled gdb 7.9.1. It= didn=E2=80=99t help. >=20 > --=20 You are receiving this mail because: You are on the CC list for the bug. >>From gdb-prs-return-18106-listarch-gdb-prs=sources.redhat.com@sourceware.org Wed May 20 21:18:16 2015 Return-Path: Delivered-To: listarch-gdb-prs@sources.redhat.com Received: (qmail 123518 invoked by alias); 20 May 2015 21:18:16 -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 123487 invoked by uid 48); 20 May 2015 21:18:16 -0000 From: "dje at google dot com" To: gdb-prs@sourceware.org Subject: [Bug python/11324] python pretty-printers uglify backtraces Date: Wed, 20 May 2015 21:18:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: python X-Bugzilla-Version: archer X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dje at google dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: 7.1 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cc resolution 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/msg00300.txt.bz2 Content-length: 671 https://sourceware.org/bugzilla/show_bug.cgi?id=11324 dje at google dot com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |dje at google dot com Resolution|--- |FIXED --- Comment #2 from dje at google dot com --- IIUC the intended solution is now implemented: gdbpy_gdb_memory_error and print_stack_unless_memory_error. Please reopen and clarify if not. -- You are receiving this mail because: You are on the CC list for the bug.