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

Simon Marchi <simon.marchi at ericsson dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |simon.marchi at ericsson dot com

--- Comment #2 from Simon Marchi <simon.marchi at ericsson dot com> ---
I just tried to use LazyString for the first time, and I stumbled on similar
problems.  My big question is: how do you get a Python string out of the
LazyString?

I ended up doing

  lazy_string.value().address.string()

After reading the doc, I expected lazy_string.value() to return a gdb.Value()
representing a char*.  I guess it works if the string is nul-terminated only...

-- 
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]