This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/17612] New: gdb should be able to clip large memory reads to a certain size


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]