This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug python/16196] New: lazy string vs "print elements"
- From: "dje at google dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Wed, 20 Nov 2013 21:28:51 +0000
- Subject: [Bug python/16196] New: lazy string vs "print elements"
- Auto-submitted: auto-generated
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.