From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31226 invoked by alias); 17 Nov 2014 18:21:47 -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 31202 invoked by uid 48); 17 Nov 2014 18:21:46 -0000 From: "dje at google dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/17612] New: gdb should be able to clip large memory reads to a certain size Date: Mon, 17 Nov 2014 18:21:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 7.8 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dje at google dot com X-Bugzilla-Status: NEW 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_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: 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: 2014-q4/txt/msg00271.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=17612 Bug ID: 17612 Summary: gdb should be able to clip large memory reads to a certain size Product: gdb Version: 7.8 Status: NEW Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: dje at google dot com Someone on irc was having a problem printing a VLA (gdb ran out of memory) and that got me wondering how gdb handles printing of large objects. #include struct big { char foo[1 * 1024 * 1024 * 1024]; }; int main () { struct big *p = malloc (sizeof (*p)); return 0; } Printing *p takes forever. Plus it's not interruptable. So there's two bugs here: 1) we should provide a way to clip the amount of memory read, akin to how we clip how much we print with "set print elements". Maybe we could use the same parameter, I'm not sure. 2) this should be interruptable. [I'll file a separate bug for this in a bit.] -- You are receiving this mail because: You are on the CC list for the bug.