This is the mail archive of the
mailing list for the Archer project.
Re: [python] Pretty-printers for non-ASCII data (take 2).
- From: Tom Tromey <tromey at redhat dot com>
- To: ppluzhnikov at google dot com (Paul Pluzhnikov)
- Cc: archer at sourceware dot org, jyasskin at google dot com
- Date: Tue, 07 Jul 2009 10:23:56 -0600
- Subject: Re: [python] Pretty-printers for non-ASCII data (take 2).
- References: <20090706230319.6B76076BC0@localhost>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>>>> "Paul" == Paul Pluzhnikov <email@example.com> writes:
Paul> Previous thread on this subject:
Paul> Jeffrey Yasskin suggests that in addition to gdb.Value.string we need a
Paul> gdb.Value.data(ptr, len) returning a Python 'str' object with just raw
Paul> contents of the value, which can then be passed to e.g. binascii.hexlify()
Paul> for printing.
Paul> Does that sound reasonable? I'll send a patch if it is.
If you don't need an actual Value object, we have the python-membuf
stuff that Thiago wrote a while back.
I also wonder if Value.string with the length parameter and (the yucky
part) an encoding of ISO-8859-1 would do the right thing.
If that isn't sufficient, then yeah, sounds good to me.