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 python/16196] New: lazy string vs "print elements" Date: Wed, 20 Nov 2013 21:28:00 -0000 [thread overview] Message-ID: <bug-16196-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=16196 Bug ID: 16196 Summary: lazy string vs "print elements" Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: python Assignee: unassigned at sourceware dot org Reporter: dje at google dot com Bug 10633 says this is fixed, and the printing may be, but there's an optimization to be had here. read_string doesn't obey fetchlimit if len != -1. So if one is printing an uninitialized string, or just a very long string, gdb will read the whole thing, even if "print elements" is much smaller. Plus I found another issue: - long -> int conversion in the extracted lazy string length loses precision [which while one wouldn't expect to have 4G strings, pretty printing an uninitialized object should have more consistent behaviour] Repro: create long c++ string, set target debug 1, and print the string. How many bytes are read from the target? -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2013-11-20 21:28 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-11-20 21:28 dje at google dot com [this message] 2013-11-20 21:29 ` [Bug python/16196] " dje at google dot com 2013-11-22 20:32 ` dje at google dot com 2013-11-22 22:01 ` cvs-commit at gcc dot gnu.org 2013-11-22 22:25 ` cvs-commit at gcc dot gnu.org 2013-11-23 7:20 ` asmwarrior at gmail dot com 2013-11-24 7:33 ` asmwarrior at gmail dot com 2023-12-09 13:04 ` ssbssa at sourceware dot org 2024-11-18 19:47 ` tromey 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-16196-4717@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: linkBe 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).