public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "stanton at haas dot berkeley.edu" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/18436] Can't print dynamically allocated global array
Date: Thu, 21 May 2015 17:26:00 -0000	[thread overview]
Message-ID: <bug-18436-4717-NT5UShQzNl@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-18436-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=18436

--- Comment #10 from stanton at haas dot berkeley.edu ---
Final follow-up (for now):

gdb works fine if you add a -g flag to both the compilation and the linking
step. Not sure why, but at least it’s working now.

> gcc -g -c -o main.o main.c
> gcc -g -o main main.o 



> On May 20, 2015, at 1:15 PM, Richard Stanton <stanton@haas.berkeley.edu> wrote:
> 
> 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 
> 
> Any idea why this should be different? 
> 
> 
>> On May 20, 2015, at 11:17 AM, Richard Stanton <stanton@haas.berkeley.edu> wrote:
>> 
>> Unfortunately, the workaround below doesn’t work on my system:
>> 
>> (gdb) print vec[0]
>> cannot subscript something of type `<data variable, no debug info>'
>> (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’t help.
>> 
>> 
>

-- 
You are receiving this mail because:
You are on the CC list for the bug.
>From gdb-prs-return-18112-listarch-gdb-prs=sources.redhat.com@sourceware.org Thu May 21 17:39:52 2015
Return-Path: <gdb-prs-return-18112-listarch-gdb-prs=sources.redhat.com@sourceware.org>
Delivered-To: listarch-gdb-prs@sources.redhat.com
Received: (qmail 61389 invoked by alias); 21 May 2015 17:39:52 -0000
Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm
Precedence: bulk
List-Id: <gdb-prs.sourceware.org>
List-Subscribe: <mailto:gdb-prs-subscribe@sourceware.org>
List-Archive: <http://sourceware.org/ml/gdb-prs/>
List-Post: <mailto:gdb-prs@sourceware.org>
List-Help: <mailto:gdb-prs-help@sourceware.org>, <http://sourceware.org/lists.html#faqs>
Sender: gdb-prs-owner@sourceware.org
Delivered-To: mailing list gdb-prs@sourceware.org
Received: (qmail 61342 invoked by uid 48); 21 May 2015 17:39:50 -0000
From: "dje at google dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug c++/17976] ptype (anonymous namespace) doesn't work
Date: Thu, 21 May 2015 17:39:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gdb
X-Bugzilla-Component: c++
X-Bugzilla-Version: HEAD
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: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status resolution
Message-ID: <bug-17976-4717-Y2GY1yRk9X@http.sourceware.org/bugzilla/>
In-Reply-To: <bug-17976-4717@http.sourceware.org/bugzilla/>
References: <bug-17976-4717@http.sourceware.org/bugzilla/>
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/msg00306.txt.bz2
Content-length: 474

https://sourceware.org/bugzilla/show_bug.cgi?id\x17976

dje at google dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from dje at google dot com ---
patch committed

--
You are receiving this mail because:
You are on the CC list for the bug.


  parent reply	other threads:[~2015-05-21 17:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-20  4:54 [Bug gdb/18436] New: " stanton at haas dot berkeley.edu
2015-05-20 16:34 ` [Bug gdb/18436] " keiths at redhat dot com
2015-05-20 17:15 ` stanton at haas dot berkeley.edu
2015-05-20 17:48 ` keiths at redhat dot com
2015-05-20 18:13 ` stanton at haas dot berkeley.edu
2015-05-21 17:26 ` stanton at haas dot berkeley.edu [this message]
2023-08-03 15:53 ` tromey at sourceware dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-18436-4717-NT5UShQzNl@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).