public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "dje at google dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/17612] gdb should be able to clip large memory reads to a certain size
Date: Mon, 17 Nov 2014 20:04:00 -0000	[thread overview]
Message-ID: <bug-17612-4717-IS4S2zOKBM@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-17612-4717@http.sourceware.org/bugzilla/>

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

--- Comment #2 from dje at google dot com ---
It's not the amount of memory read that is slowing things down here, though it
might still be nice to provide a knob - we don't want to accidently trip a
malloc failure.

What's taking forever in this example is computing the number of repeated
elements.  Change foo to 1M in size, and set target debug to 1 and it's easier
to see.

(gdb) set target debug 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 uninterruptable pause here]

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

Should the "repeats xxx times" calculation take into account "print elements" ?
Maybe "repeats at least 200 times" (where 200 is the value of "print elements")
?

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


  parent reply	other threads:[~2014-11-17 20:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-17 18:21 [Bug gdb/17612] New: " 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 [this message]
2020-04-06 18:29 ` ssbssa 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-17612-4717-IS4S2zOKBM@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).