This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug python/18779] collection of issues handling C strings in python


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]