public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/17613] New: printing of large objects not interruptable
@ 2014-11-17 19:39 dje at google dot com
  2014-11-17 20:00 ` [Bug gdb/17613] " dje at google dot com
  0 siblings, 1 reply; 2+ messages in thread
From: dje at google dot com @ 2014-11-17 19:39 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 17613
           Summary: printing of large objects not interruptable
           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

>From PR 17612:

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

This bug covers the "not interruptable" part.

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


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

* [Bug gdb/17613] printing of large objects not interruptable
  2014-11-17 19:39 [Bug gdb/17613] New: printing of large objects not interruptable dje at google dot com
@ 2014-11-17 20:00 ` dje at google dot com
  0 siblings, 0 replies; 2+ messages in thread
From: dje at google dot com @ 2014-11-17 20:00 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #1 from dje at google dot com ---
I think what's taking awhile and is uninterruptable is computing repeated
elements.
The computation proceeds passed "print elements".

E.g., change foo to 1M bytes and it still takes awhile, but it completes
without taking "forever".

(gdb) set debug target 1
(gdb) p *p
target_thread_address_space (process 12972) = 1
native:target_xfer_partial (2, (null), 0x2dd1610, 0x0, 0x401ba8, 8) = 1, 8,
bytes =
 10 10 60 f7 ff 7f 00 00
native:target_xfer_partial (2, (null), 0x7f63eadcc010, 0x0, 0x7ffff7601010,
1048576) = 1, 1048576, bytes =
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...
$1 = {

[long uninterruptible pause here]

  foo =     '\000' <repeats 1048575 times>
}
(gdb) 

Then if I change foo to contain random text (but leave it still 1GB in size) up
to "print elements" (default = 200) then it completes reasonably quickly.

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


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

end of thread, other threads:[~2014-11-17 20:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-17 19:39 [Bug gdb/17613] New: printing of large objects not interruptable dje at google dot com
2014-11-17 20:00 ` [Bug gdb/17613] " dje at google dot com

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