This is the mail archive of the archer@sourceware.org mailing list for the Archer 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]

Re: [python] Pretty-printers for non-ASCII data (take 2).


>>>>> "Paul" == Paul Pluzhnikov <ppluzhnikov@google.com> writes:

Paul> Greetings,
Paul> Previous thread on this subject:
Paul> http://sourceware.org/ml/archer/2008-q4/msg00180.html

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.

Tom


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