This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug python/18779] collection of issues handling C strings in python
- From: "dje at google dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Thu, 06 Aug 2015 18:07:04 +0000
- Subject: [Bug python/18779] collection of issues handling C strings in python
- Auto-submitted: auto-generated
- References: <bug-18779-4717 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=18779
--- Comment #1 from dje at google dot com ---
bug #5:
(gdb) py print gdb.parse_and_eval("&string[0]").lazy_string().value()
104 'h'
I expected "hello".
The type of the result of LazyString.value() is a gdb Value, can't change that.
We could return an array of 5 (or 6) characters,
but we'd also want to make sure our handling of arrays of chars
is correct if we decide that.
At the least, we shouldn't be returning a gdb.Value object of the char 'h'.
--
You are receiving this mail because:
You are on the CC list for the bug.