public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/17612] New: gdb should be able to clip large memory reads to a certain size
@ 2014-11-17 18:21 dje at google dot com
  2014-11-17 19:40 ` [Bug gdb/17612] " dje at google dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: dje at google dot com @ 2014-11-17 18:21 UTC (permalink / raw)
  To: gdb-prs

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 <stdlib.h>

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-04-06 18:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-17 18:21 [Bug gdb/17612] New: gdb should be able to clip large memory reads to a certain size dje at google dot com
2014-11-17 19:40 ` [Bug gdb/17612] " dje at google dot com
2014-11-17 20:04 ` dje at google dot com
2020-04-06 18:29 ` ssbssa at sourceware dot org

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).